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

[backend crash] loading non-existent HDU via URL causing the backend crashing #1365

Closed
kswang1029 opened this issue Mar 20, 2024 · 0 comments · Fixed by #1370
Closed

[backend crash] loading non-existent HDU via URL causing the backend crashing #1365

kswang1029 opened this issue Mar 20, 2024 · 0 comments · Fixed by #1370
Assignees
Labels
critical bug critical bug which is a showstopper for release
Milestone

Comments

@kswang1029
Copy link
Contributor

Describe the bug
Assuming we have a FITS image with image HDUs at indices 1, 6, 7, if we access

http://localhost:3002/?file=Users/kswang/set_QA_e2e_v2/spire500_ext.fits[6]

the 6th HDU image loads properly. However, if we access

http://localhost:3002/?file=Users/kswang/set_QA_e2e_v2/spire500_ext.fits[2]

(ie HDU 2 which is not an image), the backend will crash with error messages:

[CARTA] [critical] ArrayBase::diagonal() - diagonal out of range
zsh: segmentation fault

The macOS crash report shows:
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libcasa_casa.7.dylib          	       0x1049fc61c std::__1::__shared_ptr_pointer<casacore::RegularFileIO*, std::__1::shared_ptr<casacore::ByteIO>::__shared_ptr_default_delete<casacore::ByteIO, casacore::RegularFileIO>, std::__1::allocator<casacore::RegularFileIO>>::__on_zero_shared() + 12
1   libcasa_casa.7.dylib          	       0x1049babdc std::__1::shared_ptr<casacore::MultiFileBase>::~shared_ptr() + 72
2   libsystem_c.dylib             	       0x1946d9ec4 __cxa_finalize_ranges + 476
3   libsystem_c.dylib             	       0x1946d9c4c exit + 44
4   libdyld.dylib                 	       0x194834554 dyld4::LibSystemHelpers::exit(int) const + 20
5   dyld                          	       0x1944c3f7c start + 2320

To Reproduce
Steps to reproduce the behavior:

  1. try to load a FITS image with multiple image HDUs with the URL approach
  2. try to load a non-existent HDU index and see crash

Expected behavior
The backend should not crash and handle this exception gracefully.

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

Platform info (please complete the following information):

  • OS [e.g. macOS Monterey]: macOS Ventura
  • Browser [e.g. chrome, safari, electron app]: chrome
  • Browser version [e.g. 22]: 121
  • Backend branch [e.g. dev, v3b2 release]: dev
  • Frontend branch [e.g. dev, v3b2 release]: dev

Additional context
Add any other context about the problem here.

@kswang1029 kswang1029 added the critical bug critical bug which is a showstopper for release label Mar 20, 2024
@pford pford self-assigned this Apr 16, 2024
@pford pford added this to the v5.0-beta milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical bug critical bug which is a showstopper for release
Projects
No open projects
Status: New issues/PRs
Development

Successfully merging a pull request may close this issue.

2 participants