Crash when opening and closing image file browser
Closed, ResolvedPublic

Description

System Information
Mac OS X 10.12.6
MacBook Pro (Retina, Mid 2012)
2.6 GHz Intel Core i7
16 GB 1600 MHz DDR3

Blender Version
Broken: (example: 2.78c e92f235

Select "Apartment" object
Select "Interior Floors - Tiles" material
Press dot to right of "Color" field in "Surface" tab
Choose any image file
Instant crash occurs

My first bug report, hope I've included everything required.

Bastien Montagne (mont29) triaged this task as "Confirmed" priority.Mon, Sep 4, 11:05 AM

Confirmed in current master. Seems to be a DAG (old depsgraph) issue?

ASAN:DEADLYSIGNAL
=================================================================
==16593==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000e0 (pc 0x55d6a095c43e bp 0x7ffcd42ef180 sp 0x7ffcd42ef160 T0)
    #0 0x55d6a095c43d in BKE_screen_visible_layers /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/screen.c:396
    #1 0x55d6a05dc155 in dag_current_scene_layers /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/depsgraph.c:2427
    #2 0x55d6a05dcc80 in DAG_on_visible_update /home/i74700deb64/blender/__work__/src/source/blender/blenkernel/intern/depsgraph.c:2505
    #3 0x55d69f2ee2e1 in ED_screen_set /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/screen_edit.c:1587
    #4 0x55d69f2efdab in ED_screen_state_toggle /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/screen_edit.c:1928
    #5 0x55d69f2ef57f in ED_screen_restore_temp_type /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/screen_edit.c:1837
    #6 0x55d69f2ef45c in ED_screen_full_prevspace /home/i74700deb64/blender/__work__/src/source/blender/editors/screen/screen_edit.c:1822
    #7 0x55d69e5285f7 in wm_handler_fileselect_do /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_event_system.c:1877
    #8 0x55d69e52921d in wm_handler_fileselect_call /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_event_system.c:1982
    #9 0x55d69e529cf6 in wm_handlers_do_intern /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_event_system.c:2106
    #10 0x55d69e52a239 in wm_handlers_do /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_event_system.c:2184
    #11 0x55d69e52ba77 in wm_event_do_handlers /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm_event_system.c:2457
    #12 0x55d69e50e5bf in WM_main /home/i74700deb64/blender/__work__/src/source/blender/windowmanager/intern/wm.c:508
    #13 0x55d69e5048ba in main /home/i74700deb64/blender/__work__/src/source/creator/creator.c:527
    #14 0x7f011a3d82e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
    #15 0x55d69e503c19 in _start (/home/i74700deb64/blender/__work__/build_cmake_dbg/bin/blender+0x3757c19)

This isn't really a dependency graph issue, for some reason spacedata.first is NULL in BKE_screen_visible_layers(). Not sure why and whether it's something what is never supposed to happen. But i can't reproduce the issue with own startup file and factory startup.

@Campbell Barton (campbellbarton), do you have any knowledge here?

Brecht Van Lommel (brecht) changed the title from "Instant Crash when adding image texture to Cycles material color" to "Crash when opening and closing image file browser".Wed, Sep 6, 3:39 PM

Does this mean the issue will be resolved in the next version? If not, is there any way to fix my blend file so I can carry on working on it?

This will indeed be solved in a future version, might not be 2.79 since the fix is not entirely straightforward.

To fix the .blend file, you can open it with File > Open and Load UI unchecked, then save again.