Crash on Python console autocompletion #32692

Closed
opened 2012-09-29 11:06:29 +02:00 by Artyom Lebedev · 8 comments

%%%Crash sometimes occurs when using Python console autocompletion. I did not managed to find exact reproduction scenarios, crashes occur spontaneously. Hope fault location will help:
blender[3648] general protection ip:1070205 sp:7fffdae10930 error:0 in blender[400000+3a26000]
System info file and loaded model file attached.%%%

%%%Crash sometimes occurs when using Python console autocompletion. I did not managed to find exact reproduction scenarios, crashes occur spontaneously. Hope fault location will help: blender[3648] general protection ip:1070205 sp:7fffdae10930 error:0 in blender[400000+3a26000] System info file and loaded model file attached.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%This is not enough info to redo the crash.

You need to give steps to redo the crash, even if it happens only one in 10 times, the steps you go through to get the crash to happen are really important.

marking as incomplete.%%%

%%%This is not enough info to redo the crash. You need to give steps to redo the crash, even if it happens only one in 10 times, the steps you go through to get the crash to happen are really important. marking as incomplete.%%%
Member

%%%i can confirm (random?) crashes on auto-complete, but not provide any steps to reproduce it either.

IIRC, it happened for me when auto-completing variable attributes, and the variable was a ref to blender data, like:

var = bpy.context.object

do stuff here

var.<strg+spacebar> CRASH

the problem might have to do with a context, that changes over time, and accessing attributes might try to read from invalid memory address - but it's just a wild guess%%%

%%%i can confirm (random?) crashes on auto-complete, but not provide any steps to reproduce it either. IIRC, it happened for me when auto-completing variable attributes, and the variable was a ref to blender data, like: var = bpy.context.object # do stuff here var.<strg+spacebar> CRASH the problem might have to do with a context, that changes over time, and accessing attributes might try to read from invalid memory address - but it's just a wild guess%%%

%%%This is likely invalid memory access: see
http://www.blender.org/documentation/blender_python_api_2_63_release/info_gotcha.html#edit-mode-memory-access

there is a cmake build time option that checks for this but slows down blender/python execution too. - WITH_PYTHON_SAFETY

closing. can re-open if you find steps to redo which are not accessing freed data (which is known limitation)%%%

%%%This is likely invalid memory access: see http://www.blender.org/documentation/blender_python_api_2_63_release/info_gotcha.html#edit-mode-memory-access there is a cmake build time option that checks for this but slows down blender/python execution too. - WITH_PYTHON_SAFETY closing. can re-open if you find steps to redo which are not accessing freed data (which is known limitation)%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

%%%pretty sure it's invalid memory access:

Edit mode:

p=bpy.context.object.data.polygons[0]
p

bpy.data.meshes['Cube'].polygons[0]

Object mode

p

bpy.data.meshes['Cube'].polygons[-292049]

auto-completing p does crash blender, as the reference is bad. So we just need to be careful with vars which refer to geometry and have been assigned in edit mode.%%%

%%%pretty sure it's invalid memory access: Edit mode: >>> p=bpy.context.object.data.polygons[0] >>> p bpy.data.meshes['Cube'].polygons[0] Object mode >>> p bpy.data.meshes['Cube'].polygons[-292049] auto-completing p does crash blender, as the reference is bad. So we just need to be careful with vars which refer to geometry and have been assigned in edit mode.%%%

Added subscriber: @demarcog83

Added subscriber: @demarcog83
Try this solution https://developer.blender.org/T43491
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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-addons#32692
No description provided.