I am seeing a crash in SceneKit that I was not seeing before iOS 13.1.2.
I’ve traced the issue to the following function and cannot completely suss out what is causing the issue.
If I comment out the line which runs the action on the node, all is well.
I can run playAudio actions on other pre-existing nodes in the scene but when I simply want to have a one-shot sound play using the below function, the app crashes.
So my thought is that perhaps this has something to do with the way I am instantiating the node but I cannot think of another way to instantiate a node just to play a sound at a given position.
I’ve also tried using a recycled audio source but that makes no difference.
Might anyone have any ideas what might be going on in this code to cause a crash? It’s just not obvious to me, especially since this had worked flawlessly before the iOS updates.
I’ve included the back trace below.
Thanks so much for any help / ideas!
Have a great weekend!
Cheers!
func play(sound: String, atPosition: SCNVector3, volume: Float, pitch: Float, loops: Bool, positional: Bool) {
// Sources will be pre-loaded and recycled for the finished app
if let source = SCNAudioSource(fileNamed: "art.scnassets/"+sound)
{
source.volume = volume
source.rate = pitch
source.isPositional = positional
source.shouldStream = false
source.loops = loops
source.load()
let node = SCNNode()
node.name = "oneShot"
node.position = atPosition
scnScene.rootNode.addChildNode(node)
// node.runAction(SCNAction.sequence([SCNAction.playAudio(source, waitForCompletion: true), SCNAction.removeFromParentNode()]))
// This line causes the crash
node.runAction(SCNAction.playAudio(source, waitForCompletion: false))
}
}
thread #14, name = 'com.apple.scenekit.scnview-renderer', queue = 'com.apple.scenekit.renderingQueue.SCNView0x105a11e90', stop reason = EXC_BAD_ACCESS (code=1, address=0x830b67ea0)
frame #0: 0x00000001b08d7030 libobjc.A.dylibobjc_retain + 16
frame #1: 0x00000001bd5a90c4 AVFAudio-[AVAudioPlayerNode didAttachToEngine:] + 140
frame #2: 0x00000001bd5b66e8 AVFAudioAVAudioEngineImpl::AttachNode(AVAudioNode*, bool) + 272
frame #3: 0x00000001bd5b2324 AVFAudio-[AVAudioEngine attachNode:] + 80
frame #4: 0x00000001c4aea48c SceneKitCPP3DAudioContext::AddVoice(void const*) + 120
frame #5: 0x00000001c4aeacf0 SceneKitCPP3DAudioEngine::AddVoice(void const*) + 192
frame #6: 0x00000001c49bd618 SceneKitC3DNodeAddAudioPlayer + 40
frame #7: 0x00000001c4a07924 SceneKit-[SCNNode addAudioPlayer:] + 132
frame #8: 0x00000001c49325e0 SceneKitSCNCPlaySound::cpp_updateWithTargetForTime(SCNNode*, double) + 96
frame #9: 0x00000001c499c690 SceneKitSCNActionApply + 112
frame #10: 0x00000001c4a2d7a4 SceneKit_applyActions + 236
frame #11: 0x00000001b0a8e1b8 CoreFoundation-[NSFrozenDictionaryM __apply:context:] + 128
frame #12: 0x00000001c4a2d5c8 SceneKitC3DAnimationManagerApplyActions + 104
frame #13: 0x00000001c4a173e4 SceneKit-[SCNRenderer _update:] + 576
frame #14: 0x00000001c4a19a04 SceneKit-[SCNRenderer _drawSceneWithNewRenderer:] + 200
frame #15: 0x00000001c4a19fbc SceneKit-[SCNRenderer _drawScene:] + 48
frame #16: 0x00000001c4a1a350 SceneKit-[SCNRenderer _drawAtTime:] + 616
frame #17: 0x00000001c4ab46b8 SceneKit-[SCNView _drawAtTime:] + 428
frame #18: 0x00000001c497ae38 SceneKit__69-[NSObject(SCN_DisplayLinkExtensions) SCN_setupDisplayLinkWithQueue:]_block_invoke + 56
frame #19: 0x00000001c4a7fe48 SceneKit__36-[SCNDisplayLink _callbackWithTime:]_block_invoke + 64
frame #20: 0x0000000105726c04 libdispatch.dylib_dispatch_client_callout + 16
frame #21: 0x0000000105735888 libdispatch.dylib_dispatch_lane_barrier_sync_invoke_and_complete + 124
frame #22: 0x00000001c4a7fdd8 SceneKit-[SCNDisplayLink _callbackWithTime:] + 232
frame #23: 0x00000001058f95f8 GPUToolsCore-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 168
frame #24: 0x00000001b73da514 QuartzCoreCA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 632
frame #25: 0x00000001b1acdeb0 IOKitIODispatchCalloutFromCFMessage + 488
frame #26: 0x00000001b0ae96d4 CoreFoundation__CFMachPortPerform + 172
frame #27: 0x00000001b0b12e5c CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 56
frame #28: 0x00000001b0b12588 CoreFoundation__CFRunLoopDoSource1 + 444
frame #29: 0x00000001b0b0d45c CoreFoundationCFRunLoopRun + 2168
frame #30: 0x00000001b0b0c8bc CoreFoundationCFRunLoopRunSpecific + 464
frame #31: 0x00000001b0e4c994 Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228
frame #32: 0x00000001c497b214 SceneKit__71-[SCNView(SCNDisplayLink) _initializeDisplayLinkWithCompletionHandler:]_block_invoke + 456
frame #33: 0x00000001c497b45c SceneKit__SCNRenderThread_start + 96
frame #34: 0x00000001b08b11ec libsystem_pthread.dylib`_pthread_start + 124
just wanted to update my question to say that this issue has resolved itself after updating to iOS 13.2. -My thanks to Apple. :)
Related
My iOS app is using GLKViewController to display data received from an external camera streaming on a local network. However, after a few hours it hangs and the app becomes not responsive. If I pause the execution on the debugger, I can see that the app is actually running (network threads for instance are alive) but the Update and DrawInRect methods are not being fired and the main thread seems to be stuck.
In particular, backtracing threads produces this output as far as gpu related threads are concerned:
thread #1, queue = 'gputools.DYSharedMemoryTransport.0x102d00000.send', stop reason = instruction step over
* frame #0: 0x00000001f88c559c libsystem_c.dylib`nanosleep + 160
frame #1: 0x00000001f88c54a4 libsystem_c.dylib`usleep + 64
frame #2: 0x0000000102933780 GPUToolsCore`-[DYSharedMemoryTransport _waitEAGAIN] + 40
frame #3: 0x0000000102957510 GPUToolsCore`-[DYBaseStreamTransport _writeBuffers:] + 232
frame #4: 0x0000000102957b00 GPUToolsCore`-[DYBaseStreamTransport _sendMessage:error:] + 508
frame #5: 0x0000000102946064 GPUToolsCore`__63-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:]_block_invoke.223 + 116
frame #6: 0x0000000102314de4 libdispatch.dylib`_dispatch_client_callout + 16
frame #7: 0x0000000102323d18 libdispatch.dylib`_dispatch_sync_invoke_and_complete_recurse + 132
frame #8: 0x0000000102945e38 GPUToolsCore`-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 644
frame #9: 0x0000000102932530 GPUToolsCore`-[DYSharedMemoryTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 252
frame #10: 0x00000001024a5120 libglInterpose.dylib`handle_frame_boundary + 472
frame #11: 0x00000001026917a0 libglInterpose.dylib`_EAGLContext_PresentInterposeCommon(EAGLContext*, unsigned int, unsigned long, double, bool () block_pointer) + 988
frame #12: 0x000000010268f074 libglInterpose.dylib`EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned long) + 80
frame #13: 0x0000000205f8192c GLKit`-[GLKView _display:] + 308
frame #14: 0x0000000205f82b08 GLKit`-[GLKViewController _updateAndDraw] + 520
frame #15: 0x000000010293d66c GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 176
frame #16: 0x00000001fd270574 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 828
frame #17: 0x00000001f901a58c IOKit`IODispatchCalloutFromCFMessage + 488
frame #18: 0x00000001f8d223e4 CoreFoundation`__CFMachPortPerform + 188
frame #19: 0x00000001f8d49c30 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
frame #20: 0x00000001f8d4937c CoreFoundation`__CFRunLoopDoSource1 + 440
frame #21: 0x00000001f8d44134 CoreFoundation`__CFRunLoopRun + 2140
frame #22: 0x00000001f8d435b8 CoreFoundation`CFRunLoopRunSpecific + 436
frame #23: 0x00000001fafb7584 GraphicsServices`GSEventRunModal + 100
frame #24: 0x0000000225383558 UIKitCore`UIApplicationMain + 212
frame #25: 0x0000000100471798 KiberField`main(argc=1, argv=0x000000016f9f7780) at main.m:14:16
frame #26: 0x00000001f8803b94 libdyld.dylib`start + 4
thread #2, name = 'gputools.smt_poll.0x281b4a8a0'
frame #0: 0x00000001f8950428 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x00000001f88c55d0 libsystem_c.dylib`nanosleep + 212
frame #2: 0x00000001f88c54a4 libsystem_c.dylib`usleep + 64
frame #3: 0x0000000102932df4 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x00000001f89d42fc libsystem_pthread.dylib`_pthread_body + 128
frame #5: 0x00000001f89d425c libsystem_pthread.dylib`_pthread_start + 48
frame #6: 0x00000001f89d7d08 libsystem_pthread.dylib`thread_start + 4
thread #3, name = 'gputools.smt_poll.0x281b58ce0'
frame #0: 0x00000001f8950428 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x00000001f88c55d0 libsystem_c.dylib`nanosleep + 212
frame #2: 0x00000001f88c54a4 libsystem_c.dylib`usleep + 64
frame #3: 0x0000000102932df4 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x00000001f89d42fc libsystem_pthread.dylib`_pthread_body + 128
frame #5: 0x00000001f89d425c libsystem_pthread.dylib`_pthread_start + 48
frame #6: 0x00000001f89d7d08 libsystem_pthread.dylib`thread_start + 4
My question is: what could be possibly blocking the thread?
Alternatively, I can detect this deadlock with a timeout timer checked in another thread: is there a way to unblock the graphical thread (for instance manually calling Update or whatever else) ?
I met this problem also.I use the 'RTCEAGLVideoView' in webrtc to display video images.The main thread seems won't get cpu time anymore!Could this is a bug in iPadOS 13?
I am using pdfTron with iOS. I have successfully integrated PDFTron with my iOS application.
Now I am facing an issue where in if an already made annotation is selected and I try to go back from the view, the application is crashing with EXC_BAD_ACCESS error. I am able to see the previous screen while going back. After the previous screen appears, then the app gets crashed in main. This does not happen when I come back without the annotation being selected.
* thread #1: tid = 0x14c78, 0x0281b3f6 myProject`___lldb_unnamed_symbol40638$$myProject + 22, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x800000a0)
frame #0: 0x0281b3f6 myProject`___lldb_unnamed_symbol40638$$myProject + 22
frame #1: 0x0250ce31 myProject`___lldb_unnamed_symbol28291$$myProject + 49
frame #2: 0x01bf03f8 myProject`TRN_AnnotIsValid + 40
frame #3: 0x01afd0ba myProject`ObjCPP_PTAnnot_IsValid + 34
frame #4: 0x01a80e0a myProject`-[PTAnnot IsValid] + 32
frame #5: 0x0199d062 myProject`-[AnnotEditTool deselectAnnotation] + 66
frame #6: 0x0198e96b myProject`-[AnnotEditTool willMoveToSuperview:] + 91
frame #7: 0x066e21ce UIKit`__UIViewWillBeRemovedFromSuperview + 305
frame #8: 0x066e1ee3 UIKit`-[UIView(Hierarchy) removeFromSuperview] + 99
frame #9: 0x019a0c09 myProject`-[ToolManager dealloc] + 73
frame #10: 0x06ef413d UIKit`-[UIView(UIKitManual) release] + 142
frame #11: 0x01a7acae myProject`-[PTPDFViewCtrl dealloc] + 588
frame #12: 0x06ef413d UIKit`-[UIView(UIKitManual) release] + 142
frame #13: 0x08e0ca57 CoreFoundation`CFRelease + 727
frame #14: 0x08e2285e CoreFoundation`-[__NSArrayM dealloc] + 142
frame #15: 0x08966060 libobjc.A.dylib`objc_object::sidetable_release(bool) + 238
frame #16: 0x08965361 libobjc.A.dylib`objc_release + 65
frame #17: 0x0896652d libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 371
frame #18: 0x08e2d508 CoreFoundation`_CFAutoreleasePoolPop + 24
frame #19: 0x08e65cdc CoreFoundation`__CFRunLoopRun + 2364
frame #20: 0x08e650e6 CoreFoundation`CFRunLoopRunSpecific + 470
frame #21: 0x08e64efb CoreFoundation`CFRunLoopRunInMode + 123
frame #22: 0x0a49a664 GraphicsServices`GSEventRunModal + 192
frame #23: 0x0a49a4a1 GraphicsServices`GSEventRun + 104
frame #24: 0x0662bbfa UIKit`UIApplicationMain + 160
* frame #25: 0x0013c23c myProject`main(argc=1, argv=0xbffaa928) + 140 at main.m:16
frame #26: 0x09e6ca21 libdyld.dylib`start + 1
The first thing that Annot::IsValid does is check if the pointer is null or not. So if IsValid is crashing, then this means the underlying PDFDoc object has been destroyed, or the underlying pointer is not valid somehow.
First thing to check is if the PDFDoc object is alive or not. If it is destroyed then no objects associated with it should be used.
Or, you deleted the Annotation object earlier somehow, or its underlying pointer got changed. Object references should not be kept around in case they do get moved/deleted. If you want to retain annotations for long term, please see this post.
Sometime after writing code to my project, I noticed the debugger would pause my application and put lldb in the console and couldn't let me continue. I used NSZombies and I got this message : "-[NSThread threadDictionary]: message sent to deallocated instance". I have looked around but couldn't find any help what is causing this. When I print the backtrace I get:
thread #17: tid = 0x7886f, 0x0000000180f7ab40 CoreFoundation`___forwarding___ + 700, stop reason = EXC_BREAKPOINT (code=1, subcode=0x180f7ab40)
frame #0: 0x0000000180f7ab40 CoreFoundation`___forwarding___ + 700
frame #1: 0x0000000180e78c5c CoreFoundation`_CF_forwarding_prep_0 + 92
frame #2: 0x00000001860536dc UIFoundation`+[NSStringDrawingTextStorageSettings threadSpecificStringDrawingTextStorageSettings:] + 64
frame #3: 0x000000018604900c UIFoundation`+[NSString(NSStringDrawing) typesetterBehavior] + 32
frame #4: 0x000000018604a6d4 UIFoundation`__NSStringDrawingEngine + 244
frame #5: 0x000000018604a4d0 UIFoundation`-[NSString(NSExtendedStringDrawing) drawWithRect:options:attributes:context:] + 176
frame #6: 0x00000001860eb564 UIKit`-[UILabel _drawTextInRect:baselineCalculationOnly:] + 3856
frame #7: 0x000000018615e8f0 UIKit`-[UILabel drawTextInRect:] + 544
frame #8: 0x000000018615e678 UIKit`-[UIView(CALayerDelegate) drawLayer:inContext:] + 368
frame #9: 0x0000000183a92230 QuartzCore`-[CALayer drawInContext:] + 260
frame #10: 0x0000000183a7c8b4 QuartzCore`CABackingStoreUpdate_ + 2432
frame #11: 0x0000000183b94360 QuartzCore`___ZN2CA5Layer8display_Ev_block_invoke + 52
frame #12: 0x0000000183a7ba90 QuartzCore`CA::Layer::display_() + 1368
frame #13: 0x0000000183a5d7b0 QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 228
frame #14: 0x0000000183a5d49c QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 44
frame #15: 0x0000000183a5cac0 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 252
frame #16: 0x0000000183a5c820 QuartzCore`CA::Transaction::commit() + 500
frame #17: 0x0000000183a8bbd4 QuartzCore`CA::Transaction::release_thread(void*) + 236
frame #18: 0x0000000180bda1e0 libsystem_pthread.dylib`_pthread_tsd_cleanup + 584
frame #19: 0x0000000180bd9d58 libsystem_pthread.dylib`_pthread_exit + 136
frame #20: 0x0000000180bd953c libsystem_pthread.dylib`_pthread_wqthread + 1296
frame #21: 0x0000000180bd9020 libsystem_pthread.dylib`start_wqthread + 4
Any help to find out whats going on will help tremendously!
Found out the problem was I had a label with a weak reference. I was hiding it for to long and it seems the garbage collection cleaned in up. So when I tried to send data to it, it was already dealloc.
Somewhere you are calling an instance method of any class and class object is nil.
The app crashes on the closing brace of viewDidLoad in the GameViewController. My viewDidLoad code looks like this:
override func viewDidLoad() {
super.viewDidLoad()
let scene = GameScene(size: CGSize(width: 768, height: 1024))
let skView = self.view as! SKView
skView.showsFields = true
skView.ignoresSiblingOrder = true
skView.showsPhysics = true
scene.scaleMode = .AspectFill
skView.presentScene(scene)
}
If I comment out the lines that create, scale, and present the GameScene then the app runs fine (it's essentially a blank view in this case). This tells me that there is obviously something going on in my GameScene class, but I cannot figure out exactly what.
When I run a backtrace, I get this:
(lldb) bt
* thread #1: tid = 0x1d9f18, 0x00000001002d5bac libglInterpose.dylib`EAGLContext_renderbufferStorageFromDrawable(EAGLContext*, objc_selector*, unsigned long, id<EAGLDrawable>) + 180, queue = 'com.apple.spritekit.renderQueue', stop reason = EXC_BAD_ACCESS (code=1, address=0x11f0)
frame #0: 0x00000001002d5bac libglInterpose.dylib`EAGLContext_renderbufferStorageFromDrawable(EAGLContext*, objc_selector*, unsigned long, id<EAGLDrawable>) + 180
frame #1: 0x0000000189252468 SpriteKit`-[SKView remakeFramebuffer:] + 600
frame #2: 0x0000000189252e44 SpriteKit`-[SKView _setupContext] + 832
frame #3: 0x0000000189253700 SpriteKit`-[SKView _renderContent] + 112
frame #4: 0x00000001008a4f94 libdispatch.dylib`_dispatch_client_callout + 16
frame #5: 0x00000001008af08c libdispatch.dylib`_dispatch_barrier_sync_f_invoke + 128
frame #6: 0x00000001892535a0 SpriteKit`-[SKView renderContent] + 100
frame #7: 0x0000000189254d24 SpriteKit`-[SKView layoutSubviews] + 564
frame #8: 0x00000001893dd760 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 580
frame #9: 0x0000000188d25e1c QuartzCore`-[CALayer layoutSublayers] + 152
frame #10: 0x0000000188d20884 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 320
frame #11: 0x0000000188d20728 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
frame #12: 0x0000000188d1febc QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 276
frame #13: 0x0000000188d1fc3c QuartzCore`CA::Transaction::commit() + 528
frame #14: 0x000000018966c838 UIKit`-[UIApplication _reportMainSceneUpdateFinished:] + 60
frame #15: 0x000000018966d71c UIKit`-[UIApplication _runWithMainScene:transitionContext:completion:] + 2804
frame #16: 0x000000018966b778 UIKit`-[UIApplication workspaceDidEndTransaction:] + 184
frame #17: 0x000000018d1a93c8 FrontBoardServices`__31-[FBSSerialQueue performAsync:]_block_invoke_2 + 32
frame #18: 0x000000018495827c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
frame #19: 0x0000000184957384 CoreFoundation`__CFRunLoopDoBlocks + 312
frame #20: 0x00000001849559a8 CoreFoundation`__CFRunLoopRun + 1756
frame #21: 0x00000001848812d4 CoreFoundation`CFRunLoopRunSpecific + 396
frame #22: 0x000000018944c43c UIKit`-[UIApplication _run] + 552
frame #23: 0x0000000189446fac UIKit`UIApplicationMain + 1488
* frame #24: 0x0000000100046804 Ascii Attack`main + 164 at AppDelegate.swift:11
frame #25: 0x000000019684aa08 libdyld.dylib`start + 4
(lldb)
But unfortunately I do not know where to go from here. I'm not really sure how to decipher the backtrace. I know that there is something wrong with my GameScene class, is there some way to figure out exactly what? Or do I have to test every property individually?
In addition to this, it turns out the app runs fine on my iPhone when I don't run the app in the debugger.
EDIT: The problem was resolved. It was apparently a bug with Xcode, not with any of my code. EXC_BAD_ACCESS at lauch for EAGLContext renderbufferStorage: fromDrawable: in Cocos2d app whie debugging
Turns out it was a bug with xcode rather than any code, as seen in this question: EXC_BAD_ACCESS at lauch for EAGLContext renderbufferStorage: fromDrawable: in Cocos2d app whie debugging.
Apparently EAGLcontext_renderBufferStorage can cause errors on iOS 8.3+. The solution to this is to change the scheme that you are using to disable GPU Frame Capture. Not entirely sure why this works, but it does!
I tried to create a UICollectionView using the Flow Layout.
The cells are simply text labels for the time being.
The first screen of cells is displayed just fine, but when I try to scroll, the simulator crashes.
The debugger shows the following messages:
(lldb) thread backtrace
* thread #1: tid = 0x39235a, 0x008440b2 libobjc.A.dylib`objc_msgSend + 14, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xa000000c)
* frame #0: 0x008440b2 libobjc.A.dylib`objc_msgSend + 14
frame #1: 0x01ab9b30 UIKit`-[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 257
frame #2: 0x01abb775 UIKit`-[UICollectionView _updateVisibleCellsNow:] + 4730
frame #3: 0x01abf65f UIKit`-[UICollectionView layoutSubviews] + 265
frame #4: 0x014e2964 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
frame #5: 0x0084682b libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
frame #6: 0x0280e45a QuartzCore`-[CALayer layoutSublayers] + 148
frame #7: 0x02802244 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 380
frame #8: 0x028020b0 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 26
frame #9: 0x027687fa QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 294
frame #10: 0x02769b85 QuartzCore`CA::Transaction::commit() + 393
frame #11: 0x0276a258 QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
frame #12: 0x02bd936e CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #13: 0x02bd92bf CoreFoundation`__CFRunLoopDoObservers + 399
frame #14: 0x02bb7254 CoreFoundation`__CFRunLoopRun + 1076
frame #15: 0x02bb69d3 CoreFoundation`CFRunLoopRunSpecific + 467
frame #16: 0x02bb67eb CoreFoundation`CFRunLoopRunInMode + 123
frame #17: 0x05f5b5ee GraphicsServices`GSEventRunModal + 192
frame #18: 0x05f5b42b GraphicsServices`GSEventRun + 104
frame #19: 0x01473f9b UIKit`UIApplicationMain + 1225
frame #20: 0x0002423c 8actions`main(argc=1, argv=0xbfffe610) + 156 at main.mm:15
I am using the latest version of rubymotion and the IOS Simulator set to iPhone 4 Inch with IOS 7.1.
The code I am using can be found here:
https://gist.github.com/jhmegorei/42c15038a34971ac5e8e
Note: I did not want to use a CollectionViewController, as I require the collection View to be just another view element that can be added to a normal UIView.
I would be glad if there is anyone who could help me investigate the root cause of this crash :)
There is no "MemoListViewDelegate.rb" in the gist. Did you mean "MemoListDataSource.rb" ?
Also, I assume you mean you changed
list_view.dataSource = MemoListDatasource.new
to
list_view.dataSource = self
as well as moving the data source methods in there.
Did you make any other changes to get it to work?