×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    138

    Question Application crash when launching others apps!!!

    Hi,

    i am facing a problem with my application which is crashing when other applications are launched. for example when i launch Flashlight or Angry Bird apps, my application is crashed or when i launch the camera from inside whatsapp. and many other apps.I don't know the reason for that!! when i used the application Y-Task , i have received the error: "MyApp terminate: 0"
    in the qt debug nothing is explaining the error..it simply gives me
    Process has finished.
    Finished.
    Finished.


    I am really confused about that problem.. i have read that maybe other applications are using the same processes which i am using in my app but that weird since nothing in common between these apps and mine.."Flashlight" app for ex only will turns on the led flashlight which i dont use.
    What should i do in order to fix that to control this crashing!!!
    Thank you for any help concerning this issue

    Best Regards

  2. #2
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Application crash when launching others apps!!!

    its hard to say something without looking into the code

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,168

    Re: Application crash when launching others apps!!!

    hard, but not impossible.. anyway, I like wild guesses, lets see if I get close on sugegsting that you might be running out either Graphics memory or RAM, graphics memory is easy to handle, see this: http://www.developer.nokia.com/Commu...emory_handling

    Do make sure that you do release any OpenGL related resources etc. once you get the KGoomMemoryLowEvent, if you don't, you end up getting the device in to mode where it is not that ncie to use. I'm not having any code for Ram memory monitoring thing, but would suggest writing to file all events you get there, and then seeing whether you could actually catch the event and do something (like release RAM memory) to overcome your application being killed.

  4. #4
    Registered User
    Join Date
    Mar 2010
    Posts
    138

    Re: Application crash when launching others apps!!!

    Hi,

    Sorry for beeing too late here,
    You were absolutely right symbianyucca, the problem is that i am running out from memory.

    i tried to handle as described in the link , but didnt succeeded
    i used the following
    bool MyApplication::symbianEventFilter( const QSymbianEvent* symbianEvent ) {
    const TWsEvent *event = symbianEvent->windowServerEvent();
    if( !event ) {
    return false;
    }
    switch( event->Type() ) {
    // GOOM handling enabled
    // http://wiki.forum.nokia.com/index.ph...emory_handling
    case EEventUser: {
    TApaSystemEvent* eventData = reinterpret_cast<TApaSystemEvent*>(event->EventData());
    if ((*eventData) == EApaSystemEventShutdown) {
    qDebug() << "EApaSystemEventShutdown";
    eventData++;
    if ((*eventData) == KGoomMemoryLowEvent) {
    qDebug() << "KGoomMemoryLowEvent";
    return true;// prevent event propagation
    }
    }
    break;
    }
    default:
    break;
    };

    // Always return false so we don't stop
    // the event from being processed
    return false;
    }
    when i launch the other apps, i am getting the notification that i added "KGoomMemoryLowEvent" and the application crash !! isnt supposed that Qt automatically free the memory??
    what should i do more in order to prevent the application crash?

    Thank you

  5. #5
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Application crash when launching others apps!!!

    Quote Originally Posted by zzizz View Post
    isnt supposed that Qt automatically free the memory??
    no. Qt is not java. memory allocations/deallocations on your responsibility
    what should i do more in order to prevent the application crash?
    release graphics memory as yucca suggested

  6. #6
    Registered User
    Join Date
    Mar 2010
    Posts
    138

    Re: Application crash when launching others apps!!!

    Quote Originally Posted by vladestCh View Post
    no. Qt is not java. memory allocations/deallocations on your responsibility

    release graphics memory as yucca suggested

    Hi vladestCh,

    as mentioned in the link
    With Qt, the graphics memory is freed when the application loses focus, though with large memory allocations, this can take some time. And if an application that requires large amounts of data is started when the Qt application is running, there is a possibility that GOOM starts sending shut-down events, effectively closing the Qt application.

    The shut-down event sent is EEventUser type, and the first EventData is EApaSystemEventShutdown and the second item in EventData is then the KGoomMemoryLowEvent.

    If this event is not handled, the application will exit immediately. With Qt applications since the memory is freed automatically, only thing you need to do is then to stop this event. This can be done by implementing symbianEventFilter() function, and returning true for this event.
    In my case , my qt application is losing focus in order to launch the other apps(which means that graphic memory should be released ).
    note that i am getting the losing focus event correctly by adding the following:
    case EEventFocusGained: {
    qDebug()<<"EEventFocusGained";
    break;
    }
    case EEventFocusLost: {
    qDebug()<<"EEventFocusLost";
    break;
    }
    and automatically when i try to launch those apps , my application crash while it is still in background(get the process finished from the debug). note that i am stopping the shut-down event by implementing symbianEventFilter() function, and returning true for this event as described in the link.


    So am i missing anything here to release the graphics memory?? and if yes then how to release graphics memory?

    Thank you

  7. #7
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,168

    Re: Application crash when launching others apps!!!

    What is the panic code for the crash ? Also what kind of UI are you using in your app ?

  8. #8
    Registered User
    Join Date
    Mar 2010
    Posts
    138

    Re: Application crash when launching others apps!!!

    Quote Originally Posted by symbianyucca View Post
    What is the panic code for the crash ? Also what kind of UI are you using in your app ?
    Hello again,
    as mentioned in post #1, when i used Y-Task i have received the error: "MyApp terminate: 0" which i guess it is a normal exit of the app
    in the qt debug it simply gives me;
    EApaSystemEventShutdown
    KGoomMemoryLowEvent
    Process has finished.
    Finished.
    Finished.

    Sorry for not understanding the second question about what kind of UI are you using in my app.
    i am using the native UI (mainwindow.ui) which i can drag and drop widgets.

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,168

    Re: Application crash when launching others apps!!!

    check the list inside Y-Task. Basically it shows normal exit as Kill-0-Kill, and there are no Notes shown outside, so if you see the error note, then it is not normal exit.

  10. #10
    Registered User
    Join Date
    Mar 2010
    Posts
    138

    Re: Application crash when launching others apps!!!

    Quote Originally Posted by symbianyucca View Post
    check the list inside Y-Task. Basically it shows normal exit as Kill-0-Kill, and there are no Notes shown outside, so if you see the error note, then it is not normal exit.
    The error found in the list inside the Y-Task when my application crashes is
    MyApp
    Terminate: 0, Terminate

    and notice that i am getting a weird notification error which is OmbEngine Kern-EXEX: 3 ,even if no application is running in my device.

Similar Threads

  1. Why apps crash with orientation change
    By julie_777 in forum Symbian
    Replies: 9
    Last Post: 2011-05-27, 08:47
  2. Launching Map apps
    By onlyabhi in forum Symbian
    Replies: 5
    Last Post: 2009-02-04, 07:52
  3. Launching messaging/telephony apps and seeding them
    By AshramArzephucque in forum Symbian
    Replies: 2
    Last Post: 2008-09-04, 05:07
  4. Quickly launching mobile java apps
    By ianbolland in forum Mobile Java General
    Replies: 1
    Last Post: 2005-11-17, 15:27
  5. Launching sis apps on the emulator
    By panosterz in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-02-21, 06:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×