Viro: ViroReact constantly crashing on Android

Created on 18 Apr 2018  路  6Comments  路  Source: viromedia/viro

I'm just trying to render a 360 Image with Viro on Android. But it is crashing when the render of the image should happen. On iOS everything works fine.

Using latest react-viro on a Samsung Galaxy S8 with latest updates.

Logs:

Error 1

04-18 15:11:27.223 13459-14295/com.vx.vrpresenter W/Viro: [******************************** ABORT ********************************]
04-18 15:11:27.223 13459-14295/com.vx.vrpresenter W/Viro:         File: /Users/manish/workspace/ViroRenderer/ViroRenderer/VROThreadRestricted.cpp
04-18 15:11:27.223 13459-14295/com.vx.vrpresenter W/Viro:         Line: 65
04-18 15:11:27.223 13459-14295/com.vx.vrpresenter W/Viro:     Function: void VROThreadRestricted::passert_thread()
04-18 15:11:27.223 13459-14295/com.vx.vrpresenter W/Viro:       Reason: For object 0xaa4adb1c, current thread [0] does not match object's thread restriction [1]
04-18 15:11:27.223 13459-13459/com.vx.vrpresenter W/unknown:ReactNative: Calling JS function after bridge has been destroyed: RCTEventEmitter.receiveEvent([109,"onPlatformUpdateViro",{"platformInfoViro":{"controller":"screen","headset":"mobile","platform":"scene"}}])
04-18 15:11:27.342 13459-13459/com.vx.vrpresenter V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0

Error 2

I/Viro: Software gamma correction enabled in tone-mapper
04-18 15:00:46.117 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1440, 2960) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
04-18 15:00:46.141 12842-12847/com.vx.vrpresenter I/zygote: Compiler allocated 4MB to compile void android.view.ViewRootImpl.performTraversals()
04-18 15:00:46.172 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2960, 1440) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
04-18 15:00:46.279 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1440, 2960) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
04-18 15:00:46.300 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2960, 1440) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
04-18 15:00:46.311 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1440, 2960) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
04-18 15:00:46.325 12842-13033/com.vx.vrpresenter V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
04-18 15:00:46.325 12842-13033/com.vx.vrpresenter D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000,  [1080x2648]-format:1
04-18 15:00:46.377 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: Relayout returned: old=[0,0][1440,2960] new=[0,0][2960,1440] result=0x23 surface={valid=true 3390275584} changed=false
04-18 15:00:46.379 12842-12878/com.vx.vrpresenter D/OpenGLRenderer: eglDestroySurface = 0xca1307d8
04-18 15:00:46.381 12842-12878/com.vx.vrpresenter D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000,  [2960x1440]-format:1
04-18 15:00:46.381 12842-12878/com.vx.vrpresenter D/OpenGLRenderer: eglCreateWindowSurface = 0xca130ad0
04-18 15:00:46.447 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2960, 1440) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
04-18 15:00:46.449 12842-12842/com.vx.vrpresenter D/receiver: 1
04-18 15:00:46.467 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1440, 2960) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
04-18 15:00:46.478 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2960, 1440) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
04-18 15:00:46.480 12842-12842/com.vx.vrpresenter D/receiver: 2
04-18 15:00:46.481 12842-12842/com.vx.vrpresenter D/receiver: 1
04-18 15:00:46.482 12842-12842/com.vx.vrpresenter D/receiver: 2
04-18 15:00:46.483 12842-12842/com.vx.vrpresenter D/receiver: 1
04-18 15:00:46.496 12842-12842/com.vx.vrpresenter I/AmazonWebServiceClient: {cognito-identity, us-west-2} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'cognito-identity.us-west-2.amazonaws.com'.
04-18 15:00:46.497 12842-12842/com.vx.vrpresenter D/CognitoCachingCredentialsProvider: Loading credentials from SharedPreferences
04-18 15:00:46.522 12842-12842/com.vx.vrpresenter W/Viro: Attempted to add font [file: SECRobotoCondensed-Bold.ttf, typeface: SECRobotoCondensed] to font family with typeface [RobotoCondensed] -- typefaces do not match, font will be ignored
04-18 15:00:46.526 12842-12842/com.vx.vrpresenter W/libOpenSLES: class OutputMix interface 0 requested but unavailable MPH=28

                                                                 [ 04-18 15:00:46.527 12842:12842 D/         ]
                                                                 PlayerBase::PlayerBase()
04-18 15:00:46.527 12842-12842/com.vx.vrpresenter I/libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
04-18 15:00:46.530 12842-12842/com.vx.vrpresenter I/AudioTrack: AUDIO_OUTPUT_FLAG_FAST successful; frameCount 384 -> 384
04-18 15:00:46.530 12842-12842/com.vx.vrpresenter D/AudioTrack: Client defaulted notificationFrames to 192 for frameCount 384
04-18 15:00:46.586 12842-12842/com.vx.vrpresenter I/AudioTrack: This process already got info. FadeIn[0] FadeOut[0] FadeInRing[0]
04-18 15:00:46.603 12842-12842/com.vx.vrpresenter D/ScrollView: initGoToTop
04-18 15:00:46.623 12842-13182/com.vx.vrpresenter I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
04-18 15:00:46.624 12842-13182/com.vx.vrpresenter I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
04-18 15:00:46.631 12842-12842/com.vx.vrpresenter W/unknown:ReactNative: Calling JS function after bridge has been destroyed: RCTEventEmitter.receiveEvent([107,"onPlatformUpdateViro",{"platformInfoViro":{"controller":"screen","headset":"mobile","platform":"scene"}}])
04-18 15:00:46.631 12842-13147/com.vx.vrpresenter W/Viro: [******************************** ABORT ********************************]
04-18 15:00:46.631 12842-13147/com.vx.vrpresenter W/Viro:         File: /Users/manish/workspace/ViroRenderer/ViroRenderer/VROThreadRestricted.cpp
04-18 15:00:46.631 12842-13147/com.vx.vrpresenter W/Viro:         Line: 65
04-18 15:00:46.631 12842-13147/com.vx.vrpresenter W/Viro:     Function: void VROThreadRestricted::passert_thread()
04-18 15:00:46.631 12842-13147/com.vx.vrpresenter W/Viro:       Reason: For object 0xc9a45acc, current thread [0] does not match object's thread restriction [1]
04-18 15:00:46.699 12842-13033/com.vx.vrpresenter V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
04-18 15:00:46.699 12842-13033/com.vx.vrpresenter D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000,  [1080x2648]-format:1
04-18 15:00:46.727 12842-12842/com.vx.vrpresenter D/ViewRootImpl@6daddee[MainActivity]: Relayout returned: old=[0,0][2960,1440] new=[0,0][2960,1440] result=0x1 surface={valid=true 3390275584} changed=false
04-18 15:00:46.728 12842-12878/com.vx.vrpresenter D/OpenGLRenderer: eglDestroySurface = 0xca130ad0
04-18 15:00:46.730 12842-12878/com.vx.vrpresenter D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000,  [2960x1440]-format:1
04-18 15:00:46.730 12842-12878/com.vx.vrpresenter D/OpenGLRenderer: eglCreateWindowSurface = 0xca1308a0
04-18 15:00:46.769 12842-12842/com.vx.vrpresenter V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
04-18 15:00:46.789 12842-13147/com.vx.vrpresenter I/Viro: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Most helpful comment

I faced this same issue and spent quite a lot of time to come around this. Magically after adding android:largeHeap="true" to my AndroidManifest.xml <application> the app doesn't crash anymore and I can view the 360 image.

All 6 comments

Hi @dominicrico ,

We tried to reproduce the issue ourselves with a Viro360Image and were unable to, so we have a few questions:

  1. Can you confirm that you do not see this issue when you remove the Viro360Image component?
  2. Are you using a remote or local image asset? Would you mind sharing the asset? or do you see this issue for all images?
  3. If you create a new project w/ a simple Viro360Image and ViroText component do you still see the issue?

The actual crash you got in the passert_thread() will be downgraded to a warning in our next release, but that could be hiding another crash.

Thanks,

Closing due to inactivity. Please re-open with more information if you are still having issues.

I faced this same issue and spent quite a lot of time to come around this. Magically after adding android:largeHeap="true" to my AndroidManifest.xml <application> the app doesn't crash anymore and I can view the 360 image.

Djpane at which device we can test viroreact can it work with emulator

@shadyo7 You have to run it on a real device.

Running 1_16 on Android Studio 3.4.1 to Samsung 8+ running Android 9.

Large heap fix didn't work for me. I'm getting same error (below) any time the crosshair model from ARRetail tries to update position, rotation, opacity, or geometry. Also fail on hitTest / onClick. I tried running these methods from UI thread and from new Thread(Runnable{ or @WorkerThread but no luck:

W/Viro: For object 0x7320e76938, current thread [0] does not match object's thread restriction [1]. Method: setGeometry
every time

Was this page helpful?
0 / 5 - 0 ratings