crash when viewport rendering point density texture #50094
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#50094
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 10 x64, GTX 1070
Blender Version
Broken: 2.78a (
e8299c8
), also tested daily buildbd8cbf5
Worked: (optional)
Short description of error
When using a point density texture node in a cycles material, blender crashes after changing the resolution value.
Exact steps for others to reproduce the error
Bug seems to appear only when changing the value immediately after switching to rendered viewport and changing the "Resolution" value with click-and-drag (not clicking or typing in directly)
Changed status to: 'Open'
Added subscriber: @sirjofri
Added subscriber: @newbs
Joel Meyer, Can you upload a blend file please? Thank you.
Added subscriber: @LazyDodo
This one was easy to repro, point_density.blend
just switch to rendered view, and click the up or down button on the resolution a few times (doesn't happen all the time but after a few tries blender crashes) probably a race condition somewhere.
Added subscriber: @Sergey
race condition, in between the time ImageManager allocates ram for the texture and the time it gets sampled the ui managed to get in a change to the resolution. causing things to overflow in point_density_sample_func. Not quite sure how to stop that from happening. @Sergey any hints/tips?
Not sure what would be best here, can in theory use similar technique as initial sync is doing: have a main thread locked while sampling point density (see
WM_job_main_thread_lock_acquire
). This is annoying tho, because it introduces interface locks which we hate and must avoid.Probably better approach for until we've got proper data separation would be to re-set viewport render from RNA update callback for PD resolution. We had that for some properties already (can't find them atm tho). Nice point of research is
ED_render_engine_area_exit()
and see it's users and such.Ideally i'd like to extend builtin_image_float_pixels_cb and builtin_image_pixels_cb to include the buffer dimensions (passing a pointer to a buffer, without telling the callee what size it is, just seems bad faith to me, and inviting issues like these) however that in turn causes a change to rna_ShaderNodePointDensity_density_calc (to include the buffer dimensions there as well) but that might be a breaking api change, not sure if that's ok? (doesn't look like any python is calling it though, so it just be a c/c++ code change)
Not sure that will solve anything. You can still change PD settings while
builtin_image_float_pixels_cb()
is sampling the PD causing threading conflicts.It would, BlenderSession::builtin_image_info would query the PD settings once, to get the resolution, and beyond that the buffer dimensions would be passed down, so there's no need for rna_ShaderNodePointDensity_density_calc to query the PD Settings and get a potentially different answer.
This issue was referenced by
1ec5edcc96
Changed status from 'Open' to: 'Resolved'