Game keeps crashing in Android.

Hi

I’m having some trouble with an android game that game that i created.

It works fairly well on high end devices but keeps crashing on cheaper ones.

When i run it on my core-i5 laptop, the performance seems to be very browser dependent.
It’s a bit slow and lagging in firefox, also the cpu-fan goes up to max.
However, in Chrome, it runs very smooth.

I released it on google play a few months ago since that “sort of” working: play.google.com/store/apps/deta … est2&hl=sv
However, i’ve noticed in the google play control panel that most users seems to uninstall it shortly after downloading it, my guess is that it’s related to the crashing-issue.

While developing, i got some help from this forum regarding optimization, collision detection timers, etc.
I think that i’ve optimized this game as much as it’s possible to do and i’ve spent quite alot of time trying to find a bug that would cause this.

For some reason, i can’t use the debugger, gdevelop crashes when i try to compile a native preview of the main scene (running in Ubuntu).
What is the way forward here?

If you can run GDevelop by doing :

cd /opt/gdevelop (if GDevelop is installed here) export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. gdb ./GDIDE r

When it crashes, enter “bt” in the terminal and paste its content here.

Launching GD C++ Platform preview…
Scene Editor canvas reloading… (step 1/2)
Switching to preview mode…
CodeCompilerProcess terminated with status 0.
CodeCompiler notified that the current process ended work.
Compilation succeeded.
[Thread 0x7fff3f7ee700 (LWP 3533) exited]
Launching post task
Preparing linking task for scene gameScene…
New pending task added (Linking code for scene gameScene)
Task ended.
Processing task Compilation of events of scene gameScene…
Launching pre work…
Generating C++ code…
Error :Syntax error in: LastTouchId()
Error :Syntax error in: LastEndedTouchId()
Error :Syntax error in: LastEndedTouchId()
Error :Syntax error in: LastEndedTouchId()
Error :Syntax error in: LastEndedTouchId()
Error :Syntax error in: TouchX(Variable(movementTouchId),“staticLayer”,0)
Error :Syntax error in: TouchY(Variable(movementTouchId),“staticLayer”,0)
Error :Syntax error in: LastTouchId()
Launching compiler process…
g++ -std=gnu++11 -fPIC -o “/tmp/GDTemporaries/GD0x3ba1830ObjectFile.o” -include “/opt/gdevelop/CppPlatform/include/GDCpp/GDCpp/EventsPrecompiledHeader.h” -c “/tmp/GDTemporaries/GD0x3ba1830EventsSource.cpp” -I"/opt/gdevelop/CppPlatform/include/linux/usr/include/i686-linux-gnu/" -I"/opt/gdevelop/CppPlatform/include/linux/usr/lib/gcc/i686-linux-gnu/4.7/include" -I"/opt/gdevelop/CppPlatform/include/linux/usr/include" -I"/opt/gdevelop/CppPlatform/include/linux/usr/include/c++/4.7/" -I"/opt/gdevelop/CppPlatform/include/linux/usr/include/c++/4.7/i686-linux-gnu" -I"/opt/gdevelop/CppPlatform/include/linux/usr/include/c++/4.7/backward" -I"/opt/gdevelop/CppPlatform/include/GDCpp" -I"/opt/gdevelop/CppPlatform/include/Core" -I"/opt/gdevelop/CppPlatform/include/SFML/include" -I"/opt/gdevelop/CppPlatform/include/wxwidgets/include" -I"/opt/gdevelop/CppPlatform/include/wxwidgets/lib/gcc_dll/msw" -I"/opt/gdevelop/CppPlatform/Extensions/include" -DGD_IDE_ONLY -DGD_CORE_API= -DGD_API= -DGD_EXTENSION_API= -DRELEASE -DNDEBUG -DBOOST_DISABLE_ASSERTS
CodeCompilerProcess created.
[New Thread 0x7fff3f7ee700 (LWP 3537)]
CodeCompilerProcess terminated with status 0.
CodeCompiler notified that the current process ended work.
Compilation succeeded.
[Thread 0x7fff3f7ee700 (LWP 3537) exited]
Launching post task
Preparing linking task for scene gameScene…
Task ended.
Processing task Linking code for scene gameScene…
Launching compiler process…
g++ -std=gnu++11 -fPIC -o “/tmp/GDTemporaries/GD0x3ba1830Code.dll” -shared “/tmp/GDTemporaries/GD0x3ba1830ObjectFile.o” -L"/opt/gdevelop/" -L"/opt/gdevelop/CppPlatform/Extensions/" -lGDCpp -lstdc++ -lGDCore “/opt/gdevelop/libsfml-audio.so.2” “/opt/gdevelop/libsfml-network.so.2” “/opt/gdevelop/libsfml-graphics.so.2” “/opt/gdevelop/libsfml-window.so.2” “/opt/gdevelop/libsfml-system.so.2”
CodeCompilerProcess created.
[New Thread 0x7fff3f7ee700 (LWP 3543)]
CodeCompilerProcess terminated with status 0.
CodeCompiler notified that the current process ended work.
Compilation succeeded.
[Thread 0x7fff3f7ee700 (LWP 3543) exited]
Launching post task
Task ended.
No more task to be processed.
Scene canvas reloading… (step 2/2)
Disabling tasks related to scene:gameScene
Initializing RuntimeScene from layout…
Loading RuntimeScene from a scene… Done.
Loading compiled code…
Loaded compiled code0x6456d70
0x608aca8<-

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff737245f in RuntimeObject::ActivateBehavior(gd::String const&, bool)
() from libGDCpp.so
(gdb) bt
#0 0x00007ffff737245f in RuntimeObject::ActivateBehavior(gd::String const&, bool) () from libGDCpp.so
#1 0x00007fff6c24f340 in GDSceneEventsgameScene ()
from /tmp/GDTemporaries/GD0x3ba1830Code.dll
#2 0x00007ffff7385328 in RuntimeScene::RenderAndStep() () from libGDCpp.so
#3 0x00007ffff74289cc in CppLayoutPreviewer::OnUpdate() () from libGDCpp.so
#4 0x00007ffff7a052c2 in gd::LayoutEditorCanvas::OnUpdate() ()
from libGDCore.so
#5 0x00007ffff7a08513 in gd::LayoutEditorCanvas::OnPaint(wxPaintEvent&) ()
from libGDCore.so
#6 0x00007ffff5e9111e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff6004282 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8 0x00007ffff60045e6 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9 0x00007ffff600466e in wxEvtHandler::TryHereOnly(wxEvent&) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff6004703 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff6004765 in wxEvtHandler::ProcessEvent(wxEvent&) ()
—Type to continue, or q to quit—

On dirait que cela semble lié à l’activation (via une action ou au lancement de la scène) d’un automatisme inexistant sur un objet.

How would i proceed to find out which non existing automatism it is that im trying to activate?

You can send to me your project file so that I can search for the problematic behavior (in the next version, it wouldn’t crash anymore).

I found the problem by trial and error, removing sections of the loop to see which part that made the compilation fail.
I toggled activation on group level instead of doing it separately for each object but i fixed that now.

However, when i get it to compile as a native game, the blue crystals that are very central to the game disappears (they are there when run it as html5). I get the feeling that there is some data corruption in the project file, a lot of things regarding the crystals seems to be a bit dodgy.

I’ll pm you the url for the project file, i would really appreciate if you could take a look at it if you have time.

Ok, I’ll look at it. :slight_smile:

It still isn’t working properly.
While it runs very smoothely for a while in Chrome, it then crashes.
What happens is that the fps first drops sharply and a few seconds later, the game freezes.
Try renfors.org/bluequest/ in chrome and it will freeze before level five.

I’ve disabled all parts of the gameloop, one at a time, to try to find the problem.
But it’s still there, what ever i do.

I’ve read that this type of problem could be debuged in pixi (Not that i know how to do that).
I’ve tried recording a timeline in the inspector in chrome but the whole browser crashes together with the game.
Not sure if i would get anything usefull from the timeline if i would get it to work.
What should i do?