Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

CoronaCards crashes on display.safeScreenOriginX and display.safeScreenOriginY
Started by akao Jul 18 2018 02:02 PM

No replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

akao

[GLOBAL: userInfoPane.html]
akao
  • Contributor

  • 372 posts
  • Corona SDK

We are testing CoronaCards for a project. I've only tested this on Android, when the following line in our code:

local safeScreenOriginX = display.safeScreenOriginX

causes the built app to crash. We've tested this using the modified version of the Fishies sample. This is the error we can capture on adb logcat. See my highlight below. Is this a bug? Is there a workaround? 

 

 

07-18 14:53:11.520   624  8419 D msm8974_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map17

07-18 14:53:11.521   624  8419 D msm8974_platform: platform_set_channel_map: set mapping(1 2 0 0 0 0 0 0) for channel:2
07-18 14:53:11.522   624  8419 D audio_hw_primary: start_output_stream: exit
07-18 14:53:11.522   624  8419 W qc_adm  : margin check: adm_request_focus_v2(p) failed diff -48
07-18 14:53:11.522   624  8419 W qc_adm  : margin check: adm_abandon_focus(p) failed diff -48
07-18 14:53:11.534   664   664 I SurfaceFlinger: Display 0 HWC layers:
07-18 14:53:11.534   664   664 I SurfaceFlinger:     type    |    handle    | flag |  format   |   source crop (l,t,r, B)    |         frame       | name 
07-18 14:53:11.534   664   664 I SurfaceFlinger: ------------+--------------+------+-----------+----------------------------+---------------------+------
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client | 0x7e0deab880 | 0000 | RGBA_8888 |   0.0  213.0 1080.0 1728.0 |    0  365 1080 1855 | com.example.app/com.example.app.MainActivity#0
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client | 0x7e0deab080 | 0000 | RGBA_8888 |   0.0  339.0   72.0 1591.0 |    0  361 1080  810 | StatusBar#0
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client | 0x7e0dc4a300 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 2220.0 |    0    0 1080 2220 | ScreenshotSurface#0
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |  -0.4   -0.9   -0.9   -1.0 |    0    0 1080  354 | BlackSurface#0
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |  -0.8   -0.0   -1.0   -0.6 |    0    0  221 2220 | BlackSurface#1
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |  -0.1    0.0   -0.6   -0.1 |    0 1866 1080 2220 | BlackSurface#1
07-18 14:53:11.534   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |   0.0   -0.4   -0.2   -1.
07-18 14:53:11.534   664   664 I SurfaceFlinger: 0 |  859    0 1080 2220 | BlackSurface#1
07-18 14:53:11.534   664   664 I SurfaceFlinger: 
07-18 14:53:11.541   664   664 I SurfaceFlinger: Display 0 HWC layers:
07-18 14:53:11.541   664   664 I SurfaceFlinger:     type    |    handle    | flag |  format   |   source crop (l,t,r, B)    |         frame       | name 
07-18 14:53:11.541   664   664 I SurfaceFlinger: ------------+--------------+------+-----------+----------------------------+---------------------+------
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client | 0x7e0deab880 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 1920.0 |    0  133 1080 2074 | com.example.app/com.example.app.MainActivity#0
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client | 0x7e0deab080 | 0000 | RGBA_8888 |   0.0   93.0   72.0 1672.0 |    0  108 1080 1015 | StatusBar#0
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client | 0x7e0df8ff00 | 0000 | RGBA_8888 |   0.0    0.0  779.0   52.0 | 1067 1423 1080 2111 | NavigationBar#0
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client | 0x7e0dc4a300 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 2220.0 |    0    0 1080 2220 | ScreenshotSurface#0
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |  -0.4   -0.8   -0.8   -1.0 |    0    0 1080  742 | BlackSurface#0
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |  -0.8   -0.0   -1.0   -0.6 |    0    0  394 2220 | BlackSurface#1
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |  -0.2    0.0   -0.6   -0
07-18 14:53:11.541   664   664 I SurfaceFlinger: .2 |    0 1478 1080 2220 | BlackSurface#1
07-18 14:53:11.541   664   664 I SurfaceFlinger:      Client |              | 0000 |  Unknown  |   0.0   -0.4   -0.2   -1.0 |  686    0 1080 2220 | BlackSurface#1
07-18 14:53:11.541   664   664 I SurfaceFlinger: 
07-18 14:53:11.543   963  1461 I AudioMixer: create resampler src 44100, 2, dst 48000, 2, q 8
07-18 14:53:11.543   963  1461 D SoundAliveResampler: [SoundAliveResampler] Init+++
07-18 14:53:11.546  1476  1485 I zygote64: Background concurrent copying GC freed 576950(21MB) AllocSpace objects, 52(1456KB) LOS objects, 30% free, 54MB/78MB, paused 416us total 258.944ms
07-18 14:53:11.555  1476  1498 D WindowManager: set systemUiVisibility : systemUiFlags= 0x8 fullscreenStackSysUiFlags= 0x80000000
07-18 14:53:11.556  1476  3641 D InputDispatcher: Focus left window: 8852
07-18 14:53:11.556  1476  3641 D InputDispatcher: Focus entered window: 8852
07-18 14:53:11.557  8852  8852 D ViewRootImpl@9267140[MainActivity]: setView = DecorView@35fe879[] TM=true MM=false
07-18 14:53:11.564  8852  8852 D ViewRootImpl@9267140[MainActivity]: dispatchAttachedToWindow
07-18 14:53:11.578  8852  8857 I zygote  : Do partial code cache collection, code=21KB, data=30KB
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504] JNI DETECTED ERROR IN APPLICATION: JNI GetArrayLength called with pending exception java.lang.NullPointerException: Attempt to invoke interface method 'com.ansca.corona.CoronaStatusBarSettings com.ansca.corona.listeners.CoronaStatusBarApiListener.getStatusBarMode()' on a null object reference
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at float[] com.ansca.corona.NativeToJavaBridge.callGetSafeAreaInsetPixels(com.ansca.corona.CoronaRuntime) (NativeToJavaBridge.java:1708)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at void com.ansca.corona.JavaToNativeShim.nativeResize(long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int, int, boolean) (JavaToNativeShim.java:-2)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at void com.ansca.corona.JavaToNativeShim.resize(com.ansca.corona.CoronaRuntime, android.content.Context, int, int, com.ansca.corona.WindowOrientation, boolean) (JavaToNativeShim.java:394)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at void com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(javax.microedition.khronos.opengles.GL10, int, int) (CoronaGLSurfaceView.java:382)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at void com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun() (GLSurfaceView.java:1612)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at void com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run() (GLSurfaceView.java:1378)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504] 
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]     in call to GetArrayLength
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]     from void com.ansca.corona.JavaToNativeShim.nativeResize(long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, int, int, boolean)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504] "GLThread 3485" prio=5 tid=14 Runnable
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   | group="main" sCount=0 dsCount=0 flags=0 obj=0x13c01ce8 self=0xd6f7c600
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   | sysTid=8913 nice=0 cgrp=default sched=0/0 handle=0xca881970
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   | state=R schedstat=( 161520105 56681193 150 ) utm=14 stm=2 core=6 HZ=100
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   | stack=0xca77f000-0xca781000 stackSize=1038KB
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   | held mutexes= "mutator lock"(shared held)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #00 pc 002c521f  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+130)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #01 pc 00356cd1  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb+200)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #02 pc 003531a3  /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb+34)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #03 pc 002306cd  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+736)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #04 pc 00230ac3  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+58)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #05 pc 000d2caf  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+46)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #06 pc 000d2847  /system/lib/libart.so (_ZN3art11ScopedCheck11CheckThreadEP7_JNIEnv+354)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #07 pc 000d1045  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+604)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #08 pc 000ca167  /system/lib/libart.so (_ZN3art8CheckJNI14GetArrayLengthEP7_JNIEnvP7_jarray+450)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #09 pc 0003293c  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #10 pc 000a951c  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #11 pc 0000cc1c  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #12 pc 0001ce30  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #13 pc 0000d068  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #14 pc 0001b7c0  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #15 pc 0001bd58  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #16 pc 0001d050  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #17 pc 0000d068  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #18 pc 0000c374  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #19 pc 0000d1e0  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #20 pc 000055b8  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/liblua.so (lua_pcall+88)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #21 pc 00107ac4  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #22 pc 00140cb0  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #23 pc 00142d30  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #24 pc 001411a0  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #25 pc 00141f5c  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #26 pc 0002bdc8  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/lib/arm/libcorona.so (???)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   native: #27 pc 0000250f  /data/app/com.example.app-uRP_Ng6YEhHOcAARpV3vQQ==/oat/arm/base.odex (Java_com_ansca_corona_JavaToNativeShim_nativeResize__JLjava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2IIIZ+318)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at com.ansca.corona.JavaToNativeShim.nativeResize(Native method)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:394)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:382)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1612)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504]   at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378)
07-18 14:53:11.582  8852  8913 F zygote  : java_vm_ext.cc:504] 
07-18 14:53:11.582  8852  8857 I zygote  : After code cache collection, code=20KB, data=29KB
07-18 14:53:11.582  8852  8857 I zygote  : Increasing code cache capacity to 128KB
07-18 14:53:11.602  1476  5888 V WindowManager: Relayout Window{b259d2c u0 com.example.app/com.example.app.MainActivity}: viewVisibility=0 req=1248x567 WM.LayoutParams{(0,0)(wrapxwrap) gr=#11 sim=#120 ty=2 fl=#1820002 pfl=0x1000000 fmt=-3 wanim=0x10302fe vsysui=0x10 surfaceInsets=Rect(96, 96 - 96, 96) needsMenuKey=2 colorMode=0 naviIconColor=0}
07-18 14:53:11.609   664   664 D SurfaceFlinger: duplicate layer name: changing com.example.app/com.example.app.MainActivity to com.example.app/com.example.app.MainActivity#1
07-18 14:53:11.609   664   664 I SurfaceFlinger: id=2884 createSurf (1440x759),1 flag=4, com.example.app/com.example.app.MainActivity#1
07-18 14:53:11.610  1476  5888 V Surface : sf_framedrop debug : 0x4f4c, game : true, logging : 0
07-18 14:53:11.614  1476  3641 D WindowManager: adjustSystemUiVisibilityLw : vis= 0x8
07-18 14:53:11.615  1476  1497 D GamePkgDataHelper: getGamePkgData(). com.example.app
 

 

Test code, which is a slightly modified version of the Fishies sample is attached.

 

https://www.dropbox.com/s/z6pidg0zjqs7zmp/sample-android-ChildView-master.zip?dl=0




[topic_controls]
[/topic_controls]