Page MenuHome

Trying to Ctrl-C on Material > Unlink Datablock crashes Blender
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: Quadro 5000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 377.83

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-06 20:48, hash: rB85637311c28f

Short description of error
Trying to Ctrl-C on Material > Unlink Datablock crashes Blender

Exact steps for others to reproduce the error
Add a new Poly Object
Go to Materials and add a new Material


Hit Ctrl-C on "Unlink Datablock" of the newly created material

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Thu, Nov 7, 2:38 PM

Confirmed, checking...

Usually Ctrl+C copies the oprator name to the clipboard ["bpy.ops.material.new()", "bpy.ops.object.material_slot_remove()"]
Crash happens for all buttons of UI_BTYPE_BUT without associated operator [some are defined with callbacks only, often these are created with e.g uiDefIconBut (instead of e.g. uiDefIconButO)]

Other examples that crash with Ctrl+C:

  • animation decorators next to animatable properties
  • button to show a modifier texture in the texture tab
  • ...

2.79 survived here (havent checked code, but result in the clipboard was just not changed hitting Ctrl+C on these buttons)
2.8 crashes in WM_operator_pystring_ex well, because of missing but->optype

1  WM_operator_pystring_ex wm_operators.c       241   0x3398648 
2  ui_but_copy_operator    interface_handlers.c 2439  0x3a2f93c 
3  ui_but_copy             interface_handlers.c 2528  0x3a2fd25 
4  ui_do_button            interface_handlers.c 7058  0x3a3bf4c 
5  ui_handle_button_event  interface_handlers.c 8288  0x3a3efed 
6  ui_region_handler       interface_handlers.c 10185 0x3a4370a 
7  wm_handler_ui_call      wm_event_system.c    624   0x3376e1d 
8  wm_handlers_do_intern   wm_event_system.c    2751  0x337c238 
9  wm_handlers_do          wm_event_system.c    2997  0x337ced3 
10 wm_event_do_handlers    wm_event_system.c    3450  0x337e3a6 
11 WM_main                 wm.c                 417   0x33714a3 
12 main                    creator.c            491   0x2d0cab6

fix incoming...