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

ios: use a default error text instead of crashing #661

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

markusfisch
Copy link
Contributor

Because e.what() returns nil sometimes, what is causing a crash when initializing the dictionary.

Because `e.what()` returns `nil` sometimes, what is causing
a crash when initializing the dictionary.
@axxel
Copy link
Collaborator

axxel commented Nov 14, 2023

Do you see any chance to reproduce the issue? According to https://stackoverflow.com/a/1038504 e.what() can only return nullptr if a custom class returns that (or the iOS stdlib implementation is buggy). If there is an issue we can fix somewhere in the writer implementation, I'd prefer that.

@markusfisch
Copy link
Contributor Author

No, unfortunately we don't have a sample or any more info 🤷‍♂️ But we're seeing this crash happening to our users in our crash logging system.

@axxel axxel merged commit 64cf059 into zxing-cpp:master Nov 15, 2023
9 of 10 checks passed
@axxel
Copy link
Collaborator

axxel commented Nov 15, 2023

I checked all throw statements and this looks like a bug in the libc++ implementation on iOS. weird.

@axxel
Copy link
Collaborator

axxel commented Nov 16, 2023

It is so nice if unrelated compilation issues (see recent wasm build failures) that randomly show up can also randomly disappear again... ;)

@markusfisch
Copy link
Contributor Author

Well, in my experience, such random issues unfortunately always come back 😉

(And I was wondering about the wasm build failures already, too).

@markusfisch markusfisch deleted the ios_fix_crash_error_text_nil branch February 27, 2024 10:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants