Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Android version crashes with Fatal signal 11 (SIGSEGV) when app started from notification — Gideros Forum

Android version crashes with Fatal signal 11 (SIGSEGV) when app started from notification

Jeff_KanaziJeff_Kanazi Member
edited September 2013 in General questions

There is something weird going on with the Android version of our app that we cannot figure out. If a notification is received while the app is not running and the user selected the notification, the app will try to open and immediately cash with the following error:

"libc(19447): Fatal signal 11 (SIGSEGV) at 0x00000007 (code=1), thread 19463 (Thread-10109)"

This comes up before any lua code is executed.

If the app us running when the notification is received, the app will be able to handle the notification as expected and there are no problems.

The app uses facebook, billing and notification plugins and the problem would occur regardless the notification type. E.g. both GCM and billing notifications if selected so that they would open the app would cause the app to crash.

Any suggestions as to where to look for the problem? No stack trace with the error. From the memory dump it would appear related to the following call in the notification plugin:

09-29 17:45:52.448: I/DEBUG(17945): backtrace:
09-29 17:45:52.458: I/DEBUG(17945): #00 pc 0011fd52 /data/app-lib/com.ijs.phyzzlets-1/libgideros.so
09-29 17:45:52.458: I/DEBUG(17945): #01 pc 00121277 /data/app-lib/com.ijs.phyzzlets-1/libgideros.so
09-29 17:45:52.458: I/DEBUG(17945): #02 pc 001212ef /data/app-lib/com.ijs.phyzzlets-1/libgideros.so (lua_rawget+14)
09-29 17:45:52.458: I/DEBUG(17945): #03 pc 000078dc /data/app-lib/com.ijs.phyzzlets-1/libnotification.so (NotificationManager::dispatchEvent(int, void*)+56)
09-29 17:45:52.458: I/DEBUG(17945): #04 pc 000654a1 /data/app-lib/com.ijs.phyzzlets-1/libgideros.so (gevent_CallbackList::dispatchEvent(int, void*)+136)
09-29 17:45:52.458: I/DEBUG(17945): #05 pc 0006555f /data/app-lib/com.ijs.phyzzlets-1/libgideros.so (gevent::EventManager::tick()+90)

Thanks for your help!




Comments

  • Thanks for report, will check it out now ;)
  • @Jeff_Kanazi does your app has Gideros splash screen, because I can only reproduce the problem with the splash screen on?
    I just need a confirmation, so I can be sure it is the same issue and fix it ;)
  • You mean the one that shows in the free version? We have a license and that splash screen has been disabled. We do, however, have a splash screen of our own - just some image to keep on the screen while the rest is loading.

    I have tried removing our splash screen but that did not help. Keeps crashing.

  • I've updated Notification plugin on both repo and Gideros Labs, can you try it out now and see if it fixes your issue? ;)
  • Thanks for the quick turn around!

    Now It is even more weird. Not even sure how to describe it but now the app would start after a click on the notification ONLY if the app has been removed from the list of Recent Apps. If the app is on that list - it will crash but not exactly as before. Still signal 11 etc. but no memory dump any longer.

    I am not sure what difference having the app on the Recent Apps list has to do with anything - the app is not running - at least it is not an active process and yet if on that list it would not restart from the notification.

    We will do more research on our end but if you have any suggestions, please send them along.

    Thanks

  • Let me try to summarize the issues we have seen so far with the latest plugin code:

    a) Click on Notification crashes the app.

    The backtrace looks like this:

    09-30 16:37:22.114: I/DEBUG(20796): backtrace:
    09-30 16:37:22.114: I/DEBUG(20796): #00 pc 0011fd52 /data/app-lib/com.ijs.phyzzlets-2/libgideros.so
    09-30 16:37:22.114: I/DEBUG(20796): #01 pc 00121277 /data/app-lib/com.ijs.phyzzlets-2/libgideros.so
    09-30 16:37:22.114: I/DEBUG(20796): #02 pc 001212ef /data/app-lib/com.ijs.phyzzlets-2/libgideros.so (lua_rawget+14)
    09-30 16:37:22.114: I/DEBUG(20796): #03 pc 00007910 /data/app-lib/com.ijs.phyzzlets-2/libnotification.so (NotificationManager::dispatchEvent(int, void*)+72)
    09-30 16:37:22.114: I/DEBUG(20796): #04 pc 000654a1 /data/app-lib/com.ijs.phyzzlets-2/libgideros.so (gevent_CallbackList::dispatchEvent(int, void*)+136)
    09-30 16:37:22.114: I/DEBUG(20796): #05 pc 0006555f /data/app-lib/com.ijs.phyzzlets-2/libgideros.so (gevent::EventManager::tick()+90)

    NOTE: This would happen only if the application was closed with a call to application:exit() (we have code to handle back button click, which would close the app that way)

    If the app is removed from the Recent Apps List somehow, clicking on the notification starts the app without issues.

    b) Notifications are not being removed from the notification bar.

    I think the following used to work with the previous version of the plugin

    local allNotif = notifManager:getPushNotifications()
    notifManager:clearPushNotifications()

    and it used to remove received notifications. Now they remain there and need to be removed manually by the user.

    c) No Event.PUSH_NOTIFICATION call while the app is running.

    This would have been nice if it worked but we have a way to work around it. I just wanted to mention it in case it was not too hard to address.

    (a) is a big issue for us and (b) is kind of an issue too. Is there anything we can do to help you track those down?

    Thanks!
  • Post another update for Notification plugin:

    a) Could not reproduce the crash, but repeating your scenario I encountered situations, where event was not dispatched to the app due to thread issues, I've implemented volatile variables and now it was working fine on my test devices.
    Additionally there is a small change in Android manifest removing android:process=":remote" which is crucial for the fix

    b) I don't think there have been changes there, as clearing was really independent of plugin implementation. By Android definition, it is possible to clear the list, by canceling the notifications (clearing push or local notifications will not do that)
    But I added autocancel flag, which would clear notification if it was clicked on, hopefully that would help

    c) yes that is the default bahavior of IOS and I implemented the same on android to standartize it. If app is in foreground, it will not dispatch notification, but rather internal Lua event.


  • This did it! With the new code I cannot reproduce any of the problems. Works as expected.

    Thanks!!!



  • @ar2rsawseen

    I have the same crash noted here with the last version of my Action Basket game for Android.

    In fact I was googling the error and I've found this post of our lovely Gideros forum.

    But as I can read for @Jeff_Kanazi the problem was solved with an updated of the Notification plugin you did.

    I'm using last version (1.4) of Notification plugin but the problem it's the same that explained here.

    Please, could you check the last changes of the plugin in order to know if maybe there is some bug?

    For my app the crash goes with the following error:
    "libc(20400): Fatal signal 11 (SIGSEGV) at 0x00000007 (code=1), thread 20426 (Thread-7592)"

    If you need more details or the complete log, please let me know.

    Btw, yesterday I wrote another discussion related the Notification plugin here:
    http://giderosmobile.com/forum/discussion/5549/list-of-local-notifications-empty-other-notification-plugin-issues#Item_1

    Artur, many thanks for your help!
  • Hello Giderians!

    I haven't solved this problem.
    Could someone check it and see what it's the problem with the notification plugin?

    @ar2rsawseen What did you mean above when you said:
    "Additionally there is a small change in Android manifest removing android:process=":remote" which is crucial for the fix"

    My manifest file doesn't include any sentence like that.

    Many thanks.
Sign In or Register to comment.