Closed giandifra closed 11 months ago
It looks like your view is destroyed prematurely. Could you please check what is calling this function from your code? https://github.com/SceneView/sceneview-android/blob/b8fbea4c5ae621a272b417c1023ea9bbd2fc8f1f/sceneview/src/main/java/io/github/sceneview/SceneView.kt#L694
It's calling here https://github.com/SceneView/sceneview-flutter/blob/8bed742c7f6e6efbe0e2b77a83e33ee919041dcf/android/src/main/kotlin/io/github/sceneview/sceneview_flutter/SceneViewWrapper.kt#L125 but it s never called
I removed it but nothing change...
Is it happening when starting or finishing the activity?
If we change in scene_view.dart the PlatformViewService.initAndroidView by PlatformViewService.initExpensiveAndroidView
, the error dissapear. But I'm not sure the difference between these two services.
However, even though there is no error, you cannot see anything on the screen.
If we change in scene_view.dart the
PlatformViewService.initAndroidView by PlatformViewService.initExpensiveAndroidView
, the error dissapear. But I'm not sure the difference between these two services. However, even though there is no error, you cannot see anything on the screen.
let me check
I'm doing some test:
branch | flutter | sceneview | works
main | 3.7.12 | 1.0.4 | yes
main | 3.7.12 | 1.0.10 | yes
main | 3.10.5 | 1.0.10 | no
E/BufferQueueProducer(30901): [SurfaceTexture-0-30901-0](id:78b500000002,api:0,p:-1,c:30901) dequeueBuffer: BufferQueue has no connected producer
feature/arsceneview | 3.7.12 | 0.10.0 | no java.lang.IllegalStateException: Calling method on destroyed Engine
feature/arsceneview_initExpensiveAndroidView | 3.7.12 | 0.10.0 | no white screen with no errors
feature/arsceneview | 3.10.5 | 0.10.0 | no java.lang.IllegalStateException: Calling method on destroyed Engine
feature/arsceneview_initExpensiveAndroidView | 3.10.5 | 0.10.0 | no white screen with no errors
I will update this with others test
That's Sceneview 1.0.x versions not ARSceneview 0.10.x one. Are you using ARSceneview or Sceneview 1.0.0 ?
I'm testing both, In the main branch I used sceneview 1.0.x, in the feature/arsceneview branch arsceneview 0.x.0
Il lun 3 lug 2023, 17:04 Thomas Gorisse @.***> ha scritto:
That's Sceneview 1.0.x not ARSceneview 0.10.0! Right?
— Reply to this email directly, view it on GitHub https://github.com/SceneView/sceneview-flutter/issues/7#issuecomment-1618567317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKSKKBNYJH4OHAPQI2FX7ITXOLNQDANCNFSM6AAAAAAZ4EMOH4 . You are receiving this because you authored the thread.Message ID: @.***>
There is one of the bellow case that is happening:
In any case, what you should do is to have an ARSceneView that should only need to overide those 2 val
s:
open val lifecycle: Lifecycle? get() = findViewTreeLifecycleOwner()?.lifecycle
val coroutineScope get() = lifecycle?.coroutineScope
open val activity: ComponentActivity?
get() = try {
findFragment<Fragment>().requireActivity()
} catch (e: Exception) {
context as? ComponentActivity
}
And give it your activity and lifecycle from the Flutter input.
I override lifecycle like this:
class CustomArSceneView(
private val context: Context,
private val l: Lifecycle
) : ArSceneView(context) {
override val lifecycle: Lifecycle
get() = l
}
From logs i don't see errors, but the screen is black. I'm investigating...
The output:
2023-07-03 22:03:15.922 30456-30456 SceneViewWrapper io....iew.sceneview_flutter_example I init
2023-07-03 22:03:15.947 30456-30456 Filament io....iew.sceneview_flutter_example I FEngine (64 bits) created at 0x7ac9035ab0 (threading is enabled)
2023-07-03 22:03:15.949 30456-30566 Filament io....iew.sceneview_flutter_example D Using ASurfaceTexture
2023-07-03 22:03:15.949 30456-30566 Filament io....iew.sceneview_flutter_example I FEngine resolved backend: OpenGL
2023-07-03 22:03:15.952 30456-30566 Filament io....iew.sceneview_flutter_example V [Qualcomm], [Adreno (TM) 540], [OpenGL ES 3.2 V@0490.0 (GIT@e883189, Ia11ce2d146, 1599063670) (Date:09/02/20)], [OpenGL ES GLSL ES 3.20]
2023-07-03 22:03:15.953 30456-30566 Filament io....iew.sceneview_flutter_example V Feature level: 2
Active workarounds:
dont_use_timer_query
disable_sidecar_blit_into_texture_array
split_easu
invalidate_end_only_if_invalidate_start
allow_read_only_ancillary_feedback_loop
enable_initialize_non_used_uniform_array
2023-07-03 22:03:15.956 30456-30456 Filament io....iew.sceneview_flutter_example I Backend feature level: 2
2023-07-03 22:03:15.956 30456-30456 Filament io....iew.sceneview_flutter_example I FEngine feature level: 1
2023-07-03 22:03:16.030 30456-30456 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 22:03:16.030 30456-30456 PlatformViewsController io....iew.sceneview_flutter_example I Using hybrid composition for platform view: 0
2023-07-03 22:03:16.145 30456-30456 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 22:03:16.164 30456-30456 third_part..._create.cc io....iew.sceneview_flutter_example I Entering ArSession_createWithFeaturesAndTrace
2023-07-03 22:03:16.164 30456-30456 third_part..._create.cc io....iew.sceneview_flutter_example I ARCore Version: SDK build name: 1.37
2023-07-03 22:03:16.168 30456-30456 third_part..._create.cc io....iew.sceneview_flutter_example I ARCore Version: APK version code: 231000423
2023-07-03 22:03:16.269 30456-30456 third_part..._create.cc io....iew.sceneview_flutter_example I Dynamite load ok.
2023-07-03 22:03:16.269 30456-30456 third_part..._client.cc io....iew.sceneview_flutter_example I Attempting to load native library arcore_c from package com.google.ar.core
2023-07-03 22:03:16.309 30456-30456 third_part..._client.cc io....iew.sceneview_flutter_example I Dynamite::LoadNativeRemoteLibrary handle=-8802738835804226405
2023-07-03 22:03:16.309 30456-30456 third_part..._create.cc io....iew.sceneview_flutter_example I ARCore SDK: dynamite number_of_symbols_loaded=313
2023-07-03 22:03:16.310 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.310125 30456 session_create_implementation.cc:253] Entering createImplementationWithFeaturesAndSettings. ARCore SDK version: [1.37.230900000].
2023-07-03 22:03:16.351 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.351765 30456 session_create_implementation.cc:216] AugmentedRegion downsample mode from Phenotype: false
2023-07-03 22:03:16.359 30456-30574 third_part..._helper.cc io....iew.sceneview_flutter_example V JniHelper: attached thread (Called from line 367).
2023-07-03 22:03:16.428 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.428484 30456 session_create_implementation_shared.cc:2352] min_apk_version_code is: 230900000, phenotype flag of enable_dual_camera_support is: false, phenotype flag of unified_data_source_status is: 2, is_dual_camera_supported based on device profile is: false
2023-07-03 22:03:16.428 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.428651 30456 session_create_implementation_shared.cc:2363] Settings.camera_stack_option is not specified
2023-07-03 22:03:16.428 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.428700 30456 session_create_implementation_shared.cc:2436] Datasource will be created with camera_stack_option = kUnifiedMono
2023-07-03 22:03:16.428 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.428738 30456 android_camera.cc:168] Camera start operation timeout set to 4000 ms.
2023-07-03 22:03:16.428 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.428875 30456 android_camera.cc:1826] Initializing camera manager.
2023-07-03 22:03:16.439 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.439536 30456 android_camera.cc:1852] Camera manager initialized successfully with 2 cameras.
2023-07-03 22:03:16.440 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.440042 30456 android_camera.cc:762] [Camera=1; State=CLOSED] Reset cleanly got to CLOSED state.
2023-07-03 22:03:16.440 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.440814 30456 android_camera.cc:762] [Camera=0; State=CLOSED] Reset cleanly got to CLOSED state.
2023-07-03 22:03:16.442 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.442654 30456 session_create_implementation_shared.cc:2535] Persistent online recalibration is enabled by Phenotype.
2023-07-03 22:03:16.447 30456-30456 tflite io....iew.sceneview_flutter_example I Initialized TensorFlow Lite runtime.
2023-07-03 22:03:16.448 30456-30456 libc io....iew.sceneview_flutter_example E Access denied finding property "ro.hardware.chipname"
2023-07-03 22:03:16.449 30456-30456 tflite io....iew.sceneview_flutter_example I Created TensorFlow Lite XNNPACK delegate for CPU.
2023-07-03 22:03:16.449 30456-30456 tflite io....iew.sceneview_flutter_example I Replacing 2 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for the whole graph.
2023-07-03 22:03:16.450 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.450260 30456 online_calibration_manager.cc:93] OnlineCalibrationManager: Could not open /data/user/0/io.github.sceneview.sceneview_flutter_example/cache/arcore-online-recalibration for reading.
2023-07-03 22:03:16.536 30456-30456 ARCore-ContextUtils io....iew.sceneview_flutter_example W The API key for use with the Google AR service could not be obtained!
2023-07-03 22:03:16.623 30456-30456 CameraManagerGlobal io....iew.sceneview_flutter_example I Connecting to camera service
2023-07-03 22:03:16.678 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.678892 30456 android_sensors.cc:136] Using uncalibrated accelerometer.
2023-07-03 22:03:16.679 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.679230 30456 android_sensors.cc:164] Found IMU temperature sensor.
2023-07-03 22:03:16.679 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.679623 30456 android_sensors.cc:175] Uncalibrated magnetometer available.
2023-07-03 22:03:16.679 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.679797 30456 android_sensors.cc:179] Calibrated magnetometer available.
2023-07-03 22:03:16.679 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.679850 30456 android_sensors.cc:192] Using SENSOR_TYPE_LIGHT
2023-07-03 22:03:16.679 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.679935 30456 android_sensors.cc:192] Using SENSOR_TYPE_PRESSURE
2023-07-03 22:03:16.679 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.679977 30456 android_sensors.cc:192] Using SENSOR_TYPE_PROXIMITY
2023-07-03 22:03:16.680 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.680433 30456 android_sensors.cc:192] Using SENSOR_TYPE_GRAVITY
2023-07-03 22:03:16.680 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.680803 30456 android_sensors.cc:192] Using SENSOR_TYPE_ROTATION_VECTOR
2023-07-03 22:03:16.681 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.681221 30456 android_sensors.cc:192] Using SENSOR_TYPE_GAME_ROTATION_VECTOR
2023-07-03 22:03:16.681 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.681281 30456 android_sensors.cc:192] Using SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
2023-07-03 22:03:16.681 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.681332 30456 android_sensors.cc:192] Using SENSOR_TYPE_STEP_DETECTOR
2023-07-03 22:03:16.685 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.685711 30456 android_platform_checks.cc:206] IsZeroRotationLandscape = false
2023-07-03 22:03:16.686 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.686163 30456 app_version_util.cc:50] Package name: com.google.ar.core App version: 1.37.231000423
2023-07-03 22:03:16.686 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.686358 30456 logger.h:28] DataSourceMetrics: CamerasInit: 1.406us
2023-07-03 22:03:16.686 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.686385 30456 session_create_implementation_shared.cc:1542] CPU Image enable frame delay to compensate delay: false
2023-07-03 22:03:16.697 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.697584 30456 config_helpers.cc:430] IMU sigma values from data source are used
2023-07-03 22:03:16.697 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.697675 30456 config_helpers.cc:379] Failed to find IMU intrinsic covariance matrix in profile for id: 100
2023-07-03 22:03:16.697 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.697700 30456 config_helpers.cc:137] Does not find camera intrinsic covariance matrix in profile for id 0
2023-07-03 22:03:16.697 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.697715 30456 config_helpers.cc:210] Does not find extrinsic covariance matrix in profile for IMU id 100
2023-07-03 22:03:16.698 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.698886 30456 motion_tracking_context.cc:829] VPS data synchronizer is successfully initialized.
2023-07-03 22:03:16.698 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.698944 30456 feature_matcher_and_filter.cc:282] Enabled the robustification to large-sized and fast-moving objects on this mono-camera device.
2023-07-03 22:03:16.701 30456-30456 tflite io....iew.sceneview_flutter_example I Replacing 3 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for the whole graph.
2023-07-03 22:03:16.701 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.701252 30456 pose_confidence_estimator.cc:231] Pose confidence model loaded successfully
2023-07-03 22:03:16.723 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.723953 30456 asset_manager_util.cc:59] Created global reference to asset manager.
2023-07-03 22:03:16.724 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.724029 30456 session_create_implementation_shared.cc:1567] Normal detector created.
2023-07-03 22:03:16.730 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.730088 30456 planar_target_tracking_manager.h:116] Config of PlanarTargetTrackingManager:
-pose_refinement_with_detection_interval_ns: 0
-min_interval_between_detections_ns: 500000000
-filter_parallax: false
-filter_result: true
-multiple_targets: true
-mini_detection: true
-tracking_mode: 1
-camera_id: 0
2023-07-03 22:03:16.734 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.734730 30456 camera_config_manager.cc:719] UpdateBugFixes on CameraConfigManager is unimplemented!
2023-07-03 22:03:16.735 30456-30456 flutter_exampl io....iew.sceneview_flutter_example W Accessing hidden method Landroid/media/Image;-><init>()V (greylist, linking, allowed)
2023-07-03 22:03:16.735 30456-30456 third_part...age_jni.cc io....iew.sceneview_flutter_example I Loading AImage symbols
2023-07-03 22:03:16.751 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.751489 30456 session.cc:578] New session config:
ArConfig
augmented_face_mode: AR_AUGMENTED_FACE_MODE_DISABLED
augmented_image_database: <null>
cloud_anchor_mode: AR_CLOUD_ANCHOR_MODE_DISABLED
depth_mode: AR_DEPTH_MODE_DISABLED
semantic_mode: AR_SEMANTIC_MODE_DISABLED
focus_mode: AR_FOCUS_MODE_FIXED
geospatial_mode: AR_GEOSPATIAL_MODE_DISABLED
instant_placement_mode: AR_INSTANT_PLACEMENT_MODE_LOCAL_Y_UP
light_estimation_mode: AR_LIGHT_ESTIMATION_MODE_DISABLED
plane_finding_mode: AR_PLANE_FINDING_MODE_HORIZONTAL_AND_VERTICAL
update_mode: AR_UPDATE_MODE_LATEST_CAMERA_IMAGE
2023-07-03 22:03:16.751 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.751653 30456 session.cc:571] Session::CheckAndWriteCurrentConfig returning OK.
2023-07-03 22:03:16.753 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.753350 30456 session.cc:1239] Entering Session::Resume.
2023-07-03 22:03:16.753 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.753810 30456 camera_config_manager.cc:719] UpdateBugFixes on CameraConfigManager is unimplemented!
2023-07-03 22:03:16.754 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.754137 30456 pursuit_tracker.cc:1516] AugmentedRegion config changed, enabled:1, quad:false, downsample:true, global reacquisition:false, lite mode:false, adaptive frame delay:false, interpolation:true, feature match stats:false, sharpness score computation:false, enable_pursuit_higher_frequent_reacquisition_on_roi:false, enable_profiling:false
2023-07-03 22:03:16.755 30456-30616 native io....iew.sceneview_flutter_example W W0000 00:00:1688414596.755673 30616 motion_analysis_calculator.cc:386] No input video header found. Downstream calculators expecting video headers are likely to fail.
2023-07-03 22:03:16.779 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.779943 30456 eis_manager.cc:68] EIS turned off
2023-07-03 22:03:16.780 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.780010 30456 eis_manager.cc:79] current_eis_metadata_.frame_size 1920 x 1080
2023-07-03 22:03:16.780 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.780035 30456 android_camera.cc:168] Camera start operation timeout set to 4000 ms.
2023-07-03 22:03:16.780 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.780057 30456 android_camera.cc:1826] Initializing camera manager.
2023-07-03 22:03:16.784 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.784207 30456 android_camera.cc:1852] Camera manager initialized successfully with 2 cameras.
2023-07-03 22:03:16.784 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.784303 30456 android_camera.cc:762] [Camera=1; State=CLOSED] Reset cleanly got to CLOSED state.
2023-07-03 22:03:16.784 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.784460 30456 android_camera.cc:762] [Camera=0; State=CLOSED] Reset cleanly got to CLOSED state.
2023-07-03 22:03:16.784 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.784793 30456 session.cc:3580] Update Frame Delay to 3 frames.
2023-07-03 22:03:16.794 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.794466 30456 android_sensors.cc:214] Starting thread.
2023-07-03 22:03:16.799 30456-30630 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.799366 30630 android_sensors.cc:53] Gyro min delay 2.5ms requesting 5ms
2023-07-03 22:03:16.805 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.805414 30456 logger.h:28] DataSourceMetrics: kStartImageSubSystem: 10.793334ms
2023-07-03 22:03:16.805 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.805502 30456 session.cc:1427] Session::ResumeWithAnalytics returning OK.
2023-07-03 22:03:16.806 30456-30630 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.806460 30630 android_sensors.cc:53] Accel min delay 2.5ms requesting 5ms
2023-07-03 22:03:16.811 30456-30630 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.811048 30630 android_sensors.cc:53] IMU Temperature min delay 200ms requesting 200ms
2023-07-03 22:03:16.821 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.820950 30456 session.cc:578] New session config:
ArConfig
augmented_face_mode: AR_AUGMENTED_FACE_MODE_DISABLED
augmented_image_database: <null>
cloud_anchor_mode: AR_CLOUD_ANCHOR_MODE_DISABLED
depth_mode: AR_DEPTH_MODE_DISABLED
semantic_mode: AR_SEMANTIC_MODE_DISABLED
focus_mode: AR_FOCUS_MODE_AUTO
geospatial_mode: AR_GEOSPATIAL_MODE_DISABLED
instant_placement_mode: AR_INSTANT_PLACEMENT_MODE_LOCAL_Y_UP
light_estimation_mode: AR_LIGHT_ESTIMATION_MODE_DISABLED
plane_finding_mode: AR_PLANE_FINDING_MODE_HORIZONTAL_AND_VERTICAL
update_mode: AR_UPDATE_MODE_LATEST_CAMERA_IMAGE
2023-07-03 22:03:16.821 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.821062 30456 session.cc:571] Session::CheckAndWriteCurrentConfig returning OK.
2023-07-03 22:03:16.821 30456-30456 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 22:03:16.825 30456-30456 Gralloc4 io....iew.sceneview_flutter_example W allocator 3.x is not supported
2023-07-03 22:03:16.825 30456-30456 Gralloc3 io....iew.sceneview_flutter_example W allocator 3.x is not supported
2023-07-03 22:03:16.849 30456-30456 SceneViewWrapper io....iew.sceneview_flutter_example I getView
2023-07-03 22:03:16.855 30456-30456 Choreographer io....iew.sceneview_flutter_example I Skipped 43 frames! The application may be doing too much work on its main thread.
2023-07-03 22:03:16.857 30456-30456 native io....iew.sceneview_flutter_example I I0000 00:00:1688414596.857230 30456 session.cc:3580] Update Frame Delay to 3 frames.
2023-07-03 22:03:17.152 30456-30629 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.152346 30629 logger.h:28] DataSourceMetrics: kFirstGlCallback: 357.718838ms
2023-07-03 22:03:17.171 30456-30697 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.171863 30697 timebase_helpers.cc:169] Timebase offset intialized to 0
2023-07-03 22:03:17.171 30456-30697 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.171947 30697 logger.h:28] DataSourceMetrics: kFirstImageCallback: 377.326913ms
2023-07-03 22:03:17.174 30456-30616 native io....iew.sceneview_flutter_example W W0000 00:00:1688414597.174197 30616 motion_analysis_calculator.cc:829] Requested image format in RegionFlowComputation does not match video stream format. Overriding.
2023-07-03 22:03:17.174 30456-30616 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.174491 30616 region_flow_computation.cc:617] Instantiating and using NEON optimized non-OpenCV KLT.
2023-07-03 22:03:17.180 30456-30616 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.180185 30616 motion_analysis_calculator.cc:651] Analyzed frame 1
2023-07-03 22:03:17.180 30456-30616 native io....iew.sceneview_flutter_example W W0000 00:00:1688414597.180322 30616 parallel_invoker.h:320] Unsupported invoker mode selected on Android. Falling back to ThreadPool
2023-07-03 22:03:17.186 30456-30602 native io....iew.sceneview_flutter_example W W0000 00:00:1688414597.186068 30602 feature_matcher_and_filter_utils.cc:269] INVALID_ARGUMENT: integration window start at 0
=== Source Location Trace: ===
third_party/redwood/perception/imu_processing/imu_integrator/imu_integrator_utils.cc:96
Use identity R.
2023-07-03 22:03:17.196 30456-30600 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.196579 30600 model_inference_cpu.cc:106] Successfully started the ArDepthCalculator graph.
2023-07-03 22:03:17.203 30456-30706 native io....iew.sceneview_flutter_example I I0000 00:00:1688414597.203792 30706 jni_util.cc:41] GetEnv: not attached
2023-07-03 22:03:17.230 30456-30697 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.230407 30697 feature_frame_selector.cc:69] Unknown old image at: 43873107219407 ns
2023-07-03 22:03:17.230 30456-30697 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.230622 30697 pursuit_tracker.cc:943] Received CPU image with smaller or same timestamp:43873107219407 than previous valid image's timestamp:43873157207199
2023-07-03 22:03:17.231 30456-30697 native io....iew.sceneview_flutter_example W W0000 00:00:1688414597.231799 30697 session.cc:1224] INVALID_ARGUMENT: Sensor timestamps must be strictly monotonically increasing, instead received 43873158954417 -> 43873092304027; Failed to add timestamp info to external data synchronizer.
=== Source Location Trace: ===
third_party/arcore/ar/video/external_data_sync.cc:36
2023-07-03 22:03:17.231 30456-30697 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.231868 30697 feature_frame_selector.cc:69] Unknown old image at: 43873107219407 ns
2023-07-03 22:03:17.250 30456-30706 tflite io....iew.sceneview_flutter_example I Replacing 299 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for the whole graph.
2023-07-03 22:03:17.547 30456-30600 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.547064 30600 jni_helper.cc:110] Attempt to get JNIEnv* on thread not attached to JVM
2023-07-03 22:03:17.557 30456-30596 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.557158 30596 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:17.831 30456-30597 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.831752 30597 jni_helper.cc:110] Attempt to get JNIEnv* on thread not attached to JVM
2023-07-03 22:03:17.832 30456-30598 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.832828 30598 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:17.833 30456-30600 native io....iew.sceneview_flutter_example E E0000 00:00:1688414597.832975 30600 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.037 30456-30599 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.037350 30599 jni_helper.cc:110] Attempt to get JNIEnv* on thread not attached to JVM
2023-07-03 22:03:18.038 30456-30596 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.038454 30596 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.235 30456-30595 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.235262 30595 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.438 30456-30600 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.438761 30600 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.502 30456-30601 native io....iew.sceneview_flutter_example I I0000 00:00:1688414598.502486 30601 bundle_adjustment_initializer.cc:338] Intrinsic vector size of the camera 0 is 7
2023-07-03 22:03:18.578 30456-30727 ProfileInstaller io....iew.sceneview_flutter_example D Installing profile for io.github.sceneview.sceneview_flutter_example
2023-07-03 22:03:18.595 30456-30601 native io....iew.sceneview_flutter_example I I0000 00:00:1688414598.595175 30601 bundle_adjustment_initializer.cc:573] [SSBA Solver] Initializer did not converge: Maximum number of iterations reached. Number of iterations: 18.
2023-07-03 22:03:18.657 30456-30596 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.657765 30596 jni_helper.cc:110] Attempt to get JNIEnv* on thread not attached to JVM
2023-07-03 22:03:18.692 30456-30601 native io....iew.sceneview_flutter_example I I0000 00:00:1688414598.692018 30601 bundle_adjustment_initializer.cc:968] Refinement did not converge: Maximum number of iterations reached. Number of iterations: 18.
2023-07-03 22:03:18.692 30456-30601 native io....iew.sceneview_flutter_example I I0000 00:00:1688414598.692170 30601 bundle_adjustment_initializer.cc:584] [SSBA Depth Refinement] Refine successfully!
2023-07-03 22:03:18.699 30456-30601 native io....iew.sceneview_flutter_example I I0000 00:00:1688414598.695601 30601 bundle_adjustment_initialization.h:143] Number of measurements used in BA initialization for temporal landmarks: 350
2023-07-03 22:03:18.701 30456-30601 native io....iew.sceneview_flutter_example I I0000 00:00:1688414598.699763 30601 bundle_adjustment_initialization.h:145] Number of good measurements (i.e., reprojection errors <= 3 pixels) in BA initialization for temporal landmarks: 338
2023-07-03 22:03:18.718 30456-30597 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.717991 30597 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.718 30456-30600 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.718256 30600 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.864 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.864144 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:18.946 30456-30598 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.946066 30598 motion_tracking_context.cc:2211] NOT_FOUND: Failed to find an image with the requested timestamp.
=== Source Location Trace: ===
third_party/redwood/perception/feature_processing/image_buffer.cc:41
third_party/arcore/ar/perception/feature_track_ml_depth_provider.cc:168
2023-07-03 22:03:18.961 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414598.961128 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.057 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.057297 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.158 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.158126 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.257 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.257471 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.358 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.357954 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.457 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.457881 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.557 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.557895 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.658 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.658479 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.763 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.763271 30456 hit_test.cc:428] INTERNAL: No point hit.
2023-07-03 22:03:19.867 30456-30456 native io....iew.sceneview_flutter_example E E0000 00:00:1688414599.867267 30456 hit_test.cc:428] INTERNAL: No point hit.```
ARCore is not installed on your device.
That's why you also need to override the activity
. The ARCore APK installer needs the activity to install. And also the permission check
How can i override activity variable ? I haven't a ComponentActivity property.
class CustomArSceneView(
private val context: Context,
private val a: Activity,
private val l: Lifecycle
) : ArSceneView(context) {
override val lifecycle: Lifecycle
get() = l
override val activity: ComponentActivity
get() = a as ComponentActivity
}
On my physical device (Pixel 2 XL) with ArCore installed, i have a black screen...
@giandifra Have you tried using FlutterFragmentActivity over FlutterActivity to get a ComponentActivity compatible activity? Though I am not sure what @ThomasGorisse means by overriding the activity. I can confirm that I also get a black screen after running all the checks, and opened a discord thread. It would be great if we can figure this out together.
Hello @kvnxiao @giandifra
Any news about this issue?
I'm trying to integrate SceneView's AR into my Flutter application and I do have same issue. Thanks
There are good news, i will release a new working version!
I have this error with
io.github.sceneview:arsceneview:0.10.0
in a basic example with only initialization of ArSceneView.This is the reference branch. I have tested the basic example with emulator and physical device (Pixel 2 XL). Flutter 3.10.5