Autocomplete bug with mesh.loop_triangles. in Blender Python Consolle #74003

Closed
opened 2020-02-19 11:53:46 +01:00 by Andrea Donati · 15 comments

System Information
Operating system: Win 10 Pro and linux
Graphics card: Gtx1080ti / Gtx 970

Blender Version
Broken: 2.82

if try to autocomplete in the py console, blender crashes

mesh = bpy.data.meshes.new('Test')
mesh.loop_triangles. #Type till . and hit tab.

**System Information** Operating system: Win 10 Pro and linux Graphics card: Gtx1080ti / Gtx 970 **Blender Version** Broken: 2.82 if try to autocomplete in the py console, blender crashes `mesh = bpy.data.meshes.new('Test')` `mesh.loop_triangles.` #Type till `.` and hit tab.
Author

Added subscriber: @Andrew_D

Added subscriber: @Andrew_D
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

On default setup, it doesn't crash on 2.83 if I type mesh.loop and press tab, it gives two green options s and _triangles. I enter _ and hit tab, it correctly autocompletes.
Are you using some other file? Please attach that. Also try on 2.83, get it from https://builder.blender.org

On default setup, it doesn't crash on 2.83 if I type `mesh.loop` and press tab, it gives two green options `s` and `_triangles`. I enter `_` and hit tab, it correctly autocompletes. Are you using some other file? Please attach that. Also try on 2.83, get it from https://builder.blender.org
Author

I confirm that what you said it does, but if I try to add a "." and I try to autocomplete, it will crash 2.82 currently, and 2.83 same crash
So mesh.loop_triangles. ## .... autocomplete ... ## crash

I confirm that what you said it does, but if I try to add a "." and I try to autocomplete, it will crash 2.82 currently, and 2.83 same crash So mesh.loop_triangles. ## .... autocomplete ... ## crash
Member

Oh yeah, misunderstood that part. Segmentation fault: 11

Oh yeah, misunderstood that part. `Segmentation fault: 11`
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Added subscriber: @iss

Added subscriber: @iss

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

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

me->mloop was NULL

>	blender.exe!rna_MeshLoopTriangle_area_get(PointerRNA * ptr) Line 473	C

 	blender.exe!pyrna_prop_to_py(PointerRNA * ptr, PropertyRNA * prop) Line 1526	C
 	blender.exe!pyrna_prop_collection_getattro(BPy_PropertyRNA * self, _object * pyname) Line 4571	C
 	[Externí kód]	
 	blender.exe!bpy_class_call(bContext * C, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 8333	C
 	blender.exe!rna_operator_execute_cb(bContext * C, wmOperator * op) Line 1307	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1279	C
 	blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const short context, const bool poll_only, wmEvent * event) Line 1514	C
 	blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, short context, PointerRNA * properties) Line 1529	C
 	blender.exe!console_indent_or_autocomplete_exec(bContext * C, wmOperator * UNUSED_op) Line 486	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1279	C
 	blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2091	C
 	blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2401	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2537	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2802	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3255	C
 	blender.exe!WM_main(bContext * C) Line 421	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 520	C
 	[Externí kód]	
`me->mloop` was NULL ``` > blender.exe!rna_MeshLoopTriangle_area_get(PointerRNA * ptr) Line 473 C blender.exe!pyrna_prop_to_py(PointerRNA * ptr, PropertyRNA * prop) Line 1526 C blender.exe!pyrna_prop_collection_getattro(BPy_PropertyRNA * self, _object * pyname) Line 4571 C [Externí kód] blender.exe!bpy_class_call(bContext * C, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 8333 C blender.exe!rna_operator_execute_cb(bContext * C, wmOperator * op) Line 1307 C blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1279 C blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const short context, const bool poll_only, wmEvent * event) Line 1514 C blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, short context, PointerRNA * properties) Line 1529 C blender.exe!console_indent_or_autocomplete_exec(bContext * C, wmOperator * UNUSED_op) Line 486 C blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1279 C blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2091 C blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2401 C blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2537 C blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2802 C blender.exe!wm_event_do_handlers(bContext * C) Line 3255 C blender.exe!WM_main(bContext * C) Line 421 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 520 C [Externí kód] ```
Bastien Montagne self-assigned this 2020-02-24 12:00:53 +01:00

We can harden the RNA accessors fairly easily, but the root of the issue here is that mesh.loop_triangles is seen as an actual looptri item, with completely wrong random values, when RNA should detect that the looptri array is empty (its len is at zero)... Still investigating what exactly is wrong here.

We can harden the RNA accessors fairly easily, but the root of the issue here is that `mesh.loop_triangles` is seen as an actual looptri item, with completely wrong random values, when RNA should detect that the looptri array is empty (its len is at zero)... Still investigating what exactly is wrong here.

This issue was referenced by 0dbf8d5909

This issue was referenced by 0dbf8d5909b0676bfb4e41dec34932480c6ad45d

This issue was referenced by 69c587888b

This issue was referenced by 69c587888b5e95a2f838f63cabd52bc6cf752ece

Wow... Think that's the cutest typo-bug I have seen in a while... and it has been there for over one year! It's actually quiet impressive to see that RNA survived to that mistake for so long. :P

Wow... Think that's the cutest typo-bug I have seen in a while... and it has been there for over one year! It's actually quiet impressive to see that RNA survived to that mistake for so long. :P

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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#74003
No description provided.