SEGV when D.images.remove(D.images[0], do_unlink=True) #52663

Closed
opened 2017-09-06 11:18:07 +02:00 by Sybren A. Stüvel · 4 comments

System Information
Ubuntu Linux 16.10 as well as Windows 10 Pro 64-bit

Blender Version
Broken: 2.78c, 2.79-RC2, and 6859695

Short description of error
In this file, D.images.remove(D.images- [x], do_unlink=True) crashes Blender: atari1.blend

Exact steps for others to reproduce the error

  1. Open the file
  2. Press Enter in the Python console
  3. See crash

Stack trace on 47b7f06d0e13efba04290d4cfa8c28d2342eebf7:

16479==ERROR: AddressSanitizer: SEGV on unknown address 0x00475ac8e187 (pc 0x55f0ae28daf8 bp 0x7ffe35737db0 sp 0x7ffe35737d60 T0)
- 0 0x55f0ae28daf7 in view3d_id_remap /home/sybren/workspace/blender-git/blender/source/blender/editors/space_view3d/space_view3d.c:1433
- 1 0x55f0ae555c4c in ED_spacedata_id_remap /home/sybren/workspace/blender-git/blender/source/blender/editors/util/ed_util.c:337
- 2 0x55f0adfefc1c in WM_main_remap_editor_id_reference /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:254
- 3 0x55f0affae003 in BKE_libblock_remap_locked /home/sybren/workspace/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:532
- 4 0x55f0affae59a in BKE_libblock_remap /home/sybren/workspace/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:603
- 5 0x55f0affafddf in BKE_libblock_delete /home/sybren/workspace/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:1045
- 6 0x55f0b04e8980 in rna_Main_ID_remove /home/sybren/workspace/blender-git/blender/source/blender/makesrna/intern/rna_main_api.c:130
- 7 0x55f0b050006b in BlendDataImages_remove_call /home/sybren/workspace/blender-git/build_debug/source/blender/makesrna/intern/rna_main_gen.c:3852
- 8 0x55f0b03aebe1 in RNA_function_call /home/sybren/workspace/blender-git/blender/source/blender/makesrna/intern/rna_access.c:6362
- 9 0x55f0af1cc13e in pyrna_func_call /home/sybren/workspace/blender-git/blender/source/blender/python/intern/bpy_rna.c:5562
- 10 0x7fdc935bd456 in PyObject_Call (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1d2456)
- 11 0x7fdc93589055 in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x19e055)
- 12 0x7fdc9364da73 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262a73)
- 13 0x7fdc9364db52 in PyEval_EvalCodeEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262b52)
- 14 0x7fdc935851da in PyEval_EvalCode (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x19a1da)
- 15 0x7fdc93591fac (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a6fac)
- 16 0x7fdc93485318 in PyCFunction_Call (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x9a318)
- 17 0x7fdc9358d6d6 in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a26d6)
- 18 0x7fdc9358d64a in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a264a)
- 19 0x7fdc9364da73 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262a73)
- 20 0x7fdc9358bf1c in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a0f1c)
- 21 0x7fdc9358d64a in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a264a)
- 22 0x7fdc9358d64a in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a264a)
- 23 0x7fdc9364da73 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262a73)
- 24 0x7fdc9364db52 in PyEval_EvalCodeEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262b52)
- 25 0x7fdc934cfd27 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0xe4d27)
- 26 0x7fdc935bd456 in PyObject_Call (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1d2456)
- 27 0x55f0af1d20af in bpy_class_call /home/sybren/workspace/blender-git/blender/source/blender/python/intern/bpy_rna.c:7628
- 28 0x55f0b08377f5 in rna_operator_execute_cb /home/sybren/workspace/blender-git/blender/source/blender/makesrna/intern/rna_wm.c:984
- 29 0x55f0adff5aee in wm_operator_invoke /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1151
- 30 0x55f0adff9002 in wm_handler_operator_call /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1793
- 31 0x55f0adffa840 in wm_handlers_do_intern /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2073
- 32 0x55f0adffb043 in wm_handlers_do /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2184
- 33 0x55f0adffcdde in wm_event_do_handlers /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2519
- 34 0x55f0adfdf2ab in WM_main /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm.c:508
- 35 0x55f0adfd57d6 in main /home/sybren/workspace/blender-git/blender/source/creator/creator.c:527
- 36 0x7fdc8c9ac3f0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x203f0)
- 37 0x55f0adfd4c39 in _start (/home/sybren/workspace/blender-git/build_debug/bin/blender+0x1904c39)

view3d_id_remap seems to be remapping background images at that line, and the file is using a background image in one of the 3D views.
Actually, the loop for (BGpic *bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) {} by itself is enough to cause a segmentation fault.

**System Information** Ubuntu Linux 16.10 as well as Windows 10 Pro 64-bit **Blender Version** Broken: 2.78c, 2.79-RC2, and 6859695 **Short description of error** In this file, `D.images.remove(D.images- [x], do_unlink=True)` crashes Blender: [atari1.blend](https://archive.blender.org/developer/F775454/atari1.blend) **Exact steps for others to reproduce the error** 1. Open the file 2. Press Enter in the Python console 3. See crash Stack trace on 47b7f06d0e13efba04290d4cfa8c28d2342eebf7: 16479==ERROR: AddressSanitizer: SEGV on unknown address 0x00475ac8e187 (pc 0x55f0ae28daf8 bp 0x7ffe35737db0 sp 0x7ffe35737d60 T0) - 0 0x55f0ae28daf7 in view3d_id_remap /home/sybren/workspace/blender-git/blender/source/blender/editors/space_view3d/space_view3d.c:1433 - 1 0x55f0ae555c4c in ED_spacedata_id_remap /home/sybren/workspace/blender-git/blender/source/blender/editors/util/ed_util.c:337 - 2 0x55f0adfefc1c in WM_main_remap_editor_id_reference /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:254 - 3 0x55f0affae003 in BKE_libblock_remap_locked /home/sybren/workspace/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:532 - 4 0x55f0affae59a in BKE_libblock_remap /home/sybren/workspace/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:603 - 5 0x55f0affafddf in BKE_libblock_delete /home/sybren/workspace/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:1045 - 6 0x55f0b04e8980 in rna_Main_ID_remove /home/sybren/workspace/blender-git/blender/source/blender/makesrna/intern/rna_main_api.c:130 - 7 0x55f0b050006b in BlendDataImages_remove_call /home/sybren/workspace/blender-git/build_debug/source/blender/makesrna/intern/rna_main_gen.c:3852 - 8 0x55f0b03aebe1 in RNA_function_call /home/sybren/workspace/blender-git/blender/source/blender/makesrna/intern/rna_access.c:6362 - 9 0x55f0af1cc13e in pyrna_func_call /home/sybren/workspace/blender-git/blender/source/blender/python/intern/bpy_rna.c:5562 - 10 0x7fdc935bd456 in PyObject_Call (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1d2456) - 11 0x7fdc93589055 in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x19e055) - 12 0x7fdc9364da73 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262a73) - 13 0x7fdc9364db52 in PyEval_EvalCodeEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262b52) - 14 0x7fdc935851da in PyEval_EvalCode (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x19a1da) - 15 0x7fdc93591fac (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a6fac) - 16 0x7fdc93485318 in PyCFunction_Call (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x9a318) - 17 0x7fdc9358d6d6 in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a26d6) - 18 0x7fdc9358d64a in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a264a) - 19 0x7fdc9364da73 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262a73) - 20 0x7fdc9358bf1c in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a0f1c) - 21 0x7fdc9358d64a in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a264a) - 22 0x7fdc9358d64a in PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1a264a) - 23 0x7fdc9364da73 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262a73) - 24 0x7fdc9364db52 in PyEval_EvalCodeEx (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x262b52) - 25 0x7fdc934cfd27 (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0xe4d27) - 26 0x7fdc935bd456 in PyObject_Call (/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0+0x1d2456) - 27 0x55f0af1d20af in bpy_class_call /home/sybren/workspace/blender-git/blender/source/blender/python/intern/bpy_rna.c:7628 - 28 0x55f0b08377f5 in rna_operator_execute_cb /home/sybren/workspace/blender-git/blender/source/blender/makesrna/intern/rna_wm.c:984 - 29 0x55f0adff5aee in wm_operator_invoke /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1151 - 30 0x55f0adff9002 in wm_handler_operator_call /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1793 - 31 0x55f0adffa840 in wm_handlers_do_intern /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2073 - 32 0x55f0adffb043 in wm_handlers_do /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2184 - 33 0x55f0adffcdde in wm_event_do_handlers /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2519 - 34 0x55f0adfdf2ab in WM_main /home/sybren/workspace/blender-git/blender/source/blender/windowmanager/intern/wm.c:508 - 35 0x55f0adfd57d6 in main /home/sybren/workspace/blender-git/blender/source/creator/creator.c:527 - 36 0x7fdc8c9ac3f0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x203f0) - 37 0x55f0adfd4c39 in _start (/home/sybren/workspace/blender-git/build_debug/bin/blender+0x1904c39) `view3d_id_remap` seems to be remapping background images at that line, and the file is using a background image in one of the 3D views. Actually, the loop `for (BGpic *bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) {}` by itself is enough to cause a segmentation fault.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Sybren A. Stüvel self-assigned this 2017-09-06 11:18:19 +02:00
Sybren A. Stüvel removed their assignment 2017-09-06 11:33:20 +02:00

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by e54caf76cb

This issue was referenced by e54caf76cbe94e488ed2c539b0c108ab0618d2e2
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
3 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#52663
No description provided.