Page MenuHome

Crash when ctrl-selecting vertices
Closed, ResolvedPublicBUG


System Information
Operating system: Linux-4.15.0-66201911071317-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GT 630/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116

Blender Version
Broken: version: 2.82 (sub 5), branch: master, commit date: 2019-12-13 14:31, hash: rB38ad1c4d339d
Worked: (optional)

Short description of error
Selecting shortest path causes crash

Exact steps for others to reproduce the error
In the given file, have the vertex in the pink circle selected, then ctrl-LMB the one in the blue circle. It should crash there.
I tried to isolate the bug, but it seems to have a more complex recepy than just "open blender and hit ctrl-LMB".
Also, when i don't try to select the shortest path, but select it one by one with shift-LMB, everything is fine.

Event Timeline

File-agnostic reproduction:

  1. Load default scene
  2. Enter edit mode on the cube and box-select one vertex. Don't click on it, don't make it active, the vertex should be selected but not active.
  3. Enable x-ray
  4. Ctrl-click another vertex


  1. Load default scene
  2. Enter edit mode on the cube and deselect all
  3. Enable x-ray
  4. Ctrl-click far enough away from any vertices and other objects

@user1 (user1) it's also worth noting that with such selection as in the file, pick shortest path wouldn't work anyway, you need an active vertex to start the path.

Robert Guetzkow (rjg) lowered the priority of this task from 90 to High.EditedDec 15 2019, 8:00 PM

I can reproduce this issue (rBf8cdc5ac4c0c508deb28a0fc4b432f6e982c4b4f), seems related to the overlay refactoring (rB9516921c05bd9fee5c94942eb8e38f47ba7e4351).

GPU_texture_bound_number(GPUTexture * tex) Line 1581
bind_texture(GPUTexture * tex, unsigned char bind_type) Line 766
draw_update_uniforms(DRWShadingGroup * shgroup, DRWCommandsState * state, bool * use_tfeedback) Line 956
draw_shgroup(DRWShadingGroup * shgroup, <unnamed-enum-DRW_STATE_WRITE_DEPTH> pass_state) Line 1256
drw_draw_pass_ex(DRWPass * pass, DRWShadingGroup * start_group, DRWShadingGroup * end_group) Line 1406
DRW_draw_pass(DRWPass * pass) Line 1456
OVERLAY_edit_mesh_draw(OVERLAY_Data * vedata) Line 388
OVERLAY_draw_scene(void * vedata) Line 419
drw_engines_draw_scene() Line 1218
DRW_draw_select_loop(Depsgraph * depsgraph, ARegion * ar, View3D * v3d, bool UNUSED_use_obedit_skip, bool draw_surface, bool UNUSED_use_nearest, const rcti * rect, bool(*)(eDRWSelectStage, void *) select_pass_fn, void * select_pass_user_data, bool(*)(Object *, void *) object_filter_fn, void * object_filter_user_data) Line 2320
view3d_opengl_select(ViewContext * vc, unsigned int * buffer, unsigned int bufsize, const rcti * input, <unnamed-enum-VIEW3D_SELECT_ALL> select_mode, <unnamed-enum-VIEW3D_SELECT_FILTER_NOP> select_filter) Line 1160
mixed_bones_object_selectbuffer(ViewContext * vc, unsigned int * buffer, const int * mval, <unnamed-enum-VIEW3D_SELECT_FILTER_NOP> select_filter, bool do_nearest) Line 1684
mixed_bones_object_selectbuffer_extended(ViewContext * vc, unsigned int * buffer, const int * mval, <unnamed-enum-VIEW3D_SELECT_FILTER_NOP> select_filter, bool use_cycle, bool enumerate, bool * r_do_nearest) Line 1783
ed_object_select_pick(bContext * C, const int * mval, bool extend, bool deselect, bool toggle, bool obcenter, bool enumerate, bool object) Line 2061
view3d_select_exec(bContext * C, wmOperator * op) Line 2421
view3d_select_invoke(bContext * C, wmOperator * op, const wmEvent * event) Line 2461
wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1441
wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties) Line 2281
wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2594
wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2731
wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3078
wm_event_do_handlers(bContext * C) Line 3446
WM_main(bContext * C) Line 420
main(int argc, const unsigned char * * UNUSED_argv_c) Line 519

@Stanislav Blinov (radcapricorn) Thanks for the concise instructions.

The crash only seems to be triggered with X-Ray enabled and when there is no active vertex in the selection.

As Stanislav mentioned, if the only vertex selected is active, the crash won't happen.
So for instance in the sample file provided by user1 if you:

  1. disable X-ray view,
  2. make the vertex in the pink circle active,
  3. enable x-ray
  4. CTRL click the vertex in the blue circle

There is no crash, and you can keep CTRL clicking vertices. But as soon as you click on anything that is not a vertex, the crash will be triggered.
And if then you deselect a vertex, any subsequent CTRL L click will trigger the crash since there will be no active vertex in the selection.
Unless, you temporarily disable x-ray and make a vertex active. Then you can keep CTRL clicking vertices.

I confirmed this in e0cd5b980fc5 as well.

System: Ubuntu 19.10

I confirm
Broken: version: 2.82 (sub 6), branch: master, commit date: 2019-12-17 23:52, hash: rBe0cd5b980fc5

Enable X-Ray mode.
I select two vertices and press F to fill the grid with polygons. Then, when it is filled, the last two vertices remain selected, I press the ctrl+click on the vertex to select the shortest path between the selected polygons and the one I click on.
Blender crashes.

Clément Foucault (fclem) closed this task as Resolved.Jan 13 2020, 5:47 PM

I think this was fixed by 84825e4b50c1 since I cannot reproduce anymore. Feel free to reopen if it's not fixed.