iOS 代号一音频播放崩溃

codename one audio play back crash on iOS

我注意到我在 iOS 播放音频时出现崩溃。似乎是在 Media 对象上调用 .cleanup() 方法时。

我删除了对清理的调用,但它仍然崩溃,只是需要更长的时间,我假设是在 GC 为 运行。

代码有点分散,但看起来像:

media = MediaManager.createMedia({path to media}, false);
media.play();
...
media.cleanup();

崩溃时没有堆栈跟踪,但控制台输出如下所示:

<Error>: {app name}(805,0x381b5000) malloc: *** error for object 0x1a122640: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Apr 28 08:53:12 iPod-4 SpringBoard[48] <Warning>: HW kbd: Failed to set (null) as keyboard focus Apr 28 08:53:12 iPod-4 com.apple.xpc.launchd[1] (UIKitApplication:{app package}[0x5cf8][805]) <Notice>: Service exited due to signal: Abort trap: 6 Apr 28 08:53:12 iPod-4 mediaserverd[43] <Notice>: '' {app package}(pid = 805) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None Apr 28 08:53:12 iPod-4 SpringBoard[48] <Warning>: Application 'UIKitApplication:{app package}[0x5cf8]' crashed. Apr 28 08:53:12 iPod-4 UserEventAgent[23] <Warning>: 2041398975621: id={app package} pid=805, state=0 Apr 28 08:53:12 iPod-4 ReportCrash[809] <Error>: assertion failed: 13E238: libsystem_trace.dylib + 15927 [2171E90D-32AA-3F60-9692-C2F8E0D4B1A0]: 0x0 Apr 28 08:53:12 iPod-4 Unknown[809] <Error>: Apr 28 08:53:12 iPod-4 ReportCrash[809] <Warning>: os_activity_diagnostic_for_pid() failed! Apr 28 08:53:12 iPod-4 ReportCrash[809] <Notice>: Formulating report for corpse[805] {app name} Apr 28 08:53:13 iPod-4 ReportCrash[809] <Warning>: Saved type '109(109_Handover)' report (1 of max 25) at /var/mobile/Library/Logs/CrashReporter/{app name}-2016-04-28-085313.ips

似乎是在退出控制媒体对象的表单时或尝试再次播放声音时(通过在同一路径上创建新的媒体对象)。

我想我看到了一个问题,我在这里提交了它:https://github.com/codenameone/CodenameOne/issues/1750