Android - если я запускаю камеру - присвоение обнаруженной гонки данных - PullRequest
0 голосов
/ 28 января 2020

Когда я запускаю камеру с этим кодом:

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        // Ensure that there's a camera activity to handle the intent
        if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
            // Create the File where the photo should go
            File photoFile = null;
            try {
                photoFile = createImageFile();
            } catch (IOException ex) {
                // Error occurred while creating the File

            }
            // Continue only if the File was successfully created
            if (photoFile != null) {
                Uri photoURI = FileProvider.getUriForFile(this,
                        BuildConfig.APPLICATION_ID + ".fileprovider",
                        photoFile);
                takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
                startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);
            }
        }

Я получаю эту ошибку:

A/sp: sp<> assignment detected data race
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 23833 (RenderThread), pid 23705 (name.name)

Кто-нибудь знает, что означает сообщение об ошибке и как я могу решить проблему

...