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

WPIcal segfaults when cancelling loading field in visualize dialog #7639

Open
auscompgeek opened this issue Jan 5, 2025 · 0 comments · May be fixed by #7640
Open

WPIcal segfaults when cancelling loading field in visualize dialog #7639

auscompgeek opened this issue Jan 5, 2025 · 0 comments · May be fixed by #7640
Labels
component: wpical WPIcal type: bug Something isn't working.

Comments

@auscompgeek
Copy link
Member

Describe the bug

When I cancel loading a (calibrated or reference) field from the Visualize dialog, WPIcal segfaults.

#0  0x0000559ffef3584c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::length (this=<optimized out>) at /usr/include/c++/11/bits/basic_string.h:927
#1  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign (this=this@entry=0x55a001711940 <DisplayGui()::selected_field_map>, __str=<error reading variable: Cannot access memory at address 0x8>)
    at /usr/include/c++/11/bits/basic_string.tcc:259
#2  0x0000559ffef33f2c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign (__str=..., this=0x55a001711940 <DisplayGui()::selected_field_map>) at /usr/include/c++/11/bits/basic_string.h:1356
#3  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (__str=..., this=0x55a001711940 <DisplayGui()::selected_field_map>) at /usr/include/c++/11/bits/basic_string.h:681
#4  DisplayGui () at /work/wpical/src/main/native/cpp/WPIcal.cpp:467
#5  0x0000559ffef5c4ef in std::function<void()>::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_function.h:586
#6  wpi::gui::CommonRenderFrame () at /work/wpigui/src/main/native/cpp/wpigui.cpp:459
#7  0x0000559ffef6031b in wpi::gui::PlatformRenderFrame () at /work/wpigui/src/main/native/opengl3/wpigui_opengl3.cpp:86
#8  0x0000559ffef5d925 in wpi::gui::Main () at /work/wpigui/src/main/native/cpp/wpigui.cpp:400
#9  0x0000559ffeec5fa5 in main (argc=<optimized out>, argv=<optimized out>) at /work/wpical/src/main/native/cpp/WPIcal.cpp:570

To Reproduce

  1. Press Visualize
  2. Press Load * Field (either button)
  3. Cancel

Expected behavior

Cancelling the file open dialog should work, and not crash.

Desktop:

  • OS: Fedora Linux 41
  • WPILib version: 2025.1.1
@auscompgeek auscompgeek added component: wpical WPIcal type: bug Something isn't working. labels Jan 5, 2025
@ElliotScher ElliotScher linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wpical WPIcal type: bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant