PDA

View Full Version : [OPEN] [INFOREQ] Native on iOS 4 -> App works, than shows blank screen after 0,5 sec!



kyr0
4 Jul 2010, 2:36 AM
Hi all,

I tried a lot of examples now (0.91) in iPhone simulator (iOS 4) now. They are working fine at all.
But if I install them on my native device (3GS), iOS 4 (0.91 Sencha) the app starts, shows the UI correctly for 0.5 sec.
Then it refreshes to blank screen.

I already tried to catch any error - but there seems to be no javascript exception thrown.

I use PhoneGap zu build a local app for iPhone.

Any ideas? ;-)

Best regards,
Aron

kyr0
4 Jul 2010, 2:42 AM
Okay, that could be interesing for you all using PhoneGap and Sencha Touch. It seems to be a memory allocation problem. WebView loads all Sencha and program data into it's own memory space. (App memory space)

Since Sencha seems to need a lot of memory, the debugger shows:

mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
[Switching to thread 12803]
2010-07-04 12:27:39.188 BetterNote[1075:307] Going to play default movie
2010-07-04 12:27:39.268 BetterNote[1075:307] Can't find filename default.mov in the app bundle
2010-07-04 12:27:40.876 BetterNote[1075:307] Device initialization: DeviceInfo = {"name":"NAME_OF_PHONE (anonymized)","uuid":"ANONYMIZED","platform":"iPhone","gap":"0.9.0","version":"4.0"};
2010-07-04 12:27:42.293 BetterNote[1075:307] Received memory warning. Level=2
2010-07-04 12:27:42.935 BetterNote[1075:307] Docs Path:/var/mobile/Applications/----------------ANONYMIZED---HASH-----/Documents
2010-07-04 12:27:43.105 BetterNote[1075:307] Free space is 6910865408
[Switching to thread 12547]

-> So after 0.5 sec the memory limit appears for the app.

Any suggestions to lower the memory footprint of Sencha?

Best regards,
Aron

TommyMaintz
5 Jul 2010, 1:35 PM
Would it be possible for us to see the source code of the app? We need to figure out what specifically is taking up the memory. Loading just the library shouldnt allocate that much memory by itself.

mosa
6 Jul 2010, 11:27 PM
Ouch, I really hope Sencha is working fine in phonegap !
I have a relatively big app made with JQTouch and Phonegap, and I want to port it to Sencha Touch, but if it's not possible because of memory issues, I don't want to waste my time...

kyr0
7 Jul 2010, 3:21 AM
Re,

for sure, here is the full source code:

http://www.aron-homberg.de/downloads/sencha-blankscreen.zip

It's the untouched "forms" example of the Sencha Touch.

Debug trace:


[Session started at 2010-07-07 13:17:26 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1470) (Thu May 27 05:54:06 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys005
Loading program into debugger…
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-609-66
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
[Switching to thread 12803]
2010-07-07 13:18:53.583 BetterNote[1281:307] Going to play default movie
2010-07-07 13:18:53.597 BetterNote[1281:307] Can't find filename default.mov in the app bundle
2010-07-07 13:18:54.664 BetterNote[1281:307] Device initialization: DeviceInfo = {"name":"iKyroPhone","uuid":"ANONYMIZED","platform":"iPhone","gap":"0.9.0","version":"4.0"};
[Switching to thread 13059]
2010-07-07 13:18:56.787 BetterNote[1281:307] Docs Path:/var/mobile/Applications/ANONYMIZED/Documents
[Switching to thread 13827]
2010-07-07 13:18:57.025 BetterNote[1281:307] Free space is 6794833920

---

There is no memory warning but it refreshes to blank screen anyway.

I have iOS 4 on my iPhone 3GS. PhoneGap is 0.9.0. Sencha Touch is Beta 0.91.
XCode is 3.2.3, 64 bit.


Developer Information:

Version: 3.2 (10M2262)
Location: /Developer
Applications:
Xcode: 3.2.3 (1688)
Interface Builder: 3.2.3 (788)
Instruments: 2.7 (2529)
Dashcode: 3.0.1 (330)
SDKs:
Mac OS X:
10.4: (8S2167)
10.5: (9L31a)
10.6: (10M2262)
iPhone OS:
3.2: (7B367)
4.0: (8A293)
iPhone Simulator:
3.2: (7W367a)
4.0: (8A293)

Hopefully this helps :)

Best regards,
Aron

PTG
7 Jul 2010, 9:35 AM
I'm experiencing the same blank screen and it's not the body of the page.

crp_spaeth
7 Jul 2010, 4:18 PM
Same issue here! I solved it by deferring the init function for about 400 ms... This issue seems to appear because the onready method is called before phonegap is actually ready....

PTG
8 Jul 2010, 4:40 AM
Btw I'm not using phonegap, just plain sencha.

evant
8 Jul 2010, 4:41 AM
@PTG

Please post a test case, it would be useful to compare your code with the OP.

PTG
9 Jul 2010, 6:03 AM
I'm trying but failed to reproduce it so far with a simple project.

Jeff Blake
3 Mar 2011, 4:30 PM
Was this issue ever resolved?

I'm getting the same problem with my app. It's currently in the App Store as What's Good UBC. I've tested it with 20+ iphone 3 and 4's - with a working rate of about 70%.

It will randomly decide to stay on a blank screen. If you quit the app and try again, it might work, it might not. Sounds like this exact issue - to do with memory.