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

bus error: 10 #34

Closed
renatosc opened this Issue Feb 16, 2017 · 10 comments

Comments

Projects
None yet
2 participants
@renatosc

renatosc commented Feb 16, 2017

I am using the OSX version.

When I first run qgerbil and opened a simple JPG file it worked fine. After I closed the problem and executed again with another image, the app closes and shows "Bus error: 10". Now all simple JPG/PNG images that I try to load I get that error, even the one that I opened first.

Any idea why is that?

abc$ ./gerbil/gerbil/bin/qgerbil ; exit;
Reading image: /Users/abc/Downloads/test.JPG
Reading band 0: 460 nm
Reading band 1: 540 nm
Reading band 2: 620 nm
ImageModel::respawn(): ignored, no payload available.
ImageModel::respawn(): ignored, no payload available.
ImageModel::respawn(): ignored, no payload available.
Bus error: 10
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]
@renatosc

This comment has been minimized.

Show comment
Hide comment
@renatosc

renatosc Feb 16, 2017

After some digging, I found that if I remove the org.gerbilvis.Gerbil.plist from my ~/Library/Preferences (which appears to be the file that saves session,...) I am able to run qgerbil and select a new image and it opens. But if I try to run it again later, I gets the Bus error: 10.

So, basically, I can run qgerbil only once. If I want to run it again, I need to remove that file.

After some digging, I found that if I remove the org.gerbilvis.Gerbil.plist from my ~/Library/Preferences (which appears to be the file that saves session,...) I am able to run qgerbil and select a new image and it opens. But if I try to run it again later, I gets the Bus error: 10.

So, basically, I can run qgerbil only once. If I want to run it again, I need to remove that file.

@ypnos

This comment has been minimized.

Show comment
Hide comment
@ypnos

ypnos Feb 16, 2017

Member

Did you compile from git or are you using the macports package?

We are aware of a problem with starting from some saved states, however this might be a bit different.
Are you opening/closing any viewports while Gerbil is running? Does it also occur when you just open the image and immediately close the application window again?

Member

ypnos commented Feb 16, 2017

Did you compile from git or are you using the macports package?

We are aware of a problem with starting from some saved states, however this might be a bit different.
Are you opening/closing any viewports while Gerbil is running? Does it also occur when you just open the image and immediately close the application window again?

@renatosc

This comment has been minimized.

Show comment
Hide comment
@renatosc

renatosc Feb 17, 2017

I compiled from the git and added all dependencies via homebrew.

I just open the image and then I immediately close the program. Next time that I try to open I get that error.

I tried here to instead of opening the same plain jpg image again, to open a txt file/image with 148 bands. The app also crashes but instead of the getting the bus error 10, I get segmentation fault 11.

abc $ /Users/abc/Downloads/gerbil/gerbil/bin/qgerbil ; exit;
Added /Users/abc/Downloads/gerbil/imagehs copy/memorialchurch//memorialchurch_01.png:	1 channel, 16 bits, 414.724 nm
Added /Users/abc/Downloads/gerbil/imagehs copy/memorialchurch//memorialchurch_02.png:	1 channel, 16 bits, 418.369 nm
...
...
...
Added /Users/abc/Downloads/gerbil/imagehs copy/memorialchurch//memorialchurch_148.png:	1 channel, 16 bits, 950.499 nm
Total of 148 bands. Spatial size: 1541x1088   (946.571 MB)
ImageModel::respawn(): ignored, no payload available.
ImageModel::respawn(): ignored, no payload available.
ImageModel::respawn(): ignored, no payload available.
Segmentation fault: 11
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Since the app crashes, the OS X asks me if I want to send the crash report to Apple. I copied both crash reports (bus error 10 & segmentation fault 11) and they are on the link below:

bus error 10: http://pastebin.com/06TyEy3B
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000011d509000

segmentation fault 11: http://pastebin.com/TKZT4T0J
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000015d828000

Funny though is that I just compiled here in another macbook (using the same process with same software/dependencies versions) that runs the same OS X version (10.11.6) and there is running fine without that bug.

So, it appears that the problem is related to something in my machine....

I compiled from the git and added all dependencies via homebrew.

I just open the image and then I immediately close the program. Next time that I try to open I get that error.

I tried here to instead of opening the same plain jpg image again, to open a txt file/image with 148 bands. The app also crashes but instead of the getting the bus error 10, I get segmentation fault 11.

abc $ /Users/abc/Downloads/gerbil/gerbil/bin/qgerbil ; exit;
Added /Users/abc/Downloads/gerbil/imagehs copy/memorialchurch//memorialchurch_01.png:	1 channel, 16 bits, 414.724 nm
Added /Users/abc/Downloads/gerbil/imagehs copy/memorialchurch//memorialchurch_02.png:	1 channel, 16 bits, 418.369 nm
...
...
...
Added /Users/abc/Downloads/gerbil/imagehs copy/memorialchurch//memorialchurch_148.png:	1 channel, 16 bits, 950.499 nm
Total of 148 bands. Spatial size: 1541x1088   (946.571 MB)
ImageModel::respawn(): ignored, no payload available.
ImageModel::respawn(): ignored, no payload available.
ImageModel::respawn(): ignored, no payload available.
Segmentation fault: 11
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Since the app crashes, the OS X asks me if I want to send the crash report to Apple. I copied both crash reports (bus error 10 & segmentation fault 11) and they are on the link below:

bus error 10: http://pastebin.com/06TyEy3B
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000011d509000

segmentation fault 11: http://pastebin.com/TKZT4T0J
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000015d828000

Funny though is that I just compiled here in another macbook (using the same process with same software/dependencies versions) that runs the same OS X version (10.11.6) and there is running fine without that bug.

So, it appears that the problem is related to something in my machine....

@ypnos

This comment has been minimized.

Show comment
Hide comment
@ypnos

ypnos Feb 17, 2017

Member

Thank you for the very detailed report. It sheds some new light on the previously known issue.

I will prepare a patch later today that removes the state saving functionality while we can further investigate this or put it on hold while we incorporate the new data handling.

It seems to me the bus error 10 is just a segmentation fault in disguise. Segmentation faults are tricky beasts, they only occur under specific circumstances, so it is a typical phenomenom that you get them on one machine but not another.

Member

ypnos commented Feb 17, 2017

Thank you for the very detailed report. It sheds some new light on the previously known issue.

I will prepare a patch later today that removes the state saving functionality while we can further investigate this or put it on hold while we incorporate the new data handling.

It seems to me the bus error 10 is just a segmentation fault in disguise. Segmentation faults are tricky beasts, they only occur under specific circumstances, so it is a typical phenomenom that you get them on one machine but not another.

@renatosc

This comment has been minimized.

Show comment
Hide comment
@renatosc

renatosc Feb 18, 2017

Thanks.

I don't know if the state data stores more than the last image files used. If does, and the bug not always happen, maybe you could just leave the state saving (so people without the bug can continue taking advantage of it) and just add a new argument to open the file ignoring the state data (something like qgerbil -ignore). Just an idea.

Best,

Thanks.

I don't know if the state data stores more than the last image files used. If does, and the bug not always happen, maybe you could just leave the state saving (so people without the bug can continue taking advantage of it) and just add a new argument to open the file ignoring the state data (something like qgerbil -ignore). Just an idea.

Best,

@ypnos

This comment has been minimized.

Show comment
Hide comment
@ypnos

ypnos Feb 18, 2017

Member

You can already open a file directly with /Users/abc/Downloads/gerbil/gerbil/bin/qgerbil <filename>, and if you have a labeling for it, /Users/abc/Downloads/gerbil/gerbil/bin/qgerbil <imagefile> <labelfile>. Does that change anything?

Member

ypnos commented Feb 18, 2017

You can already open a file directly with /Users/abc/Downloads/gerbil/gerbil/bin/qgerbil <filename>, and if you have a labeling for it, /Users/abc/Downloads/gerbil/gerbil/bin/qgerbil <imagefile> <labelfile>. Does that change anything?

@renatosc

This comment has been minimized.

Show comment
Hide comment

No.. same issue...

Here is a screen record: https://www.dropbox.com/s/28uf0anxug9cak6/gerbil_bug.mov?dl=0

@ypnos

This comment has been minimized.

Show comment
Hide comment
@ypnos

ypnos Feb 19, 2017

Member

Thank you! This is what I expected. I'm working on it.

Member

ypnos commented Feb 19, 2017

Thank you! This is what I expected. I'm working on it.

ypnos added a commit that referenced this issue Feb 19, 2017

disable state loading for elements deemed dangerous
affects open docks/viewports, selected false coloring
temporary action until new data handling is incorporated
see #34
@ypnos

This comment has been minimized.

Show comment
Hide comment
@ypnos

ypnos Feb 19, 2017

Member

Could you please try current master?

Member

ypnos commented Feb 19, 2017

Could you please try current master?

@renatosc

This comment has been minimized.

Show comment
Hide comment
@renatosc

renatosc Feb 20, 2017

Yes, it is working now. Thanks!

Yes, it is working now. Thanks!

@renatosc renatosc closed this Mar 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment