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

Most examples segfault on exit when pressing ESC from the GUI. #1056

Open
1 task done
sreekanthr opened this issue Sep 13, 2024 · 0 comments
Open
1 task done

Most examples segfault on exit when pressing ESC from the GUI. #1056

sreekanthr opened this issue Sep 13, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sreekanthr
Copy link

sreekanthr commented Sep 13, 2024

Environment

  • OS Version: mac OS Monterey (12.7.6) (Intel Mac)
  • binary build: 11.0.0~pre1
  • Default MacBook Pro Intel setup
    • Rendering plugin: gz-rendering-ogre2
      • running on real hardware (MacBook Pro intel)
    • Rendering system info:

Graphics/Displays:

Intel HD Graphics 530:
  Chipset Model: Intel HD Graphics 530
  Type: GPU
  Bus: Built-In
  VRAM (Dynamic, Max): 1536 MB
  Vendor: Intel
  Device ID: 0x191b
  Revision ID: 0x0006
  Automatic Graphics Switching: Supported
  gMux Version: 4.0.29 [3.2.8]
  Metal Family: Supported, Metal GPUFamily macOS 2

Radeon Pro 455:

  Chipset Model: AMD Radeon Pro 455
  Type: GPU
  Bus: PCIe
  PCIe Lane Width: x8
  VRAM (Total): 2 GB
  Vendor: AMD (0x1002)
  Device ID: 0x67ef
  Revision ID: 0x00c7
  ROM Revision: 113-C980AF-908
  VBIOS Version: 113-C9801AP-028
  EFI Driver Version: 01.A0.908
  Automatic Graphics Switching: Supported
  gMux Version: 4.0.29 [3.2.8]
  Metal Family: Supported, Metal GPUFamily macOS 2
  Displays:
    Color LCD:
      Display Type: Built-In Retina LCD
      Resolution: 2880 x 1800 Retina
      Framebuffer Depth: 30-Bit Color (ARGB2101010)
      Mirror: Off
      Online: Yes
      Automatically Adjust Brightness: Yes
      Connection Type: Internal
    HP 27w:
      Resolution: 1920 x 1080 (1080p FHD - Full High Definition)
      UI Looks like: 1920 x 1080
      Framebuffer Depth: 30-Bit Color (ARGB2101010)
      Display Serial Number: CNC0231JJX
      Main Display: Yes
      Mirror: Off
      Online: Yes
      Rotation: Supported
      Adapter Type: Apple USB-C VGA Adapter
      Adapter Firmware Version: 1.91

ogre2.log:

ogre2.log

Description

  • Expected behavior: The GUI application should exit gracefully when pressing the ESC key within the GUI window.
  • Actual behavior: The application unexpectedly crashes with a segfault when the ESC key is pressed.

Steps to reproduce

  1. Build and run any example (tested on boundingbox_camera, actor_animation etc) from gz-rendering/examples
  2. Switch focus to the GUI window, if it is not already in focus
  3. Press ESC
  4. The app crashes with segfault

Output

Normal Console log:

./boundingbox_camera 2D_full
(2024-09-13 21:08:59.766) [info] Loading plugin [gz-rendering-ogre2]
(2024-09-13 21:09:00.030) [warning] Anti-aliasing level of '' is not supported; valid FSAA levels are: [ 1 2 4 8 ]. Setting to 1
===============================
   S  - Save image & its boxes 
  ESC - Exit                   
===============================
[1]    6892 segmentation fault  ./boundingbox_camera 2D_full

Logs with AddressSanitiser enabled:

./boundingbox_camera 2D_full

(2024-09-13 21:06:31.926) [info] Loading plugin [gz-rendering-ogre2]
(2024-09-13 21:06:32.257) [warning] Anti-aliasing level of '' is not supported; valid FSAA levels are: [ 1 2 4 8 ]. Setting to 1
===============================
   S  - Save image & its boxes 
  ESC - Exit                   
===============================
AddressSanitizer:DEADLYSIGNAL
=================================================================
==5801==ERROR: AddressSanitizer: SEGV on unknown address 0x00011ef7d220 (pc 0x000102df67c0 bp 0x7ff7bd120160 sp 0x7ff7bd120130 T0)
==5801==The signal is caused by a READ memory access.
    #0 0x102df67c0 in std::__1::__shared_count::__release_shared() shared_ptr.h:177
    #1 0x102df6708 in std::__1::__shared_weak_count::__release_shared() shared_ptr.h:219
    #2 0x102df66db in std::__1::shared_ptr<gz::rendering::v9::Visual>::~shared_ptr() shared_ptr.h:959
    #3 0x102de5324 in std::__1::shared_ptr<gz::rendering::v9::Geometry>::~shared_ptr() shared_ptr.h:957
    #4 0x7ff80e107dd3 in __cxa_finalize_ranges+0x198 (libsystem_c.dylib:x86_64+0x2edd3)
    #5 0x7ff80e107bed in exit+0x22 (libsystem_c.dylib:x86_64+0x2ebed)
    #6 0x102e0c0f4 in keyboardCB(unsigned char, int, int) GlutWindow.cc:332
    #7 0x7ffa106e8d65 in -[GLUTView keyDown:]+0x12e (GLUT:x86_64+0x8d65)
    #8 0x7ff810e85af9 in -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]+0x1bed (AppKit:x86_64+0x1b1af9)
    #9 0x7ff810e83cf1 in -[NSWindow(NSEventRouting) sendEvent:]+0x15f (AppKit:x86_64+0x1afcf1)
    #10 0x7ffa106e484f in -[GLUTWindow sendEvent:]+0x28 (GLUT:x86_64+0x484f)
    #11 0x7ff810e82b1b in -[NSApplication(NSEvent) sendEvent:]+0xbb3 (AppKit:x86_64+0x1aeb1b)
    #12 0x7ffa106f05e7 in -[GLUTApplication _runMainLoopUntilDate:autoreleasePool:]+0x76 (GLUT:x86_64+0x105e7)
    #13 0x7ffa106f072e in -[GLUTApplication run]+0xe8 (GLUT:x86_64+0x1072e)
    #14 0x7ffa106fca8e in glutMainLoop+0xde (GLUT:x86_64+0x1ca8e)
    #15 0x102e0e2df in run(std::__1::vector<std::__1::shared_ptr<gz::rendering::v9::Camera>, std::__1::allocator<std::__1::shared_ptr<gz::rendering::v9::Camera> > >&) GlutWindow.cc:440
    #16 0x102df11e0 in main Main.cc:315
    #17 0x1039e552d in start+0x1cd (dyld:x86_64+0x552d)

==5801==Register values:
rax = 0x000000011ef7d220  rbx = 0x0000619000018680  rcx = 0x0000100000000000  rdx = 0x00006030002787d8  
rdi = 0x00006030002787d0  rsi = 0x0000000000000000  rbp = 0x00007ff7bd120160  rsp = 0x00007ff7bd120130  
 r8 = 0x0000619000018680   r9 = 0x000000000000000a  r10 = 0x00007ff84f961ee0  r11 = 0xefffffffffffffff  
r12 = 0x0000000000000002  r13 = 0x0000000000000140  r14 = 0x0000000000000000  r15 = 0x0000000000000000  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV shared_ptr.h:177 in std::__1::__shared_count::__release_shared()
==5801==ABORTING
[1]    5801 abort      ./boundingbox_camera 2D_full

Found while testing the test case #1495 during the tutorial party

@sreekanthr sreekanthr added the bug Something isn't working label Sep 13, 2024
@iche033 iche033 assigned sreekanthr and unassigned sreekanthr Sep 14, 2024
@azeey azeey added the help wanted Extra attention is needed label Nov 11, 2024
@azeey azeey moved this from Inbox to To do in Core development Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: To do
Development

No branches or pull requests

2 participants