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

UI related segfault when creating multiple engines with the libf3d #1795

Open
mwestphal opened this issue Dec 16, 2024 · 0 comments
Open

UI related segfault when creating multiple engines with the libf3d #1795

mwestphal opened this issue Dec 16, 2024 · 0 comments
Labels
help wanted Please help with this issue! source:libf3d source:python type:bug Something isn't working
Milestone

Comments

@mwestphal
Copy link
Contributor

Describe the bug
When creating multiple engine, there seems to be some memory related issue

To Reproduce
Steps to reproduce the behavior:

  1. Run this python script
import f3d 

def stop_fn(inter):
   inter.stop()

def print_fn():
   print("test")

engine = f3d.Engine.create(False)
inter = engine.interactor
inter.start(1 / 30, partial(stop_fn, inter))
del engine

engine2 = f3d.Engine.create(False)
inter2 = engine2.interactor
inter2.start(1 / 30, print_fn)
  1. Press Escape to show console
  2. Press Escape to hide console
  3. Segfault
../src/python/testing/test_interactor_start.py 
Program received signal SIGSEGV, Segmentation fault.
f3d::detail::interactor_impl::internals::OnConsoleEvent (event=1202, clientData=0x555555bf5e80, data=0x0) at /home/glow/dev/f3d/f3d/src/library/src/interactor_impl.cxx:234
234           self->Options.ui.console = (event == vtkF3DConsoleOutputWindow::ShowEvent);
(gdb) bt
#0  f3d::detail::interactor_impl::internals::OnConsoleEvent (event=1202, clientData=0x555555bf5e80, data=0x0) at /home/glow/dev/f3d/f3d/src/library/src/interactor_impl.cxx:234
#1  0x00007fffedd23a8f in vtkCallbackCommand::Execute (this=0x555555be3020, caller=0x555555a6a8f0, event=1202, callData=0x0) at /home/glow/dev/vtk/vtk1/src/Common/Core/vtkCallbackCommand.cxx:30
#2  0x00007fffede5fd1c in vtkSubjectHelper::InvokeEvent (this=0x555555be3d00, event=1202, callData=0x0, self=0x555555a6a8f0) at /home/glow/dev/vtk/vtk1/src/Common/Core/vtkObject.cxx:638
#3  0x00007fffede602df in vtkObject::InvokeEvent (this=0x555555a6a8f0, event=1202, callData=0x0) at /home/glow/dev/vtk/vtk1/src/Common/Core/vtkObject.cxx:807
#4  0x00007ffff5f02cfa in vtkObject::InvokeEvent (this=0x555555a6a8f0, event=1202) at /home/glow/dev/vtk/vtk1/src/Common/Core/vtkObject.h:223
#5  0x00007ffff5f02363 in vtkF3DImguiConsole::ShowConsole (this=0x555555a6a8f0) at /home/glow/dev/f3d/f3d/src/vtkext/private/module/vtkF3DImguiConsole.cxx:81
#6  0x00007ffff5eff9ff in vtkF3DImguiActor::RenderConsole (this=0x555555c45c60) at /home/glow/dev/f3d/f3d/src/vtkext/private/module/vtkF3DImguiActor.cxx:422
#7  0x00007ffff5ef6f58 in vtkF3DUIActor::RenderOverlay (this=0x555555c45c60, vp=0x555555c63b50) at /home/glow/dev/f3d/f3d/src/vtkext/private/module/vtkF3DUIActor.cxx:114
#8  0x00007ffff40d0691 in vtkDefaultPass::RenderOverlay (this=0x555555ee4ef0, s=0x7fffffffb180) at /home/glow/dev/vtk/vtk1/src/Rendering/OpenGL2/vtkDefaultPass.cxx:175
#9  0x00007ffff40d0044 in vtkDefaultPass::Render (this=0x555555ee4ef0, s=0x7fffffffb180) at /home/glow/dev/vtk/vtk1/src/Rendering/OpenGL2/vtkDefaultPass.cxx:38
#10 0x00007ffff40c5581 in vtkCameraPass::Render (this=0x55555613a950, s=0x7fffffffb180) at /home/glow/dev/vtk/vtk1/src/Rendering/OpenGL2/vtkCameraPass.cxx:133

Expected behavior
No segfault

F3D Information
Paste the content of f3d --version: master

@mwestphal mwestphal added this to F3D Dec 16, 2024
@mwestphal mwestphal moved this to Investigate in F3D Dec 19, 2024
@mwestphal mwestphal added the help wanted Please help with this issue! label Dec 19, 2024
@mwestphal mwestphal added this to the 3.2.0 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please help with this issue! source:libf3d source:python type:bug Something isn't working
Projects
Status: Investigate
Development

No branches or pull requests

1 participant