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

Crash when removing object #377

Closed
Theverat opened this issue May 22, 2020 · 2 comments
Closed

Crash when removing object #377

Theverat opened this issue May 22, 2020 · 2 comments
Assignees

Comments

@Theverat
Copy link
Member

Theverat commented May 22, 2020

I'm not sure yet if this is a bug in the Blender addon or in LuxCore, would be glad if you could take a look at it:

Scene: local_view_crash4.zip

Steps to reproduce:

  • Open file
  • Press "H" to hide the already selected object (this will call luxcore_scene.DeleteObject())
  • Blender crashes

Only happens with PathOCL (tested with OpenCL device).

In the log, I get ERROR: Reference to an undefined NamedObject pointer: 0x7f5d8aad2640:

[LuxCore][7.777] Compile 2 Textures
[LuxCore][7.777] Texture evaluation ops count: 6
[LuxCore][7.777] Texture evaluation max. stack size: 3
[LuxCore][7.777] Textures compilation time: 0ms
[LuxCore][7.777] Compile 2 Materials
Traceback (most recent call last):
  File "/home/simon/.config/blender/2.82/scripts/addons/BlendLuxCore_git/export/__init__.py", line 331, in update
    session.EndSceneEdit()
RuntimeError: Reference to an undefined NamedObject pointer: 0x7f943bcfea40
ERROR: Reference to an undefined NamedObject pointer: 0x7f943bcfea40
[SDL][7.778] Light definition: __SAVIOR__
[LuxCore][7.825] Compile Lights
[LuxCore][7.825] Lights compilation time: 0ms
view_update(): applying changes took 143.3 ms
view_update() took 144.0 ms
Writing: /tmp/local_view_crash4.crash.txt
fish: “/home/simon/programs/blender-2.…” terminated by signal SIGSEGV (Address boundary error)
  • When I don't use RemoveUnusedTextures() here, the crash does not happen - maybe a bug in the code checking for referenced textures?
  • When I use PathCPU instead of PathOCL, the crash does not happen

LuxCore version: 93de161
Addon version: LuxCoreRender/BlendLuxCore@0befe38

@Theverat
Copy link
Member Author

Theverat commented May 23, 2020

I think this is a case of two interleaved bugs:

  1. Something goes wrong either in LuxCore or the addon leading to the RuntimeError: Reference to an undefined NamedObject pointer: 0x7f943bcfea40 error. The cause could be a bug in RemoveUnusedTextures()
  2. EndSceneEdit() is called after the RuntimeError, leading to the crash (I guess this is not a bug?). Not sure how I can recover from errors that happen after BeginSceneEdit() without crashing, is this possible?

@Dade916
Copy link
Member

Dade916 commented May 24, 2020

It was a problem with Volumes. It should now work fine.

@Dade916 Dade916 closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants