Languages

Menu
Sites
Language
Game is forced to close after exit

Hello,

I'm new to Tizen and porting my game. Everthing works well except when I exit game.

Normally, there will be nothing strange happening. After my game exits, there is a dialog of "Unfortunately, application is forced close."

Of course, there is log for the crash. With it, I have spent days to investigate for the reason and fix, but still no luck.

Below is the highlighting part of my crash log.

I/XX      ( 5546): int OspMain(int, char**)(76) > Application finished.
I/LOADER  ( 5546): uiapp_loader.c: main(288) > Osp application terminates.
I/LOADER  ( 5546): uiapp_loader.c: main(291) > Osp cleanup finished for /opt/apps/ngEW4b6Ghy/bin/XX.
I/Tizen::App(  637): void Tizen::App::_ContextManager::AppTerminationHandler(const AppId&)(310) > Exit
I/Tizen::App(  637): result Tizen::App::_ContextManager::Unregister(int)(259) > app info is removed (ngEW4b6Ghy.XX, 5546)
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(439) > registered app count : 15
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(446) > aospd00043.osp-app-service(pid:637)
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(446) > sjjevolsjk.osp-common-service(pid:652)
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(446) > xZuDw2OeGg.CalendarService(pid:1094)
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(446) > kmcele1k0n.Internet(pid:1249)
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(446) > 8r4r5ddzzn.Messages(pid:1558)
I/Tizen::App(  637): void Tizen::App::_ContextManager::Dump() const(446) > ph1vq2phrp.Calendar(pid:1713)
.................................................
D/CRASH_DAEMON(  426): monitor.c: add_file(148) > add file /opt/usr/share/crash/dump/XX_5546_20140530160544
D/CRASH_DAEMON(  426): worker.c: make_dump_dir(264) > [SECURE_LOG] dump dir(/opt/usr/share/crash/dump/XX_5546_20140530160544)
D/CRASH_DAEMON(  426): monitor.c: add_file(148) > add file /opt/usr/share/crash/core/5546_4_XX.core
................................................
I/Tizen::App(  637): static int Tizen::App::_AppLifecycleManager::TerminateCallback(int, void*)(774) > Finished invoking application event listener for ngEW4b6Ghy.XX, 5546.

I also added the full log here.

As the log, I think the reason can come from the fact that a listener of game is still running althought game has exited. I checked the whole source code and found no hope on which listener still running.

If someone has experienced with this kind of issue, or you have any suggestions/solutions, please share me.
 

Tks

Tiny

Responses

4 Replies
Alex Ashirov

Hi,

Probably you forget to delete in the OnTerminating() method some objects used by your app (database, bitmap, popup etc). You can take a look at the following topic. It contains some tips how to avoid such issues:

https://developer.tizen.org/forums/native-application-development/error-terminating-application-tizen-2.2.1

Tiny Son

Thanks Alex,

In deed, I visited the page you mentioned. 

At the moment I am checking the whole source code again to invistage the reason, especially freeing resources in onTerminating.

 

Tiny Son
Hi Alex, You are right! Finally i found the thread caused the crash. The thread still do sth although app is terminated. I tried to kill the thread in onTerminating method, pluz add Thread.sleep(3000). With it, the crash has gone. I think there will be a better way?
Alex Ashirov

Hi,

I don’t know what this additional thread does, but why do you call Thread.sleep(3000)?