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

Seg fault when using spectral widget on (older) gzipped data with VELO-LSR velocity units #1014

Closed
jehibbard opened this issue Feb 4, 2022 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jehibbard
Copy link

Describe the bug
CARTA v3-2b has a deg fault when I try to open a gzipped file of an older data cube (with CTYPE units VELO-LSR)

To Reproduce
Steps to reproduce the behavior:

  1. Get the cube named "Tadpole-CARMA-CO-cube.fits" from https://www.cv.nrao.edu/~jhibbard/FITS/u10214/
  2. Gzip it
  3. open in in CARTA 3.0-2b
  4. in the standard view. change the channel and draw a region
  5. open a z-profile widget
  6. CARTA will disconnect, and the following error is reported in the xterm:

/usr/local/bin/carta: line 14: 41986 Segmentation fault: 11 carta_backend "$@"

  1. Conversely, if you have the zprofile widget already open and then draw a region, it again disconnects but now the error is something like:

carta_backend(41944,0x7000099ae000) malloc: *** error for object 0x7fe01804e590: pointer being freed was not allocated
carta_backend(41944,0x7000099ae000) malloc: *** set a breakpoint in malloc_error_break to debug
/usr/local/bin/carta: line 14: 41944 Abort trap: 6 carta_backend "$@"

Expected behavior
It should not disconnect, and display the spectra in the zprofile widget (as it does if the non-gzipped file is opened the same way)

Screenshots or videos
If applicable, add screenshots/videos to help explain your problem.

Platform info (please complete the following information):

  • OS: [e.g. iOS] macOS Catalina v10.15.7
  • Browser [e.g. chrome, safari] Safari v15.3
  • Version [e.g. 22] CARTA 3.0-2b

Additional context
Kuo-Song Wang said:
"This might have the same root cause as #999 but it is good to submit a new one in the backend repo."

@confluence
Copy link
Collaborator

Has this been fixed by #1119? Can we close it?

@jehibbard
Copy link
Author

Yes, I get the same error using v3-b3 and following steps 1-6 from my initial report.

@jehibbard
Copy link
Author

I tried another fits cube, this one with FELO-LSR velocity units (an old AIPS cube). I made a copy of it which I gizipped. I then loaded the non-gzipped fits cube, then appended the fits.gz one. CARTA did not disconnect, and things seemed to be going well (the two cubes went through animation together, the zspec looked the same). I opened a cursor info widget and confirmed that the values are the exact same as I move the cursor around. But then I opened two statistics widgets, and set the image for one to be the non-gzipped image, and the other to be the gzipped one. The first had reasonable values, but the second had all zeros except the NumPixels. There are a lot of "[error] FITS read data failed" messages in the console.

Then I drew a region on the non-gzipped image and that seemed ok, but as soon as I clicked on the gzipped image panel (with the zprofile displayed), it disconnected.

This is repeatable.

@kswang1029
Copy link
Contributor

I tried another fits cube, this one with FELO-LSR velocity units (an old AIPS cube). I made a copy of it which I gizipped. I then loaded the non-gzipped fits cube, then appended the fits.gz one. CARTA did not disconnect, and things seemed to be going well (the two cubes went through animation together, the zspec looked the same). I opened a cursor info widget and confirmed that the values are the exact same as I move the cursor around. But then I opened two statistics widgets, and set the image for one to be the non-gzipped image, and the other to be the gzipped one. The first had reasonable values, but the second had all zeros except the NumPixels. There are a lot of "[error] FITS read data failed" messages in the console.

Then I drew a region on the non-gzipped image and that seemed ok, but as soon as I clicked on the gzipped image panel (with the zprofile displayed), it disconnected.

This is repeatable.

I tried the latest dev (including #1119 merged about a month ago) and followed your description to reproduce the issues. It works fine now.

@jehibbard
Copy link
Author

@kswang1029 made an electron version of CARTA with #1119 fixed, and I confirm that it fixes both of the above failure cases - I get the same values/statistics/spectra from both the normal fits and gzipped fits cubes. This ticket can be closed, and thanks!

@kswang1029
Copy link
Contributor

Credit to @markccchiang and @ajm-asiaa 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants