This application failed to load and execute main.lua

System :Win10

Build:3366 && 3326

Android Studio 3.13

 

At first I can build my app several times. Suddenly it crashed.  This is the logs:

 

09-12 14:44:27.447 2168-2168/? D/PhoneStatusBar: disable: 0x00000200 -> 0x00000300 (diff: 0x00000100)

    disable: < expand icons alerts ticker system_info back home recent clock full HIDE* keyguard none float >

    showStatusBar isshow=false;delay=false

09-12 14:44:27.450 4947-4974/com.lemonjamstudio.themightyhero.lemonjam I/Adreno: PFP: 0x005ff087, ME: 0x005ff063

09-12 14:44:27.454 4947-4974/com.lemonjamstudio.themightyhero.lemonjam I/OpenGLRenderer: Initialized EGL, version 1.4

09-12 14:44:27.454 4947-4974/com.lemonjamstudio.themightyhero.lemonjam D/OpenGLRenderer: Swap behavior 2

09-12 14:44:27.469 4947-4969/com.lemonjamstudio.themightyhero.lemonjam E/libc: Access denied finding property “ro.opengles.version”

09-12 14:44:27.469 4947-4969/com.lemonjamstudio.themightyhero.lemonjam V/GLSurfaceView: glGetString(7937) returns Adreno ™ 540;

09-12 14:44:27.493 4947-4974/com.lemonjamstudio.themightyhero.lemonjam I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/hw/gralloc.msm8998.so from the current namespace instead.

09-12 14:44:27.514 4947-4969/com.lemonjamstudio.themightyhero.lemonjam I/Corona: This application failed to load and execute main.lua

    

    --------- beginning of crash

09-12 14:44:27.515 4947-4969/com.lemonjamstudio.themightyhero.lemonjam A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 4969 (GLThread 11289)

09-12 14:44:27.530 1544-1654/? I/ActivityManager: Displayed com.lemonjamstudio.themightyhero.lemonjam/plugin.library.MainActivity: +465ms

09-12 14:44:27.530 1544-1654/? E/ANDR-PERF-JNI: com_qualcomm_qtiperformance_native_perf_io_prefetch_start

09-12 14:44:27.531 753-753/? E/ANDR-IOP: IOP HAL: Received pkg_name = com.lemonjamstudio.themightyhero.lemonjam pid = 4947

    event data pool ran empty

09-12 14:44:27.558 4983-4983/? I/crash_dump32: obtaining output fd from tombstoned

09-12 14:44:27.558 969-969/? I//system/bin/tombstoned: received crash request for pid 4947

09-12 14:44:27.560 4983-4983/? I/crash_dump32: performing dump of process 4947 (target tid = 4969)

09-12 14:44:27.560 4983-4983/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

09-12 14:44:27.561 4983-4983/? A/DEBUG: Build fingerprint: ‘Xiaomi/sagit/sagit:8.0.0/OPR1.170623.027/V9.6.3.0.OCACNFD:user/release-keys’

    Revision: ‘0’

    ABI: ‘arm’

    pid: 4947, tid: 4969, name: GLThread 11289  >>> com.lemonjamstudio.themightyhero.lemonjam <<<

    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8

    Cause: null pointer dereference

        r0 00000000  r1 d447ea4c  r2 00000000  r3 d471ba04

        r4 d3eb7630  r5 00000002  r6 00000000  r7 d447ed20

        r8 00000056  r9 e30e5e00  sl 00000000  fp d447eabc

        ip d46b1750  sp d447ea10  lr d471ba14  pc d47d03e4  cpsr 600f0010

    backtrace:

        #00 pc 0014e3e4  /data/app/com.lemonjamstudio.themightyhero.lemonjam-PuX2dQSoAIbSKQBQuwjOGA==/lib/arm/libcorona.so

        #01 pc 00099a10  /data/app/com.lemonjamstudio.themightyhero.lemonjam-PuX2dQSoAIbSKQBQuwjOGA==/lib/arm/libcorona.so

        #02 pc 00142758  /data/app/com.lemonjamstudio.themightyhero.lemonjam-PuX2dQSoAIbSKQBQuwjOGA==/lib/arm/libcorona.so

        #03 pc 0002ca10  /data/app/com.lemonjamstudio.themightyhero.lemonjam-PuX2dQSoAIbSKQBQuwjOGA==/lib/arm/libcorona.so

        #04 pc 0001138f  /data/app/com.lemonjamstudio.themightyhero.lemonjam-PuX2dQSoAIbSKQBQuwjOGA==/oat/arm/base.odex (offset 0xf000)

09-12 14:44:27.951 955-2490/? I/LocSvc_ApiV02: <— globalEventCb line 115 QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02

    [SvMeas] SeqNum: 1, MaxMsgNum: 4, MeasValid: 1, #of SV: 1

09-12 14:44:27.952 955-2490/? I/LocSvc_ApiV02: <— globalEventCb line 115 QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02

    [SvMeas] SeqNum: 2, MaxMsgNum: 4, MeasValid: 0, #of SV: 0

09-12 14:44:27.952 955-2490/? E/LocSvc_ApiV02: reportGnssMeasurementData:3522]: there is no valid SV measurements

    reportGnssMeasurementData:3541]: There is no GNSS measurement.

09-12 14:44:27.952 955-2490/? I/LocSvc_ApiV02: <— globalEventCb line 115 QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02

    [SvMeas] SeqNum: 3, MaxMsgNum: 4, MeasValid: 1, #of SV: 1

    <— globalEventCb line 115 QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02

    [SvMeas] SeqNum: 4, MaxMsgNum: 4, MeasValid: 0, #of SV: 0

09-12 14:44:27.952 955-2490/? E/LocSvc_ApiV02: reportGnssMeasurementData:3522]: there is no valid SV measurements

    reportGnssMeasurementData:3541]: There is no GNSS measurement.

09-12 14:44:27.952 955-2490/? I/LocSvc_ApiV02: <— globalEventCb line 115 QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02

09-12 14:44:27.952 955-3587/? I/LocSvc_libulp: ulp_brain_process_gnss_sv_report, gnss sv report cnt = 71976, gnss pos report cnt = 44729,strong sv cnt = 0

09-12 14:44:27.953 955-2490/? I/LocSvc_ApiV02: <— globalEventCb line 115 QMI_LOC_EVENT_POSITION_REPORT_IND_V02

09-12 14:44:27.953 955-3587/? I/LocSvc_libulp: ulp_brain_process_gnss_position_report, transition provider returned = 0

    ulp_brain_process_gnss_position_report, report GNSS position/status to hybrid fix requests = 0

09-12 14:44:28.099 4983-4983/? E/crash_dump32: cannot open libmiuindbg.so: No such file or directory

09-12 14:44:28.101 969-969/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_03

09-12 14:44:28.101 3321-3452/? I/WtProcessController: Receive am_crash event for pid: 1544 pkg = com.lemonjamstudio.themightyhero.lemonjam

09-12 14:44:28.102 1544-4986/? W/ActivityManager:   Force finishing activity com.lemonjamstudio.themightyhero.lemonjam/plugin.library.MainActivity

09-12 14:44:28.104 2645-2690/? I/octvm_klo: get event file: /data/tombstones/tombstone_03

    klo lock

 

Who can help me?

Are you doing native builds or simulator builds?

Is there a resource.car file in your folder with your main.lua?

Rob

I’m having similar problem with my android app too.  Once I open the app, i display the Corona splashscreen and it crash immediately.

Is there any update on this issue?

I’m doing a corona native build

(fillxfill) sim=#22 ty=1 fl=#1810700 pfl=0x20000 fmt=-3 wanim=0x1030001 vsysui=0x400 needsMenuKey=2 colorMode=0 naviIconColor=0}

10-18 14:54:06.924  3668  4362 E Watchdog: !@Sync 4431 [2018-10-18 14:54:06.924]

10-18 14:54:06.925 15970 15970 D ViewRootImpl@f495c30[CoronaActivity]: Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x3 surface={valid=true 3628480512} changed=false

10-18 14:54:06.927  3668  4405 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 1334851584, maxLowBytes : 524288000

10-18 14:54:06.930  3668  5003 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 1334851584, maxLowBytes : 524288000

10-18 14:54:06.946 15970 15987 I Corona  : This application failed to load and execute main.lua

--------- beginning of crash

10-18 14:54:06.951 15970 15987 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 15987 (GLThread 4659)

10-18 14:54:06.979  3668  4405 V WindowManager: finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING Window{e66440c u0 com.nexsoft.tamjai/com.ansca.corona.CoronaActivity} in Surface(name=com.nexsoft.tamjai/com.ansca.corona.CoronaActivity)

10-18 14:54:06.983  3668  3781 D ViewRootImpl@c9a1844[tamjai]: dispatchDetachedFromWindow

10-18 14:54:06.983  3668  3781 D InputEventReceiver: channel ‘9993d2d Splash Screen com.nexsoft.tamjai (client)’ ~ Disposing input event receiver.

10-18 14:54:06.984  3668  3781 D InputEventReceiver: channel ‘9993d2d Splash Screen com.nexsoft.tamjai (client)’ ~NativeInputEventReceiver.

10-18 14:54:06.988  3668  3707 I ActivityManager: Displayed com.nexsoft.tamjai/com.ansca.corona.CoronaActivity: +592ms

10-18 14:54:06.989  3668  3707 D CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1768000  uid : 1000  pid : 3668  pkgName : AMS_RESUME_TAIL@CPU_MIN@64

10-18 14:54:06.989  3668  3707 D ActivityManagerPerformance: AMP_acquire() TAIL

10-18 14:54:06.989  3668  3707 D CustomFrequencyManagerService: FrequencyrequestList.getNextSchedTunePolicyRequest, index: 3

10-18 14:54:06.989  3668  3707 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 2600000  uid : 1000  pid : 3668  tag : AMS_APP_SWITCH@CPU_MIN@58

10-18 14:54:06.989  3668  3707 D ActivityManagerPerformance: AMP_release() APP_SWITCH

10-18 14:54:07.002  3668  3781 I WindowManager: Destroying surface Surface(name=Splash Screen com.nexsoft.tamjai) called by com.android.server.wm.WindowStateAnimator.destroySurface:2501 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:985 com.android.server.wm.WindowState.destroyOrSaveSurfaceUnchecked:3680 com.android.server.wm.WindowState.destroySurface:3628 com.android.server.wm.AppWindowToken.destroySurfaces:722 com.android.server.wm.AppWindowToken.destroySurfaces:706 com.android.server.wm.WindowState.onExitAnimationDone:5335 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:550 

10-18 14:54:07.002  3202  5199 I SurfaceFlinger: id=5063 Removed Splash Screen com.nexsoft.tamjai#0 (3/5)

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:   Display[0] configurations (* current):

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:     * 0: 1440x2560, xdpi=580.570984, ydpi=575.432983, refresh=16949152

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:   numHwLayers=2, flags=00000000

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:     type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name 

10-18 14:54:07.004  3202  3202 D SurfaceFlinger: -----------±---------±-----±-----±—±-----±------------±-------------------------------±-----------------------±-----

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:        HWC | 7e68b3d0c0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0,  720.0, 1280.0 |    0,    0,  720, 1280 | com.nexsoft.tamjai/com.ansca.corona.CoronaActivity#0

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:  FB TARGET | 7e68df5d80 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1440.0, 2560.0 |    0,    0, 1440, 2560 | HWC_FRAMEBUFFER_TARGET

10-18 14:54:07.007  3202  5198 I SurfaceFlinger: id=5063 Removed Splash Screen com.nexsoft.tamjai#0 (-2/5)

10-18 14:54:07.018  3202  3202 I Layer   : id=5063 onRemoved Splash Screen com.nexsoft.tamjai#0 

10-18 14:54:07.052 16009 16009 I crash_dump32: obtaining output fd from tombstoned

10-18 14:54:07.056  3348  3348 I /system/bin/tombstoned: received crash request for pid 15970

10-18 14:54:07.059 16009 16009 I crash_dump32: performing dump of process 15970 (target tid = 15987)

10-18 14:54:07.060 16009 16009 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

10-18 14:54:07.060 16009 16009 F DEBUG   : Build fingerprint: ‘samsung/heroltexx/herolte:8.0.0/R16NW/G930FXXU2ERGE:user/release-keys’

10-18 14:54:07.060 16009 16009 F DEBUG   : Revision: ‘8’

10-18 14:54:07.060 16009 16009 F DEBUG   : ABI: ‘arm’

10-18 14:54:07.060 16009 16009 F DEBUG   : pid: 15970, tid: 15987, name: GLThread 4659  >>> com.nexsoft.tamjai <<<

10-18 14:54:07.060 16009 16009 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8

10-18 14:54:07.060 16009 16009 F DEBUG   : Cause: null pointer dereference

10-18 14:54:07.060 16009 16009 F DEBUG   :     r0 00000000  r1 ca1bea3c  r2 00000000  r3 ca259c5c

10-18 14:54:07.060 16009 16009 F DEBUG   :     r4 d85e5970  r5 00000002  r6 00000000  r7 ca1bed10

10-18 14:54:07.060 16009 16009 F DEBUG   :     r8 00000056  r9 db7f8200  sl 00000000  fp ca1beaac

10-18 14:54:07.060 16009 16009 F DEBUG   :     ip ca1ef750  sp ca1bea00  lr ca259c6c  pc ca30e63c  cpsr 600d0010

10-18 14:54:07.061 16009 16009 F DEBUG   : 

10-18 14:54:07.061 16009 16009 F DEBUG   : backtrace:

10-18 14:54:07.061 16009 16009 F DEBUG   :     #00 pc 0014e63c  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #01 pc 00099c68  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #02 pc 001429b0  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #03 pc 0002ca10  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #04 pc 0004711f  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/oat/arm/base.odex (offset 0x3c000)

10-18 14:54:07.289  3668  3668 D CustomFrequencyManagerService: FrequencyrequestList.getNextCStateDisableRequest, index: 4

10-18 14:54:07.289  3668  3668 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1768000  uid : 1000  pid : 3668  tag : AMS_RESUME_TAIL@CPU_MIN@64

10-18 14:54:07.300  4259  4489 D NetworkController.MobileSignalController(0/4): onDataActivity: direction=0

10-18 14:54:07.301  4259  4259 E SignalClusterView: setSlotFocusVisible : subId 4

10-18 14:54:07.483  3668  5003 D GameManagerService: identifyGamePackage. com.nexsoft.tamjai

10-18 14:54:07.483  3668  5003 D GamePkgDataHelper: getGamePkgData(). com.nexsoft.tamjai

10-18 14:54:07.863  3668  3734 D PersonaManagerService: getKeyguardShowState of user: 150

10-18 14:54:07.988  3668  3734 D PersonaManagerService: getKeyguardShowState of user: 150

10-18 14:54:08.041  4498 13022 I EventLogSendingHelper: Sending log events.

10-18 14:54:08.049  4498  4498 I WorkerManager: dispose()

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [legacyui] (manager: c9816cc, handler: c39d85e)

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [networkmonitor] (manager: c9816cc, handler: 738cf09)

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [logo_header] (manager: c9816cc, handler: 929157d)

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [screensearch] (manager: c9816cc, handler: f93ea20)

10-18 14:54:08.051  4498  4498 I WorkerManager: Disposing handler for worker [optin] (manager: c9816cc, handler: 72564f0)

10-18 14:54:08.051  4498  4498 I WorkerManager: Disposing handler for worker [sharebear] (manager: c9816cc, handler: d57ae52)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [searchplate] (manager: c9816cc, handler: b3a610c)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [sharedmicrodetection] (manager: c9816cc, handler: fa554d3)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [corpus] (manager: c9816cc, handler: dc65928)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [message] (manager: c9816cc, handler: 9b281f8)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [gcm] (manager: c9816cc, handler: 145787e)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [service] (manager: c9816cc, handler: 17c0d15)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [backgroundtask] (manager: c9816cc, handler: ea4432a)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [context] (manager: c9816cc, handler: f329536)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [searchboxroot] (manager: c9816cc, handler: 3a79361)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [progress] (manager: c9816cc, handler: 69216b4)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [audio] (manager: c9816cc, handler: c666b2f)

10-18 14:54:08.054  4498  4498 I WorkerManager: Disposing handler for worker [actions] (manager: c9816cc, handler: 90cfd12)

10-18 14:54:08.054  3348  3348 E /system/bin/tombstoned: Tombstone written to: /data/

Can you try and clean the project?

If that doesn’t work, create a new project with the latest App template and migrate to it.

Rob

I can make a new thread for this issue with more detail as to my steps if you’d like, but I’m encountering this same issue while transitioning an old Corona Enterprise project to Corona Native.

Per troubleshooting steps from this thread, I was able to get the template project running once, but subsequent builds always yield the “failed to load and execute main.lua” error.  A clean prior to running again fixes the issue for that build, but incremental builds do not work.

I’m on MacOS Mojave 10.14.1 and have tried with the latest public release and daily builds.  Figuring out this issue with the template project will hopefully help with the issue I’m facing in transitioning my project.

Any ideas?

I found this excerpt from the docs, which appears to be the issue I’m facing based on the following build output from gradle.  The weird thing is that I still receive the same build error when doing a clean build, yet it does not fail to load main.lua.  Is there something wrong with my Corona account or the installation of Corona?  Each time I switched from the public release to the daily build, I ran “Setup Corona Native.app” and verified that the symbolic link is in the reported location.

Insights about this issue would be greatly appreciated, as I thought that the template project would work without issue and help me root out of the cause for it to occur in my project, but I’m left a bit more confused now.

The certifyBuild task digitally signs libcorona.so (inside app/src/main/jniLibs) with a fingerprint generated from the resources.car file. Without this task, the Corona application will fail to start on the device and yield a message about not being able to find/load main.lua.

== certifyBuild == warning: CoronaBuilder: Splash Screen Control plugin not found for user 'myEmailAddress' - if you want to customize the splash screen you can get it here: https://marketplace.coronalabs.com/plugin/splash-screen-control app\_sign: failed to replace signature \*\*\* (ReplaceSignature) 7480960d9e44885319a1aa686c2491b0 /Volumes/Data/git/TestApp/android/app/src/main/assets/resource.car Replacing signature... done. 7480960d9e44885319a1aa686c2491b0 /Volumes/Data/git/TestApp/android/app/src/main/assets/resource.car

Make sure to disable instant builds and to perform clean build (Build -> Clean or Build -> Rebuild).

@vlads, Thanks for the suggestion!

I do have instant run disabled, and as I stated, a clean build does yield a runnable build for the template project, however my issue is that all subsequent incremental builds fail to run on the device with the aforementioned error.  I should be able to do an incremental build without issue, right?  I do not have luck with clean builds from my old Corona Enterprise project, however, and I believe that to possibly be related to why the incrementals are not working with the template project.

The old enterprise project includes libcorona.so during the ndkBuild per the Android.mk file to use some headers it provides for use in C++ code.  Because of this, the libcorona.so file gets copied to the build intermediates and gets signed there, prior to being packaged up within the apk.  There are no issues in this process using Corona Enterprise build 2016.2942.  While this may not be a direct translation to what occurs during an incremental build of the template project, I believe resolving that issue (and the resultant improved understanding of the libcorona.so signing process) would aid in resolving the issue with transitioning the old enterprise project.

Is there a way to get incrementals to work with the template project, or do you have any clues about what may be going wrong with the enterprise project I’m moving to native?

Alright, so I managed to shuffle my build process around a bit to make it work correctly.  I already had some of these steps correct, but here’s what I did for anyone else who may find themselves in a similar boat:

  • Made sure that libcorona.so was being deleted from both jniLibs and “$projectDir/build/intermediates/jniLibs/” + getCurrentFlavor() + “/armeabi-v7a/libcorona.so” (we only build for armeabi-v7a currently, so if you build other ABIs, make sure you remove those too)
    • I’m not sure why the build process wasn’t automatically picking up the new libcorona.so in jniLibs, and thus not copying it back into the build intermediates after signing.  It could be because I’m on an older gradle and ndk version.  I’ll update this post for others who may encounter the issue if I later find that this isn’t necessary after updating to the latest for both.
  • Removed libcorona.so inclusion from Android.mk
    • It appears that while this project previously used headers from libcorona.so in c++, it no longer does, so the Android.mk inclusion was unnecessary.
  • Ran the certifyBuild task prior to the ndkBuild running, so that it pulls in the signed jniLibs/libcorona.so

After that, I had to add the _corona_splash_screen.png from the template project to /res/drawable, per the docs on the splash screen with native builds until I purchase the splash screen plugin to remove it.  I also had to update my call to the open function for sqlite3 as the library now has a new way of passing in open flags from the old version we were working with.

With all of those completed, I’ve been able to do both clean and incremental builds and run my original project without issue so far.

I’m now running with Corona Native instead of Enterprise!  :slight_smile:

Are you doing native builds or simulator builds?

Is there a resource.car file in your folder with your main.lua?

Rob

I’m having similar problem with my android app too.  Once I open the app, i display the Corona splashscreen and it crash immediately.

Is there any update on this issue?

I’m doing a corona native build

(fillxfill) sim=#22 ty=1 fl=#1810700 pfl=0x20000 fmt=-3 wanim=0x1030001 vsysui=0x400 needsMenuKey=2 colorMode=0 naviIconColor=0}

10-18 14:54:06.924  3668  4362 E Watchdog: !@Sync 4431 [2018-10-18 14:54:06.924]

10-18 14:54:06.925 15970 15970 D ViewRootImpl@f495c30[CoronaActivity]: Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x3 surface={valid=true 3628480512} changed=false

10-18 14:54:06.927  3668  4405 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 1334851584, maxLowBytes : 524288000

10-18 14:54:06.930  3668  5003 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 1334851584, maxLowBytes : 524288000

10-18 14:54:06.946 15970 15987 I Corona  : This application failed to load and execute main.lua

--------- beginning of crash

10-18 14:54:06.951 15970 15987 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 15987 (GLThread 4659)

10-18 14:54:06.979  3668  4405 V WindowManager: finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING Window{e66440c u0 com.nexsoft.tamjai/com.ansca.corona.CoronaActivity} in Surface(name=com.nexsoft.tamjai/com.ansca.corona.CoronaActivity)

10-18 14:54:06.983  3668  3781 D ViewRootImpl@c9a1844[tamjai]: dispatchDetachedFromWindow

10-18 14:54:06.983  3668  3781 D InputEventReceiver: channel ‘9993d2d Splash Screen com.nexsoft.tamjai (client)’ ~ Disposing input event receiver.

10-18 14:54:06.984  3668  3781 D InputEventReceiver: channel ‘9993d2d Splash Screen com.nexsoft.tamjai (client)’ ~NativeInputEventReceiver.

10-18 14:54:06.988  3668  3707 I ActivityManager: Displayed com.nexsoft.tamjai/com.ansca.corona.CoronaActivity: +592ms

10-18 14:54:06.989  3668  3707 D CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1768000  uid : 1000  pid : 3668  pkgName : AMS_RESUME_TAIL@CPU_MIN@64

10-18 14:54:06.989  3668  3707 D ActivityManagerPerformance: AMP_acquire() TAIL

10-18 14:54:06.989  3668  3707 D CustomFrequencyManagerService: FrequencyrequestList.getNextSchedTunePolicyRequest, index: 3

10-18 14:54:06.989  3668  3707 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 2600000  uid : 1000  pid : 3668  tag : AMS_APP_SWITCH@CPU_MIN@58

10-18 14:54:06.989  3668  3707 D ActivityManagerPerformance: AMP_release() APP_SWITCH

10-18 14:54:07.002  3668  3781 I WindowManager: Destroying surface Surface(name=Splash Screen com.nexsoft.tamjai) called by com.android.server.wm.WindowStateAnimator.destroySurface:2501 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:985 com.android.server.wm.WindowState.destroyOrSaveSurfaceUnchecked:3680 com.android.server.wm.WindowState.destroySurface:3628 com.android.server.wm.AppWindowToken.destroySurfaces:722 com.android.server.wm.AppWindowToken.destroySurfaces:706 com.android.server.wm.WindowState.onExitAnimationDone:5335 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:550 

10-18 14:54:07.002  3202  5199 I SurfaceFlinger: id=5063 Removed Splash Screen com.nexsoft.tamjai#0 (3/5)

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:   Display[0] configurations (* current):

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:     * 0: 1440x2560, xdpi=580.570984, ydpi=575.432983, refresh=16949152

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:   numHwLayers=2, flags=00000000

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:     type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name 

10-18 14:54:07.004  3202  3202 D SurfaceFlinger: -----------±---------±-----±-----±—±-----±------------±-------------------------------±-----------------------±-----

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:        HWC | 7e68b3d0c0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0,  720.0, 1280.0 |    0,    0,  720, 1280 | com.nexsoft.tamjai/com.ansca.corona.CoronaActivity#0

10-18 14:54:07.004  3202  3202 D SurfaceFlinger:  FB TARGET | 7e68df5d80 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1440.0, 2560.0 |    0,    0, 1440, 2560 | HWC_FRAMEBUFFER_TARGET

10-18 14:54:07.007  3202  5198 I SurfaceFlinger: id=5063 Removed Splash Screen com.nexsoft.tamjai#0 (-2/5)

10-18 14:54:07.018  3202  3202 I Layer   : id=5063 onRemoved Splash Screen com.nexsoft.tamjai#0 

10-18 14:54:07.052 16009 16009 I crash_dump32: obtaining output fd from tombstoned

10-18 14:54:07.056  3348  3348 I /system/bin/tombstoned: received crash request for pid 15970

10-18 14:54:07.059 16009 16009 I crash_dump32: performing dump of process 15970 (target tid = 15987)

10-18 14:54:07.060 16009 16009 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

10-18 14:54:07.060 16009 16009 F DEBUG   : Build fingerprint: ‘samsung/heroltexx/herolte:8.0.0/R16NW/G930FXXU2ERGE:user/release-keys’

10-18 14:54:07.060 16009 16009 F DEBUG   : Revision: ‘8’

10-18 14:54:07.060 16009 16009 F DEBUG   : ABI: ‘arm’

10-18 14:54:07.060 16009 16009 F DEBUG   : pid: 15970, tid: 15987, name: GLThread 4659  >>> com.nexsoft.tamjai <<<

10-18 14:54:07.060 16009 16009 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8

10-18 14:54:07.060 16009 16009 F DEBUG   : Cause: null pointer dereference

10-18 14:54:07.060 16009 16009 F DEBUG   :     r0 00000000  r1 ca1bea3c  r2 00000000  r3 ca259c5c

10-18 14:54:07.060 16009 16009 F DEBUG   :     r4 d85e5970  r5 00000002  r6 00000000  r7 ca1bed10

10-18 14:54:07.060 16009 16009 F DEBUG   :     r8 00000056  r9 db7f8200  sl 00000000  fp ca1beaac

10-18 14:54:07.060 16009 16009 F DEBUG   :     ip ca1ef750  sp ca1bea00  lr ca259c6c  pc ca30e63c  cpsr 600d0010

10-18 14:54:07.061 16009 16009 F DEBUG   : 

10-18 14:54:07.061 16009 16009 F DEBUG   : backtrace:

10-18 14:54:07.061 16009 16009 F DEBUG   :     #00 pc 0014e63c  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #01 pc 00099c68  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #02 pc 001429b0  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #03 pc 0002ca10  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/lib/arm/libcorona.so

10-18 14:54:07.062 16009 16009 F DEBUG   :     #04 pc 0004711f  /data/app/com.nexsoft.tamjai-82_s5I_KB9pmHyvitaNQtg==/oat/arm/base.odex (offset 0x3c000)

10-18 14:54:07.289  3668  3668 D CustomFrequencyManagerService: FrequencyrequestList.getNextCStateDisableRequest, index: 4

10-18 14:54:07.289  3668  3668 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1768000  uid : 1000  pid : 3668  tag : AMS_RESUME_TAIL@CPU_MIN@64

10-18 14:54:07.300  4259  4489 D NetworkController.MobileSignalController(0/4): onDataActivity: direction=0

10-18 14:54:07.301  4259  4259 E SignalClusterView: setSlotFocusVisible : subId 4

10-18 14:54:07.483  3668  5003 D GameManagerService: identifyGamePackage. com.nexsoft.tamjai

10-18 14:54:07.483  3668  5003 D GamePkgDataHelper: getGamePkgData(). com.nexsoft.tamjai

10-18 14:54:07.863  3668  3734 D PersonaManagerService: getKeyguardShowState of user: 150

10-18 14:54:07.988  3668  3734 D PersonaManagerService: getKeyguardShowState of user: 150

10-18 14:54:08.041  4498 13022 I EventLogSendingHelper: Sending log events.

10-18 14:54:08.049  4498  4498 I WorkerManager: dispose()

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [legacyui] (manager: c9816cc, handler: c39d85e)

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [networkmonitor] (manager: c9816cc, handler: 738cf09)

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [logo_header] (manager: c9816cc, handler: 929157d)

10-18 14:54:08.050  4498  4498 I WorkerManager: Disposing handler for worker [screensearch] (manager: c9816cc, handler: f93ea20)

10-18 14:54:08.051  4498  4498 I WorkerManager: Disposing handler for worker [optin] (manager: c9816cc, handler: 72564f0)

10-18 14:54:08.051  4498  4498 I WorkerManager: Disposing handler for worker [sharebear] (manager: c9816cc, handler: d57ae52)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [searchplate] (manager: c9816cc, handler: b3a610c)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [sharedmicrodetection] (manager: c9816cc, handler: fa554d3)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [corpus] (manager: c9816cc, handler: dc65928)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [message] (manager: c9816cc, handler: 9b281f8)

10-18 14:54:08.052  4498  4498 I WorkerManager: Disposing handler for worker [gcm] (manager: c9816cc, handler: 145787e)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [service] (manager: c9816cc, handler: 17c0d15)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [backgroundtask] (manager: c9816cc, handler: ea4432a)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [context] (manager: c9816cc, handler: f329536)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [searchboxroot] (manager: c9816cc, handler: 3a79361)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [progress] (manager: c9816cc, handler: 69216b4)

10-18 14:54:08.053  4498  4498 I WorkerManager: Disposing handler for worker [audio] (manager: c9816cc, handler: c666b2f)

10-18 14:54:08.054  4498  4498 I WorkerManager: Disposing handler for worker [actions] (manager: c9816cc, handler: 90cfd12)

10-18 14:54:08.054  3348  3348 E /system/bin/tombstoned: Tombstone written to: /data/

Can you try and clean the project?

If that doesn’t work, create a new project with the latest App template and migrate to it.

Rob

I can make a new thread for this issue with more detail as to my steps if you’d like, but I’m encountering this same issue while transitioning an old Corona Enterprise project to Corona Native.

Per troubleshooting steps from this thread, I was able to get the template project running once, but subsequent builds always yield the “failed to load and execute main.lua” error.  A clean prior to running again fixes the issue for that build, but incremental builds do not work.

I’m on MacOS Mojave 10.14.1 and have tried with the latest public release and daily builds.  Figuring out this issue with the template project will hopefully help with the issue I’m facing in transitioning my project.

Any ideas?

I found this excerpt from the docs, which appears to be the issue I’m facing based on the following build output from gradle.  The weird thing is that I still receive the same build error when doing a clean build, yet it does not fail to load main.lua.  Is there something wrong with my Corona account or the installation of Corona?  Each time I switched from the public release to the daily build, I ran “Setup Corona Native.app” and verified that the symbolic link is in the reported location.

Insights about this issue would be greatly appreciated, as I thought that the template project would work without issue and help me root out of the cause for it to occur in my project, but I’m left a bit more confused now.

The certifyBuild task digitally signs libcorona.so (inside app/src/main/jniLibs) with a fingerprint generated from the resources.car file. Without this task, the Corona application will fail to start on the device and yield a message about not being able to find/load main.lua.

== certifyBuild == warning: CoronaBuilder: Splash Screen Control plugin not found for user 'myEmailAddress' - if you want to customize the splash screen you can get it here: https://marketplace.coronalabs.com/plugin/splash-screen-control app\_sign: failed to replace signature \*\*\* (ReplaceSignature) 7480960d9e44885319a1aa686c2491b0 /Volumes/Data/git/TestApp/android/app/src/main/assets/resource.car Replacing signature... done. 7480960d9e44885319a1aa686c2491b0 /Volumes/Data/git/TestApp/android/app/src/main/assets/resource.car

Make sure to disable instant builds and to perform clean build (Build -> Clean or Build -> Rebuild).

@vlads, Thanks for the suggestion!

I do have instant run disabled, and as I stated, a clean build does yield a runnable build for the template project, however my issue is that all subsequent incremental builds fail to run on the device with the aforementioned error.  I should be able to do an incremental build without issue, right?  I do not have luck with clean builds from my old Corona Enterprise project, however, and I believe that to possibly be related to why the incrementals are not working with the template project.

The old enterprise project includes libcorona.so during the ndkBuild per the Android.mk file to use some headers it provides for use in C++ code.  Because of this, the libcorona.so file gets copied to the build intermediates and gets signed there, prior to being packaged up within the apk.  There are no issues in this process using Corona Enterprise build 2016.2942.  While this may not be a direct translation to what occurs during an incremental build of the template project, I believe resolving that issue (and the resultant improved understanding of the libcorona.so signing process) would aid in resolving the issue with transitioning the old enterprise project.

Is there a way to get incrementals to work with the template project, or do you have any clues about what may be going wrong with the enterprise project I’m moving to native?

Alright, so I managed to shuffle my build process around a bit to make it work correctly.  I already had some of these steps correct, but here’s what I did for anyone else who may find themselves in a similar boat:

  • Made sure that libcorona.so was being deleted from both jniLibs and “$projectDir/build/intermediates/jniLibs/” + getCurrentFlavor() + “/armeabi-v7a/libcorona.so” (we only build for armeabi-v7a currently, so if you build other ABIs, make sure you remove those too)
    • I’m not sure why the build process wasn’t automatically picking up the new libcorona.so in jniLibs, and thus not copying it back into the build intermediates after signing.  It could be because I’m on an older gradle and ndk version.  I’ll update this post for others who may encounter the issue if I later find that this isn’t necessary after updating to the latest for both.
  • Removed libcorona.so inclusion from Android.mk
    • It appears that while this project previously used headers from libcorona.so in c++, it no longer does, so the Android.mk inclusion was unnecessary.
  • Ran the certifyBuild task prior to the ndkBuild running, so that it pulls in the signed jniLibs/libcorona.so

After that, I had to add the _corona_splash_screen.png from the template project to /res/drawable, per the docs on the splash screen with native builds until I purchase the splash screen plugin to remove it.  I also had to update my call to the open function for sqlite3 as the library now has a new way of passing in open flags from the old version we were working with.

With all of those completed, I’ve been able to do both clean and incremental builds and run my original project without issue so far.

I’m now running with Corona Native instead of Enterprise!  :slight_smile: