Game not suspending on Android

Bugs will be moved here once resolved.

Post » Tue Dec 18, 2012 3:12 am

Hello,

If I export a game to phonegap and install it on my Samsung S3 running Android 2.3.6, the Android task manager shows that the game is still using cpu and consuming memory.

I verified this by exporting the Space Blaster game that is included in the examples folder of Construct 2 108.2 64 edition.

I also tried debug and release builds for Android.

Cheers,

Gez

B
4
S
1
Posts: 5
Reputation: 535

Post » Tue Dec 18, 2012 3:49 pm

How much CPU is it using exactly? And it's a non-issue if it still uses memory because it's still there for when you switch back to it.

Try adding some text to a text object in the Browser object's 'on suspended' and 'on resumed' events. This will indicate if it's working properly, and I suspect it actually is, since double-checking our source code indicates we do handle these events.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Dec 19, 2012 12:08 am

Hi Ashley,

I started the game by pressing 'touch to begin' and cpu usage has settled to around 50% (but it fluctuates 30% - 49%).

When I say that it is consuming memory I mean its actively consuming memory over time, if I leave it for a 10 minutes when I go back to the game I get a black screen, and have to force the app to close before I can use it again. However if I switch to another app and go back immediately, the game starts again i.e. it doesn't suspend, it exits.

I wish I had another android device to test this on, I have to assume its an issue with my particular hardware/software, otherwise I would expect to see other people reporting the same issue, as it is quite an obvious problem.

Gerry
B
4
S
1
Posts: 5
Reputation: 535

Post » Thu Dec 20, 2012 1:29 pm

@Gez - I tested it on my Android phone and it doesn't get stuck in the background, it simply exits when I press the Home button and never pauses and resumes. I'm not sure if it's a PhoneGap bug, it's hard to tell - I'm in touch with PhoneGap about it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 23, 2012 1:18 am

@Gez try to logcat it. On your device. There is an logcat app also try to install it click record then start the space blaster game etc... save it and check the log files then.
B
5
S
1
Posts: 49
Reputation: 1,148

Post » Tue Jan 01, 2013 11:22 pm

Hello, Happy new year!

I used the logcat app as you suggested, here is the log:

https://dl.dropbox.com/u/68543810/alogcat.2013-01-02-09-55-59%2B1100.txt

I don't really understand it but I did notice this:

...
D/CordovaLog(16597): Uncaught TypeError: Property 'nb' of object [object DOMWindow] is not a function
D/CordovaLog(16597): file:///android_asset/www/c2runtime.js: Line 73 : Uncaught TypeError: Property 'nb' of object [object DOMWindow] is not a function
...

Gerry
B
4
S
1
Posts: 5
Reputation: 535

Post » Mon Jan 07, 2013 3:43 pm

@Gez - can you try that again but disable minify on export? The minification has garbled the error message and made it useless.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests