ios - Codenameone IOS应用程序随机崩溃

标签 ios crash codenameone

Codenameone IOS 应用程序随机崩溃。运行应用程序时未触发异常/EDT 错误。但它随机崩溃并在设备的崩溃日志下方找到。

Incident Identifier: C682221D-9C59-42C9-B049-3E6356E47190
CrashReporter Key:   5904790c45bd8f37e39f83dc508ec9b515441f58
Hardware Model:      iPad4,2
Process:             Inspect [5399]
Path:                /var/mobile/Containers/Bundle/Application/650B079F-1AA2-435B-A617-F1AD99CF4E73/Inspect.app/Inspect
Identifier:          com.org.inspect
Version:             5.0 (5.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2016-07-29 11:43:04.04 +0530
Launch Time:         2016-07-29 11:41:59.59 +0530
OS Version:          iOS 9.2.1 (13D15)
Report Version:      105

Exception Type:  EXC_RESOURCE
Exception Subtype: WAKEUPS
Exception Message: (Limit 150/sec) Observed 697/sec over 300 secs
Exception Note:  NON-FATAL CONDITION (this is NOT a crash)
Triggered by Thread:  3

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x000000018322d4bc mach_msg_trap + 8
1   libsystem_kernel.dylib          0x000000018322d338 mach_msg + 72
2   QuartzCore                      0x0000000185ef9058 _CASUpdateClient + 104
3   QuartzCore                      0x0000000185e000b8 CAImageQueuePing(_CAImageQueue*, bool) + 172
4   QuartzCore                      0x0000000185dfffc8 CAImageQueueInsertImage_ + 432
5   QuartzCore                      0x0000000185edc590 native_window_swap(_EAGLNativeWindowObject*, unsigned int) + 200
6   GLEngine                        0x000000019589f1fc gliPresentViewES_Exec + 200
7   GLEngine                        0x000000019589f0fc gliPresentViewES + 84
8   OpenGLES                        0x0000000185403cbc -[EAGLContext presentRenderbuffer:] + 72
9   Inspect                         0x000000010070e388 0x100090000 + 6808456
10  Inspect                         0x00000001000a0cc8 0x100090000 + 68808
11  libdispatch.dylib               0x00000001830f95f0 _dispatch_client_callout + 16
12  libdispatch.dylib               0x0000000183108c5c _dispatch_barrier_sync_f_slow_invoke + 644
13  libdispatch.dylib               0x00000001830f95f0 _dispatch_client_callout + 16
14  libdispatch.dylib               0x00000001830fecf8 _dispatch_main_queue_callback_4CF + 1844
15  CoreFoundation                  0x000000018365cbb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
16  CoreFoundation                  0x000000018365aa18 __CFRunLoopRun + 1628
17  CoreFoundation                  0x0000000183589680 CFRunLoopRunSpecific + 384
18  GraphicsServices                0x0000000184a98088 GSEventRunModal + 180
19  UIKit                           0x0000000188400d90 UIApplicationMain + 204
20  Inspect                         0x000000010070fca8 0x100090000 + 6814888
21  Inspect                         0x0000000100100278 0x100090000 + 459384
22  Inspect                         0x00000001002eea74 0x100090000 + 2484852
23  Inspect                         0x00000001006115bc 0x100090000 + 5772732
24  Inspect                         0x0000000100611618 0x100090000 + 5772824
25  libdyld.dylib                   0x000000018312a8b8 start + 4

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x00000001832494fc kevent_qos + 8
1   libdispatch.dylib               0x000000018310c94c _dispatch_mgr_invoke + 232
2   libdispatch.dylib               0x00000001830fb7bc _dispatch_source_invoke + 0

Thread 2:
0   libsystem_kernel.dylib          0x0000000183248b6c __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x000000018330d530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x000000018330d020 start_wqthread + 4

Thread 3 Attributed:
0   Inspect                         0x0000000100096fc4 0x100090000 + 28612
1   Inspect                         0x0000000100152b34 0x100090000 + 797492
2   Inspect                         0x00000001007cb9ac 0x100090000 + 7584172
3   Inspect                         0x0000000100096a04 0x100090000 + 27140
4   Inspect                         0x00000001007acf24 0x100090000 + 7458596
5   Inspect                         0x00000001000fe8c4 0x100090000 + 452804
6   Inspect                         0x0000000100095704 0x100090000 + 22276
7   Inspect                         0x0000000100096ec4 0x100090000 + 28356
8   Inspect                         0x0000000100878e30 0x100090000 + 8293936
9   Inspect                         0x0000000100751954 0x100090000 + 7084372
10  Inspect                         0x0000000100752bf4 0x100090000 + 7089140
11  Inspect                         0x0000000100753b60 0x100090000 + 7093088
12  Inspect                         0x00000001008791b0 0x100090000 + 8294832
13  libsystem_pthread.dylib         0x000000018330fb28 _pthread_body + 156
14  libsystem_pthread.dylib         0x000000018330fa8c _pthread_body + 0
15  libsystem_pthread.dylib         0x000000018330d028 thread_start + 4

Thread 4:
0   libsystem_kernel.dylib          0x000000018322d4f8 semaphore_wait_trap + 8
1   libsystem_platform.dylib        0x000000018330697c _os_semaphore_wait + 24
2   libdispatch.dylib               0x00000001831044ec _dispatch_barrier_sync_f_slow + 560
3   Inspect                         0x00000001000a12e8 0x100090000 + 70376
4   Inspect                         0x00000001007101e4 0x100090000 + 6816228
5   Inspect                         0x0000000100108000 0x100090000 + 491520
6   Inspect                         0x0000000100107e48 0x100090000 + 491080
7   Inspect                         0x00000001000c8a68 0x100090000 + 232040
8   Inspect                         0x00000001002f27c0 0x100090000 + 2500544
9   Inspect                         0x00000001002fd774 0x100090000 + 2545524
10  Inspect                         0x00000001002fde44 0x100090000 + 2547268
11  Inspect                         0x00000001005e2b54 0x100090000 + 5581652
12  Inspect                         0x00000001005217a4 0x100090000 + 4790180
13  Inspect                         0x00000001002641ec 0x100090000 + 1917420
14  Inspect                         0x00000001002646c0 0x100090000 + 1918656
15  Inspect                         0x00000001002654bc 0x100090000 + 1922236
16  Inspect                         0x000000010034520c 0x100090000 + 2839052
17  Inspect                         0x0000000100343ce4 0x100090000 + 2833636
18  Inspect                         0x0000000100294694 0x100090000 + 2115220
19  Inspect                         0x00000001002fc364 0x100090000 + 2540388
20  Inspect                         0x00000001002f24d0 0x100090000 + 2499792
21  Inspect                         0x00000001002f7080 0x100090000 + 2519168
22  Inspect                         0x000000010046d864 0x100090000 + 4053092
23  Inspect                         0x00000001000fdbf8 0x100090000 + 449528
24  Inspect                         0x0000000100753b60 0x100090000 + 7093088
25  Inspect                         0x00000001008791b0 0x100090000 + 8294832
26  libsystem_pthread.dylib         0x000000018330fb28 _pthread_body + 156
27  libsystem_pthread.dylib         0x000000018330fa8c _pthread_body + 0
28  libsystem_pthread.dylib         0x000000018330d028 thread_start + 4

Thread 5:
0   libsystem_kernel.dylib          0x0000000183247f48 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x000000018330ece8 _pthread_cond_wait + 648
2   Inspect                         0x000000010087898c 0x100090000 + 8292748
3   Inspect                         0x000000010073fb40 0x100090000 + 7011136
4   Inspect                         0x000000010073fa14 0x100090000 + 7010836
5   Inspect                         0x000000010046de9c 0x100090000 + 4054684
6   Inspect                         0x00000001000fdbf8 0x100090000 + 449528
7   Inspect                         0x0000000100753b60 0x100090000 + 7093088
8   Inspect                         0x00000001008791b0 0x100090000 + 8294832
9   libsystem_pthread.dylib         0x000000018330fb28 _pthread_body + 156
10  libsystem_pthread.dylib         0x000000018330fa8c _pthread_body + 0
11  libsystem_pthread.dylib         0x000000018330d028 thread_start + 4

Thread 6:
0   libsystem_kernel.dylib          0x0000000183248440 __semwait_signal + 8
1   libsystem_c.dylib               0x000000018316522c nanosleep + 212
2   libsystem_c.dylib               0x000000018316514c usleep + 68
3   Inspect                         0x0000000100097498 0x100090000 + 29848
4   Inspect                         0x0000000100097d20 0x100090000 + 32032
5   Inspect                         0x0000000100877970 0x100090000 + 8288624
6   Inspect                         0x00000001007445e4 0x100090000 + 7030244
7   Inspect                         0x000000010072dc64 0x100090000 + 6937700
8   Inspect                         0x0000000100731914 0x100090000 + 6953236
9   Inspect                         0x0000000100573518 0x100090000 + 5125400
10  Inspect                         0x0000000100573efc 0x100090000 + 5127932
11  Inspect                         0x0000000100573efc 0x100090000 + 5127932
12  Inspect                         0x0000000100573efc 0x100090000 + 5127932
13  Inspect                         0x0000000100573efc 0x100090000 + 5127932
14  Inspect                         0x0000000100572e10 0x100090000 + 5123600
15  Inspect                         0x00000001006f3ea0 0x100090000 + 6700704
16  Inspect                         0x00000001005a1b34 0x100090000 + 5315380
17  Inspect                         0x00000001005adf08 0x100090000 + 5365512
18  Inspect                         0x00000001005e2ecc 0x100090000 + 5582540
19  Inspect                         0x000000010046d7f4 0x100090000 + 4052980
20  Inspect                         0x000000010046e06c 0x100090000 + 4055148
21  Inspect                         0x00000001000fdbf8 0x100090000 + 449528
22  Inspect                         0x0000000100753b60 0x100090000 + 7093088
23  Inspect                         0x00000001008791b0 0x100090000 + 8294832
24  libsystem_pthread.dylib         0x000000018330fb28 _pthread_body + 156
25  libsystem_pthread.dylib         0x000000018330fa8c _pthread_body + 0
26  libsystem_pthread.dylib         0x000000018330d028 thread_start + 4

Thread 7:
0   libsystem_kernel.dylib          0x0000000183248b6c __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x000000018330d530 _pthread_wqthread + 1284
2   libsystem_pthread.dylib         0x000000018330d020 start_wqthread + 4

Thread 3 crashed with ARM Thread State (64-bit):
    x0: 0x000000012d6b87c0   x1: 0x00000001318ae8e0   x2: 0x0000000000000001   x3: 0x0000000100152b10
    x4: 0x000000000000031b   x5: 0x000000000000032a   x6: 0x0000000000000000   x7: 0x000000000beba6a8
    x8: 0x0000000100c5b9f8   x9: 0x0000000100c5a0e0  x10: 0x0000000000000284  x11: 0x0000000000000283
   x12: 0x0000000000000000  x13: 0x000000000609eb00  x14: 0x0000000100000000  x15: 0x000000016e1ba9d0
   x16: 0x000000018330d64c  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000001
   x20: 0x0000000130516730  x21: 0x000000012d6b87c0  x22: 0x0000000100c39000  x23: 0x00000000000001b2
   x24: 0x000000012d8d7c40  x25: 0x0000000100c5a0e0  x26: 0x0000000100c3a000  x27: 0x0000000000000b40
   x28: 0x0000000100c5a0e0  fp: 0x000000016e1ba6e0   lr: 0x0000000100152b34
    sp: 0x000000016e1ba6c0   pc: 0x0000000100096fc4 cpsr: 0x20000000

我想只有当我尝试将大量数据保存到 xml 时才会发生这种崩溃。下面是供您引用的代码一览。它从未因 300-400 个数据字段而失败。
    XMLParser xp = new XMLParser();
    XMLWriter xw = new XMLWriter(true);
    SecurityUtil securityUtil = new SecurityUtil();

    InputStream is = null;

    try {
        if(FileSystemStorage.getInstance().exists(filePath)){

            is = FileSystemStorage.getInstance().openInputStream(filePath);
            ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(securityUtil.decrypt(FileUtil.convertToByteArray(is,length)));
            Reader isReader = new InputStreamReader(byteArrayInputStream,"UTF-8");

            //Get parent element from xml file
            final Element response = xp.parse(isReader);

            if(response!=null){
                //Approx 700 - 1500 list data to be saved
                for (final FormData fromDataObj : listInputs) {

                //Set values to the appropriate field
                response.getElementById(fromDataObj.getInputId()).setAttribute(Constants.FIELD_ATT_VALUE, fromDataObj.getInputValue());
                }
            }

            //write back element into xml file

            OutputStream os = FileSystemStorage.getInstance().openOutputStream(filePath);
            ByteArrayOutputStream bo = new ByteArrayOutputStream();

            OutputStreamWriter ow = new OutputStreamWriter(bo,"UTF-8");
            xw.writeXML(ow, response);
            ow.close();
            os.write(securityUtil.encrypt(bo.toByteArray()));
            os.close();
            bo.close();
            bo = null;
            os = null;

            }

            if(byteArrayInputStream!=null){
                byteArrayInputStream.close();
                byteArrayInputStream= null;
            }
            if(isReader!=null){
                isReader.close();
                isReader= null;
            }

        }

        if(is!=null){
            is.close();is=null;
        } 
    } catch (Exception e) {
        e.printStackTrace();
        try {
            if (is != null) {
            is.close();
            is = null;
        }
        } catch (Exception ex) {
            is = null;
        }
        throw e;
    }

有人遇到过这样的问题并解决了吗?

任何建议将不胜感激。

最佳答案

这不是崩溃的原因,请参阅日志中的评论。另请参阅 this old issue .

您需要缩小碰撞测试用例的范围。

关于ios - Codenameone IOS应用程序随机崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38629002/

相关文章:

android-activity - 应用程序在启动特定 Activity 时崩溃

android - 代号一在 Android 上发送短信

ios - 使用 Swift 的带有 SpriteKit 的 UISwipeGestureRecognizer

ios - 连接 2 个字符串(或数组)

pointers - 取消引用空指针会导致内核崩溃

forms - 代号 一张刷新表单

android - CodenameOne - FirebaseApp 未初始化

ios - 使用sdwebimage iOS从以前的单元浮华图像?

ios - UIButton 图像不显示在导航栏中

android - Google Android 开发工具在 Linux 主机上定期崩溃...这正常吗?