RoboVM应用程序在ptr.get()崩溃

时间:2014-12-01 23:17:12

标签: ios audiotoolbox robovm

ptr.get()工作需要某种魔法吗?由于某种原因,以下代码总是崩溃我的应用程序:

    AudioStreamBasicDescription asbd = new AudioStreamBasicDescription(mSampleRate, mFormatID, mFormatFlags, mBytesPerPacket, mFramesPerPacket, mBytesPerFrame, mChannelsPerFrame, mBitsPerChannel, 0);
    AudioFilePtr outAudioFile = new AudioFilePtr();
    File f = File.createTempFile("ptt", ".caf"); 
    AudioFileError afe = AudioFile.createWithURL(new NSURL(f), 1667327590, asbd, 1, outAudioFile);
    System.out.println(afe.name());
    System.out.println(outAudioFile.get());

它成功从AudioFile.createWithURL返回,没有错误(错误代码:否),但是一旦我尝试获取java实例就崩溃了。我在另一段代码中遇到了相同类型的崩溃,我将AudioQueuePtr实例化为queueptr,将其传递给AudioQueue.newInput并尝试调用queueptr.get()。我在这里找不到什么东西?

java中没有堆栈跟踪,但这里是XCode Organizer Device Log:

Incident Identifier: 2EEFF4F0-9031-4798-80E7-69F55BB70576
CrashReporter Key:   08d7c27d21cb15553295bbae1b2aa2040e94b517
Hardware Model:      iPhone3,1
Process:             iOS_RVM_NN [1972]
Path:                /var/mobile/Applications/B2571332-7C2F-4A5A-8932-8BF5EC94EE33/iOS_RVM_NN.app/iOS_RVM_NN
Identifier:          iOS_RVM_NN
Version:             1 (1.0)
Code Type:           ARM (Native)
Parent Process:      debugserver [1971]

Date/Time:           2014-12-02 11:22:50.710 -0500
OS Version:          iOS 7.1.2 (11D257)
Report Version:      104

Exception Type:  EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Thread 0 Crashed:
0   libsystem_kernel.dylib          0x39838a58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39838854 mach_msg + 44
2   CoreFoundation                  0x2eaa2846 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2eaa0fb2 __CFRunLoopRun + 850
4   CoreFoundation                  0x2ea0beba CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2ea0bc9e CFRunLoopRunInMode + 102
6   GraphicsServices                0x3391165e GSEventRunModal + 134
7   UIKit                           0x31358148 UIApplicationMain + 1132
8   iOS_RVM_NN                      0x007b024e 0x8c000 + 7488078
9   iOS_RVM_NN                      0x007af7e2 0x8c000 + 7485410
10  iOS_RVM_NN                      0x007af822 0x8c000 + 7485474
11  iOS_RVM_NN                      0x00344afe 0x8c000 + 2853630
12  iOS_RVM_NN                      0x00953ca0 0x8c000 + 9206944
13  iOS_RVM_NN                      0x0094cbfa 0x8c000 + 9178106
14  iOS_RVM_NN                      0x0094e876 0x8c000 + 9185398
15  iOS_RVM_NN                      0x0094e8d0 0x8c000 + 9185488
16  iOS_RVM_NN                      0x00948ce6 0x8c000 + 9161958
17  iOS_RVM_NN                      0x009417ae 0x8c000 + 9131950
18  iOS_RVM_NN                      0x00212f84 0x8c000 + 1601412

1 个答案:

答案 0 :(得分:0)

原来这是RoboVM绑定中的一个错误。应该在将来的版本中修复。在此处查看错误报告:https://github.com/robovm/robovm/issues/627

另外,我在这里发布了一个完整的工作示例:RoboVM implementation of recording demo using AudioQueue results in "No @Marshaler found" error