Collection Manager: Crash when toggling option in 'Adjust Last Operation' #75738
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#75738
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce 940MX/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.75
Blender Version
Broken: version: 2.83 (sub 13), branch: master, commit date: 2020-04-14 17:24, hash:
blender/blender@bf49bb354f
Worked: (newest version of Blender that worked as expected)
Short description of error
after pressing another button to toggle the visible collection in the number row. If you press the context menu for QCD blender will instantly crash.
Exact steps for others to reproduce the error
Toggle
option in theView QCD Slot
Adjust Last Operation HUD [bottom left panel or {key F9} orEdit
>Adjust Last Operation
]blender will crash immediately.
Added subscriber: @Jaye.Antoni_Whyldz
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Needs User Info'
Not sure I understand correctly (sorry about this):
View QCD Slot popup context menu
?Crash when toggling QCD context menuto Collection Manager: Crash when toggling QCD context menuWhen u switch something from one collection go another, you press the poup menue that comes up at the bottom left of the 3d veiwport and press the toggle option in it
Changed status from 'Needs User Info' to: 'Confirmed'
Ah, that... can confirm, checking...
Collection Manager: Crash when toggling QCD context menuto Collection Manager: Crash when toggling option in 'Adjust Last Operation'Added subscriber: @Imaginer
Havent checked in detail, here is a trace:
@Imaginer: is this something you can look into? [if this is some fault in the py API this should be fixed as well, but maybe there is a workaround?]
@lichtwerk Yep, I'll look into all this. Thanks for letting me know.
@lichtwerk It's not a exactly a fault of the python API see https://docs.blender.org/api/blender2.8/info_gotcha.html#help-my-script-crashes-blender
The cause of this crash is because I store references to
LayerCollections
in a dictionary. I'm pretty sureAdjust Last Operation
triggers a reallocation of memory and so then blender tries to access invalid memory locations and crashes.Now I know this is technically a bad idea, but the reason I do this is because I need to access attributes stored in
LayerCollections
and unlikeCollections
,LayerCollections
have no data structure inbpy.data
, so my options are to walk through the tree every time I need to access a randomLayerCollection
(extremely slow) or store references in a dictionary that only gets updated when needed (much faster). I've chosen to store references because I want my addon to be able to work with a large number of collections. Unfortunately it means that bugs like this will occasionally show up, but hopefully it won't be too much of a problem.The easiest way to fix this is to simply remove the
'REGISTER'
option from theView QCD Slot
operator; this will causeAdjust Last Operation
to ignore it. I should probably remove this option from some of my other operators as well.I'll commit a fix for this soon.
This issue was referenced by
e2fe08f4dc
This issue was referenced by
d82bdda0cd
Changed status from 'Confirmed' to: 'Resolved'