FLIF-hub / FLIF

Free Lossless Image Format
Other
3.72k stars 229 forks source link

Handle error in viewflif gracefully #413

Closed hrj closed 7 years ago

hrj commented 7 years ago

This was originally created to address #412 In my system before the fix, viewflif goes into an infinite loop (because d doesn't become NULL). There is no seg fault. After these changes, viewflif closes gracefully.

I thought the seg fault seen by @matthiaskrgr would go away too, but probably that's a different issue (see comments below).

matthiaskrgr commented 7 years ago

I can still reproduce with this changeset, still crashing. :/

hrj commented 7 years ago

@matthiaskrgr Does it crash always or sometimes?

There is a small chance that there is a race condition. But if it is crashing always then there is some other problem, because it is not crashing even once for me, with this change.

Just to be sure, can you do a make clean and then a make viewflif?

matthiaskrgr commented 7 years ago

I freshly cloned the UprootStaging repo and checked out the branch for testing so there is no need for a clean build.

Hmm, it looks like there is a very high probability of crashing on my sys. With the crash command, it only did NOT crash one in 30 times.

hrj commented 7 years ago

@matthiaskrgr Hmm, there is probably some other problem which is compounding with the issue that this PR fixes.

I will remove the closes #412 comment so that the issue remains open, but this PR can be merged.

matthiaskrgr commented 7 years ago

Ok