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

Application crashing when corrupt image is decoded, can't try-catch #182

Closed
nlw0 opened this issue Jun 16, 2020 · 2 comments
Closed

Application crashing when corrupt image is decoded, can't try-catch #182

nlw0 opened this issue Jun 16, 2020 · 2 comments

Comments

@nlw0
Copy link

nlw0 commented Jun 16, 2020

I'm writing a Gtk app where png images get decoded by ImageMagick.jl. Sometimes I hit a corrupt file, and this ends up triggering these lines


status == 0 && error(wand)

Right now this ends up making my application crash. I would like to try-catch here and recover, if possible. Are there any changes that would be necessary in the library, or am I doing something wrong?

@timholy
Copy link
Member

timholy commented Jun 16, 2020

The title here says, "can't try/catch, but I don't understand why that doesn't work. Are you calling this from a Gtk callback? Do you need a @guarded? Does it work if you try to load one of the busted files from the REPL rather than your Gtk application?

@nlw0
Copy link
Author

nlw0 commented Jun 29, 2020

It's hard for me to reproduce this now, sorry I guess I was fishing for a bug. try-catching load_ works fine in the REPL, I guess if there was any issues it's in my code.

@nlw0 nlw0 closed this as completed Jun 29, 2020
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