adrnsoh / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

Debugging iOS App crashes on device needs a way to see which source file had an error #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. An iOS app which is built using the codename1 build server
2. If there is any error on device, the app will crash 
3.

What is the expected output? What do you see instead?

When looking at the logs on device using Xcode, it shows no source information 
or helpful hint on what could be wrong. For example, I had an app created using 
codename1 build server. The app works on simulator, however on actual device it 
shows the initial form and then after entering some data, when it is trying to 
connect to the server, it crashes with following error:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: KERN_INVALID_ADDRESS at 0x2b98a31f

Crashed Thread:  7

The thread details for Thread 7, in xcode are as follows:

Thread 7 Crashed:

0   S2PayApp                      0x006836b8 0x1000 + 6825656

1   S2PayApp                      0x002baca0 0x1000 + 2858144

2   S2PayApp                      0x002bb4d4 0x1000 + 2860244

3   S2PayApp                      0x002239a8 0x1000 + 2238888

4   S2PayApp                      0x003431f4 0x1000 + 3416564

5   S2PayApp                      0x00223678 0x1000 + 2238072

6   S2PayApp                      0x005f8778 0x1000 + 6256504

7   S2PayApp                      0x00223678 0x1000 + 2238072

8   S2PayApp                      0x002a6a10 0x1000 + 2775568

9   S2PayApp                      0x002a6a94 0x1000 + 2775700

10  S2PayApp                      0x002bad20 0x1000 + 2858272

11  S2PayApp                      0x00283878 0x1000 + 2631800

12  S2PayApp                      0x00169a74 0x1000 + 1477236

13  S2PayApp                      0x0016c598 0x1000 + 1488280

14  S2PayApp                      0x0016cdb0 0x1000 + 1490352

15  S2PayApp                      0x001be77c 0x1000 + 1824636

16  S2PayApp                      0x0034ea90 0x1000 + 3463824

17  S2PayApp                      0x0066d6fc 0x1000 + 6735612

18  S2PayApp                      0x00690e40 0x1000 + 6880832

19  S2PayApp                      0x0068da08 0x1000 + 6867464

20  S2PayApp                      0x00690038 0x1000 + 6877240

21  libsystem_c.dylib             0x370f672e _pthread_start + 314

22  libsystem_c.dylib             0x370f65e8 thread_start + 0

Thread 7 crashed with ARM Thread State:

    r0: 0x00000000    r1: 0x00861900      r2: 0x2b98a31f      r3: 0x00000000

    r4: 0x0629bd50    r5: 0x2b98a31f      r6: 0x007fc3c0      r7: 0x0559a880

    r8: 0x00000001    r9: 0x0000000d     r10: 0x008c8900     r11: 0x00000000

    ip: 0x00a95740    sp: 0x0559a880      lr: 0x002baca8      pc: 0x006836b8

  cpsr: 0x20000010

What version of the product are you using? On what operating system?

I am testing with the private beta version of codenameone in Mac OS X using the 
following file:
CodenameOne_Mac_20120218.dmg 

My OS is Mac Lion. (Version 10.7.3)

The actual device is iPhone 4, iOS version 5.1

Please provide any additional information below.

As per the instructions from Shai, the issue is created to track this feature:

We intend to offer crash protection which will catch and log exceptions on the 
device and notify you through the cloud of what went wrong, this is slightly 
problematic right now due to limitations of the iOS VM we are using but we 
intend to support this soon to provide better results. As a stopgap measure I 
would like to provide means to decoding files such as this into more readable 
results at least during the beta where unexpected crashes might occur. This is 
pending, you can open an issue on that to track the progression of this feature.

Original issue reported on code.google.com by nir...@nvsoft.com on 10 Mar 2012 at 12:30

GoogleCodeExporter commented 9 years ago
I'm working on implementing this feature & could use sample files. Can you 
provide me a log file with an ipa and the bzipped dSYM file that matches the 
ipa?
If its a problem for you to post the files here you can just email them to me.

Original comment by shai.almog on 11 Mar 2012 at 6:12

GoogleCodeExporter commented 9 years ago
I have some bad news on this feature. After implementing it turns out the data 
I get is completely useless and doesn't include the stack information I'm 
interested in.

I'm closing this issue as won't fix at the moment but we intend to offer two 
solutions for the problem in the coming months:
Logging - we will offer seamless device logging to the cloud.
Crash detection - a crashed application will send Java stack information to the 
cloud.
Debugging - this will take a while to land but we intend to offer full on 
device debugging from Java for all devices.

Right now I can offer you the following:
1. If you have a Mac and a basic+ user account you can download the sources and 
just run them to see the stack errors.
2. Use dialogs or visual indication to detect the crash.
3. If you would like to send us the project we can have a look, due to the 
early beta stage we will try to help you personally with a couple of issues 
like that to help get you started.

Original comment by shai.almog on 12 Mar 2012 at 5:27

GoogleCodeExporter commented 9 years ago
Hi Shai,

Thanks very much for your support. I tested the application with some visual 
debug dialogs and found out the cause of the crash to be Util.writeObject() 
method call when passed with byte[] object. I have created a separate issue(96) 
for it.

After this change, my app is working, however it is still not able to connect 
to the server. Will do more debugging and let you know, what could be the issue 
when it is trying to connect to server.

Thanks,
Nirmal

Original comment by nir...@nvsoft.com on 15 Mar 2012 at 4:35