Crash when trying to autocomplete in console on a depsgraph instance #100286

Closed
opened 2022-08-08 12:01:29 +02:00 by Julien Duroure · 9 comments
Member

System Information
Operating system: linux
Graphics card: Nvidia

Blender Version
Broken: Blender 3.3 beta, build from August 7th

Short description of error
Crash when trying to autocomplete in console

Exact steps for others to reproduce the error

  • Open file in attachment
  • Copy script from text editor and past in Console Editor. Enter to execute
  • In Console editor, enter instA[0].
  • Then press tab to get autocompletion => Crash.
  • See crash log in attachement

py_instance_access.blend

py_instance_access.crash.txt

system-info.txt

**System Information** Operating system: linux Graphics card: Nvidia **Blender Version** Broken: Blender 3.3 beta, build from August 7th **Short description of error** Crash when trying to autocomplete in console **Exact steps for others to reproduce the error** - Open file in attachment - Copy script from text editor and past in Console Editor. Enter to execute - In Console editor, enter instA[0]. - Then press tab to get autocompletion => Crash. - See crash log in attachement [py_instance_access.blend](https://archive.blender.org/developer/F13346064/py_instance_access.blend) [py_instance_access.crash.txt](https://archive.blender.org/developer/F13346065/py_instance_access.crash.txt) [system-info.txt](https://archive.blender.org/developer/F13346071/system-info.txt)
Author
Member

Added subscriber: @JulienDuroure

Added subscriber: @JulienDuroure
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm, will check

Can confirm, will check
Philipp Oeser changed title from Crash when trying to autocomplete in console to Crash when trying to autocomplete in console on a depsgraph instance 2022-08-08 13:47:19 +02:00
Author
Member

Edit: I will open a new ticket for this case

Edit: I will open a new ticket for this case

Added subscriber: @Sergey

Added subscriber: @Sergey

The "object_instances" accessor is a purely generator and its items can not be referenced and accessed after the iteration process is finished. Philipp mentioned it in the #100314#1402221.

This is pretty much what is happening when following the steps as they are.
The tricky part is: when doing something like depsgraph.object_instances- [x].<tab> it is way less obvious, but it is also what is going on: internally a reference to an item is stored and then auto-completeion is attempted on it.

Not sure if it is something we can easily support, but would be nice to not crash.
I've tried to use custom lookup-int on the object_instances property which always returns false. This fixes the crash but leads to a cryptic message in this case RuntimeError: bpy_prop_collection[index]: internal error, valid index 0 given in 284 sized collection, but value not found. Still much better than crash, but would be nice if the subscript was disabled on the proeprty in a way that doesn't throw cryptic exception.

The "object_instances" accessor is a purely generator and its items can not be referenced and accessed after the iteration process is finished. Philipp mentioned it in the #100314#1402221. This is pretty much what is happening when following the steps as they are. The tricky part is: when doing something like `depsgraph.object_instances- [x].<tab>` it is way less obvious, but it is also what is going on: internally a reference to an item is stored and then auto-completeion is attempted on it. Not sure if it is something we can easily support, but would be nice to not crash. I've tried to use custom lookup-int on the `object_instances` property which always returns `false`. This fixes the crash but leads to a cryptic message in this case `RuntimeError: bpy_prop_collection[index]: internal error, valid index 0 given in 284 sized collection, but value not found`. Still much better than crash, but would be nice if the subscript was disabled on the proeprty in a way that doesn't throw cryptic exception.

This issue was referenced by 21ea499558

This issue was referenced by 21ea4995585931ad54f51c1878c06c526c3355a5

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2022-08-23 15:05:24 +02:00
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100286
No description provided.