-
Notifications
You must be signed in to change notification settings - Fork 76
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
Crash reported parsing markdown #69
Comments
@tsfischer Can you confirm that:
Can you give more details about the value of |
Thanks much for your response. Since writing this post, I discovered that our customer was deleting all fonts from the /Library/Fonts folder and that was causing this crash. They are a publishing house and want to clear out this folder for copyright reasons. For the short term, we told them to put fonts back until the crash goes away... but it would be nice if TSMarkdownParser wouldn't crash if it encounters a missing font. As a note, they aren't actually using markdown... so only normal strings (no markdown tags) are being used and no additional fonts requested. |
I'll be working on TSMarkdownParser today, so it's your chance. But I need a way to reproduce the issue. You're mentioning fonts, but the code you gave is about |
I tried this:
And I got a correct print with no crash:
But we have font usage when dealing with:
So I tried:
But I still didn't get any crash on macOS High Sierra (10.13.3). Please help to reproduce the issue, @tsfischer. And if you're removing a font from the app, then you should overwrite the default settings from the app that were using this font:
|
Oh, OK, I start to understand. If you remove
And this will be caused by:
I'll workaround this. |
Fixed in 2.1.4 |
Actually a duplicate of #58 |
* master: fix macOS example updating to 2.1.4 #69: avoiding crash if font is missing project clang warning update Add Syntax Highlighting Add spacing to headers updating to 2.1.3 simplification of the enumeration # Fix for Issue #62 # Ensured that autodetect linking does not overlap existing links; which happens in case the link text contains text that could be auto detected as links. adding myself as author updating to 2.1.2 add ercentEscapesUsingEncoding # Conflicts: # CHANGELOG.md # README.md # TSMarkdownParser.podspec # TSMarkdownParser.xcodeproj/project.pbxproj # TSMarkdownParser/TSMarkdownParser.m # TSMarkdownParserExample OSX/ViewController.m # TSMarkdownParserTests/TSMarkdownParserTests.m
We have had a significant number of crashes reported from the field via Crashlytics. The crash is:
Fatal Exception: NSInvalidArgumentException
*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
and the call stack looks like:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x7fffc5cb72b3 (Missing)
1 libobjc.A.dylib 0x7fffdaace48d (Missing)
2 CoreFoundation 0x7fffc5bb43f0 (Missing)
3 CoreFoundation 0x7fffc5bb425b (Missing)
4 TSMarkdownParser 0x10a1707ad (Missing)
5 TSMarkdownParser 0x10a170991 (Missing)
6 Self Service 0x109af1fde specialized SSHistoryContentCellView.(content.didset).(closure #1) (SSHistoryContentCellView.swift:37)
Here is the SSHistoryContentCellView code in question:
Looking at the pod code and our own code, the only usage of NSDictionary is for the attributes. But I am passing in a constant for the attributes dictionary, so that should never go null. I am at a loss of what might be causing this, and I am unable to reproduce it in-house.
The text was updated successfully, but these errors were encountered: