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

是否有一些需要获得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实例崩溃。 在另一段代码中,我也遇到了同样types的崩溃,我将一个AudioQueuePtr实例化为queueptr ,并将其传递给AudioQueue.newInput并尝试调用queueptr.get() 。 有什么我在这里失踪?

java中没有堆栈跟踪,但这里是XCode Organizer设备日志:

 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 

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

另外,我在这里发布了一个完整的工作示例: 使用AudioQueue录制演示的RoboVM实现会导致“找不到@Marshaler”错误