Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample apps not working after #49 merge #50

Closed
tsfischer opened this issue Sep 10, 2019 · 3 comments
Closed

Sample apps not working after #49 merge #50

tsfischer opened this issue Sep 10, 2019 · 3 comments

Comments

@tsfischer
Copy link

Thanks for merging #49. However I went to try out the example app on both mac and iOS and it fails. In either case I get an exception... on iOS this crashes the app and on Mac it just fails to render anything.

The exception happens in CMAttributedStringRenderer:appendString because string parm is nil. This seems to go deep into the parsing logic which I didn't fully debug into yet.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSConcreteAttributedString initWithString:: nil value'
*** First throw call stack:
(
0 CoreFoundation 0x00000001116f98db __exceptionPreprocess + 331
1 libobjc.A.dylib 0x00000001104e3ac5 objc_exception_throw + 48
2 CoreFoundation 0x00000001116f9735 +[NSException raise:format:] + 197
3 Foundation 0x000000010fb538f6 -[NSConcreteAttributedString initWithString:] + 135
4 Foundation 0x000000010fb539e9 -[NSConcreteAttributedString initWithString:attributes:] + 27
5 CocoaMarkdown 0x000000010f9669f8 -[CMAttributedStringRenderer appendString:] + 152
6 CocoaMarkdown 0x000000010f963a5b -[CMAttributedStringRenderer parser:foundText:] + 315
7 CocoaMarkdown 0x000000010f94a9ca -[CMParser handleNode:event:] + 778
8 CocoaMarkdown 0x000000010f94a567 __17-[CMParser parse]_block_invoke + 151
9 CocoaMarkdown 0x000000010f949eb7 -[CMIterator enumerateUsingBlock:] + 487
10 CocoaMarkdown 0x000000010f94a484 -[CMParser parse] + 244
11 CocoaMarkdown 0x000000010f96370b -[CMAttributedStringRenderer render] + 315
12 Example-iOS 0x000000010f5b9325 $s11Example_iOS14ViewControllerC11viewDidLoadyyF + 1765
13 Example-iOS 0x000000010f5b9784 $s11Example_iOS14ViewControllerC11viewDidLoadyyFTo + 36
14 UIKitCore 0x000000011978e0f7 -[UIViewController loadViewIfRequired] + 1183
15 UIKitCore 0x000000011978e524 -[UIViewController view] + 27
16 UIKitCore 0x0000000119dc722b -[UIWindow addRootViewControllerViewIfPossible] + 122
17 UIKitCore 0x0000000119dc791f -[UIWindow _setHidden:forced:] + 289
18 UIKitCore 0x0000000119dda57e -[UIWindow makeKeyAndVisible] + 42
19 UIKitCore 0x0000000119d8a33c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4555
20 UIKitCore 0x0000000119d8f4e6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
21 UIKitCore 0x00000001195d3a4e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
22 UIKitCore 0x00000001195dc346 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
23 UIKitCore 0x00000001195d3664 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
24 UIKitCore 0x00000001195d3fc0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
25 UIKitCore 0x00000001195d2332 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
26 UIKitCore 0x00000001195d1fe9 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
27 UIKitCore 0x00000001195d6d2e __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
28 UIKitCore 0x00000001195d7988 _performActionsWithDelayForTransitionContext + 100
29 UIKitCore 0x00000001195d6a95 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
30 UIKitCore 0x00000001195dba48 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
31 UIKitCore 0x0000000119d8ddc8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
32 UIKitCore 0x000000011994502f -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
33 FrontBoardServices 0x000000011cbead25 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
34 FrontBoardServices 0x000000011cbf4ad6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
35 FrontBoardServices 0x000000011cbf4300 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
36 libdispatch.dylib 0x0000000112a21db5 _dispatch_client_callout + 8
37 libdispatch.dylib 0x0000000112a252ba _dispatch_block_invoke_direct + 300
38 FrontBoardServices 0x000000011cc260da FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30
39 FrontBoardServices 0x000000011cc25d92 -[FBSSerialQueue _performNext] + 451
40 FrontBoardServices 0x000000011cc26327 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
41 CoreFoundation 0x0000000111660db1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
42 CoreFoundation 0x0000000111660633 __CFRunLoopDoSources0 + 243
43 CoreFoundation 0x000000011165acef __CFRunLoopRun + 1231
44 CoreFoundation 0x000000011165a4d2 CFRunLoopRunSpecific + 626
45 GraphicsServices 0x0000000115ebd2fe GSEventRunModal + 65
46 UIKitCore 0x0000000119d90fc2 UIApplicationMain + 140
47 Example-iOS 0x000000010f5ba9eb main + 75
48 libdyld.dylib 0x0000000112a96541 start + 1
49 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@indragiek
Copy link
Owner

indragiek commented Sep 10, 2019

I'm unable to reproduce this issue, I made a fresh clone of the repo after the #49 merge and ran both apps, I see the following:

Screen Shot 2019-09-10 at 12 55 16 PM

Screen Shot 2019-09-10 at 12 54 37 PM

Could you try cloning a new copy of the repo & cleaning your build artifacts (delete DerivedData)?

@tsfischer
Copy link
Author

Good to know... I will try this!

@tsfischer
Copy link
Author

Yeah that worked now. Thanks and sorry for the false report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants