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

Cleaning up scene - IMRender Result error (bke.lib_id_delete) #997

Open
marciska opened this issue Oct 28, 2023 · 1 comment
Open

Cleaning up scene - IMRender Result error (bke.lib_id_delete) #997

marciska opened this issue Oct 28, 2023 · 1 comment
Labels
bug Something isn't working first answer provided

Comments

@marciska
Copy link

marciska commented Oct 28, 2023

Describe the issue

After rendering a scene, and then using the clean_up() function, an error is issued:

ERROR (bke.lib_id_delete): source/blender/blenkernel/intern/lib_id_delete.c:345 id_delete: Deleting IMRender Result which still has 1 users (including 0 'extra' shallow users)

Further, (maybe unrelated), but if ignoring this message and continuing to render the next scene, then at the time when the frames are written to disk this error is issued at the coco writer (bproc.writer.write_coco_annotations()):

Warning! Detected output entries with duplicate keys and paths

Minimal code example

import blenderproc as bproc
bproc.init()

bproc.object.create_primitive('CUBE')
bproc.camera.add_camera_pose(bproc.math.build_transformation_mat((0,-2,0), (1.57,0,0)))
frames = bproc.renderer.render()

# bproc.writer.write_coco_annotations(...)

bproc.clean_up() # error occurs here

# doing some other rendering ...

Files required to run the code

No response

Expected behavior

No error

BlenderProc version

v2.6.1

More information

Seems to appear when (inside the clean_up function) the image render result is removed. I suppose it is deleted too early, and there is some kind of dependency on another object that should get first deleted?

data_structure = getattr(bpy.data, 'images')
data_structure.remove(data_structure[0],do_unlink=True) # error appears here
@marciska marciska added the question Question, not yet a bug ;) label Oct 28, 2023
@cornerfarmer
Copy link
Member

Hey @marciska, thanks for your bug report and the minimal code example. I could reproduce the error, however it is not clear to me which other object still depends on the render result. Despite the error message, the code execution still continues and the render result image also gets deleted. So for now it seems one can ignore this error message, but I will keep an eye on it.

@cornerfarmer cornerfarmer added bug Something isn't working first answer provided and removed question Question, not yet a bug ;) labels Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working first answer provided
Projects
None yet
Development

No branches or pull requests

2 participants