Hi News Anchor users,
This is a followup to my earlier post on News Anchor 2.4.6 Beta 1. I’ve decided not to make that version generally available due to a crashing bug and have a Beta 3 release for another round of testing. What happened to Beta 2? There wasn’t much change there worthy of a blog post and I’ve just updated that last post to use the Beta 2 binary. You can download News Anchor 2.4.6 Beta 3 from this link.
It looks like enabling garbage collection did more harm than good. The garbage collector triggers consistent crashes when playing a channel episode that’s just been generated while the refresh cycle is still running. You can easily reproduce the crash in Beta 1 by following these steps:
- Delete the News Anchor data file (to force refresh of all channels).
- Click on Refresh.
- Wait until at least one episode is created (watch the channels and look for the one that recently changes to your current date).
- Click on that channel to play its latest episode.
- Wait for the newscaster to speak and present the first news item with an image.
In my tests, this almost always pops up the crash reporter but the user interface freezes. Strange enough, the newscaster keeps on talking as if nothing had happened. When I look at the Console log, it’s quite apparent that QuartzCore was crashing News Anchor:
17/4/12 7:38:56.100 PM NewsAnchor: ( 0 CoreFoundation 0x00007fff8b873fc6 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff84026d5e objc_exception_throw + 43 2 CoreFoundation 0x00007fff8b8fe2a9 -[NSException raise] + 9 3 ExceptionHandling 0x000000010011fe0a NSExceptionHandlerUncaughtSignalHandler + 37 4 libsystem_c.dylib 0x00007fff81fffcfa _sigtramp + 26 5 ??? 0x0000000000000000 0x0 + 0 6 QuartzCore 0x00007fff84962b34 magazine_dealloc + 388 7 QuartzCore 0x00007fff849632ed x_mem_dealloc_chain + 80 8 QuartzCore 0x00007fff8497d19e _ZN2CA6Render9LayerNode11delete_nodeEPS1_ + 424 9 QuartzCore 0x00007fff84966183 _ZN2CA6Render6Handle15invalidate_nodeEv + 49 10 QuartzCore 0x00007fff84964d20 _ZN2CA6Render7Context10set_objectEmjPNS0_6ObjectEj + 1052 11 QuartzCore 0x00007fff8499c671 _ZN2CA7Context12commit_layerEPNS_5LayerEjjPv + 183 12 QuartzCore 0x00007fff84991255 _ZN2CA5Layer16commit_if_neededEPNS_11TransactionEPFvPS0_jjPvES4_ + 327 13 QuartzCore 0x00007fff8498f91c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 804 14 QuartzCore 0x00007fff8498f4b4 _ZN2CA11Transaction6commitEv + 274 15 QuartzCore 0x00007fff8498eab5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 63 16 CoreFoundation 0x00007fff8b833bd7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 17 CoreFoundation 0x00007fff8b833b36 __CFRunLoopDoObservers + 374 18 CoreFoundation 0x00007fff8b808dd6 __CFRunLoopRun + 1062 19 CoreFoundation 0x00007fff8b808676 CFRunLoopRunSpecific + 230 20 HIToolbox 0x00007fff82a3f31f RunCurrentEventLoopInMode + 277 21 HIToolbox 0x00007fff82a465c9 ReceiveNextEventCommon + 355 22 HIToolbox 0x00007fff82a46456 BlockUntilNextEventMatchingListInMode + 62 23 AppKit 0x00007fff84f0bf5d _DPSNextEvent + 659 24 AppKit 0x00007fff84f0b861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 25 AppKit 0x00007fff84f0819d -[NSApplication run] + 470 26 AppKit 0x00007fff85186b88 NSApplicationMain + 867 27 NewsAnchor 0x0000000100002c34 main + 3108 )
As you can see for yourself, none of the crash dump involves any of News Anchor’s code (all are Apple’s classes). Perhaps QuartzCore wasn’t 100% compatible with garbage collection – no wonder Apple deprecates garbage collection starting from OS X 10.5 “Lion”.
Thanks and till next time!