Page MenuHome

Crashing loading .blend file with missing paint tool slots
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: AMD Radeon (TM) R9 390 Series ATI Technologies Inc. 4.5.13521 Core Profile Context 24.20.11016.4

Blender Version
Broken: version: 2.80 (sub 51), branch: blender2.7, commit date: 2019-03-28 00:40, hash: rBcd92f8ea4626
Worked: (optional)

Short description of error
I had to shut down Blender as I needed to reboot my PC. When I restarted, none of the project files I'd made would load, Blender would hang for a couple of seconds and then just shut down.

I upgraded to the latest build (March 28th 2019) and tried again, no effect. I also unchecked the "Load UI" button, as I'd used a split view window for the first time before the crash.

I then loaded Blender, saved the default box as a new file and tried to load that - it crashed too. That file is attached.

Exact steps for others to reproduce the error
Simply try to open the file.

Event Timeline

I have tested and I can open the file first time, but if try to reopen it again I get a crash:

Call Stack

 	blender.exe!free_dbg_nolock(void * const block, const int block_use) Line 952	C++
 	blender.exe!_free_dbg(void * block, int block_use) Line 1030	C++
 	blender.exe!free(void * block) Line 32	C++
	blender.exe!MEM_lockfree_freeN(void * vmemh) Line 159	C
 	blender.exe!BKE_paint_free(Paint * paint) Line 721	C
 	blender.exe!BKE_toolsettings_free(ToolSettings * toolsettings) Line 193	C
 	blender.exe!BKE_scene_free_ex(Scene * sce, const bool do_id_user) Line 496	C
 	blender.exe!BKE_libblock_free_datablock(ID * id, const int UNUSED_flag) Line 712	C
 	blender.exe!BKE_id_free_ex(Main * bmain, void * idv, int flag, const bool use_flag_from_idtag) Line 891	C
 	blender.exe!BKE_main_free(Main * mainvar) Line 120	C
 	blender.exe!BKE_blender_globals_clear() Line 142	C
 	blender.exe!setup_app_data(bContext * C, BlendFileData * bfd, const unsigned char * filepath, const bool is_startup, ReportList * reports) Line 234	C
 	blender.exe!BKE_blendfile_read(bContext * C, const unsigned char * filepath, const BlendFileReadParams * params, ReportList * reports) Line 403	C
 	blender.exe!WM_file_read(bContext * C, const unsigned char * filepath, ReportList * reports) Line 600	C
 	blender.exe!wm_file_read_opwrap(bContext * C, const unsigned char * filepath, ReportList * reports, const bool autoexec_init) Line 1866	C
 	blender.exe!wm_open_mainfile_exec(bContext * C, wmOperator * op) Line 1926	C

I have used the last version of source code and compiled in Windows 10 64 bits

EDIT: Testing again, every time I get different error and depends if you open from splash screen or File>open menu.

I can not reproduce this on my end (linux).

@Ray Molenkamp (LazyDodo) can you reproduce this too (we can double confirm that this is probably a windows issue).

@Sebastian Parborg (zeddb) given @Antonio Vazquez (antoniov) stack trace seems to suggest mem issues,try running with ASAN see if that has anything to say about it.

can repro, different callstack though

 	ntdll.dll!0000000076dda365()	Unknown
 	kernel32.dll!0000000076cb1a0a()	Unknown
 	blender.exe!_free_base(void * block=0x000000000e71b650) Line 107	C++
 	blender.exe!free_dbg_nolock(void * const block=0x000000000e71b680, const int block_use=1) Line 987	C++
 	blender.exe!_free_dbg(void * block=0x000000000e71b680, int block_use=1) Line 1011	C++
 	blender.exe!free(void * block=0x000000000e71b680) Line 20	C++
 	blender.exe!MEM_lockfree_freeN(void * vmemh=0x000000000e71b688) Line 159	C
 	blender.exe!BLI_freelistN(ListBase * listbase=0x0000000013f20d98) Line 537	C
>	blender.exe!UI_block_layout_resolve(uiBlock * block=0x0000000013f20d58, int * r_x=0x000000000022f6e4, int * r_y=0x000000000022f704) Line 4704	C
 	blender.exe!ED_region_header_layout(const bContext * C=0x000000000429c928, ARegion * ar=0x000000000e7e90a8) Line 2462	C
 	blender.exe!ED_region_header(const bContext * C=0x000000000429c928, ARegion * ar=0x000000000e7e90a8) Line 2510	C
 	blender.exe!action_header_region_draw(const bContext * C=0x000000000429c928, ARegion * ar=0x000000000e7e90a8) Line 328	C
 	blender.exe!ED_region_do_draw(bContext * C=0x000000000429c928, ARegion * ar=0x000000000e7e90a8) Line 512	C
 	blender.exe!wm_draw_window_offscreen(bContext * C=0x000000000429c928, wmWindow * win=0x0000000013aec428, bool stereo=false) Line 590	C
 	blender.exe!wm_draw_window(bContext * C=0x000000000429c928, wmWindow * win=0x0000000013aec428) Line 724	C
 	blender.exe!wm_draw_update(bContext * C=0x000000000429c928) Line 877	C
 	blender.exe!WM_main(bContext * C=0x000000000429c928) Line 425	C
 	blender.exe!main(int argc=1, const unsigned char * * UNUSED_argv_c=0x00000000006d09c0) Line 507	C
 	[External Code]

Probably the actual problem

>	blender.exe!link_paint(FileData * fd=0x0000000072a20aa8, Scene * sce=0x000000004c4cc6f8, Paint * p=0x000000006b020f68) Line 6295	C
 	blender.exe!lib_link_scene(FileData * fd=0x0000000072a20aa8, Main * main=0x000000006c686958) Line 6403	C
 	blender.exe!lib_link_all(FileData * fd=0x0000000072a20aa8, Main * main=0x000000006c686958) Line 9331	C
 	blender.exe!blo_read_file_internal(FileData * fd=0x0000000072a20aa8, const unsigned char * filepath=0x00000000003fe890) Line 9575	C
 	blender.exe!BLO_read_from_file(const unsigned char * filepath=0x00000000003fe890, eBLOReadSkip skip_flags=BLO_READ_SKIP_NONE, ReportList * reports=0x000000003aa4efc8) Line 314	C
 	blender.exe!BKE_blendfile_read(bContext * C=0x0000000013d3cf78, const unsigned char * filepath=0x00000000003fe890, const BlendFileReadParams * params=0x00000000003fe7c4, ReportList * reports=0x000000003aa4efc8) Line 388	C
 	blender.exe!WM_file_read(bContext * C=0x0000000013d3cf78, const unsigned char * filepath=0x00000000003fe890, ReportList * reports=0x000000003aa4efc8) Line 600	C
 	blender.exe!wm_file_read_opwrap(bContext * C=0x0000000013d3cf78, const unsigned char * filepath=0x00000000003fe890, ReportList * reports=0x000000003aa4efc8, const bool autoexec_init=true) Line 1866	C
 	blender.exe!wm_open_mainfile_exec(bContext * C=0x0000000013d3cf78, wmOperator * op=0x000000004d7d0f48) Line 1926	C
 	blender.exe!wm_operator_invoke(bContext * C=0x0000000013d3cf78, wmOperatorType * ot=0x000000001bc60f28, wmEvent * event=0x0000000000000000, PointerRNA * properties=0x00000000003ff078, ReportList * reports=0x0000000000000000, const bool poll_only=false, bool use_last_properties=true) Line 1353	C
 	blender.exe!wm_operator_call_internal(bContext * C=0x0000000013d3cf78, wmOperatorType * ot=0x000000001bc60f28, PointerRNA * properties=0x00000000003ff078, ReportList * reports=0x0000000000000000, const short context=6, const bool poll_only=false, wmEvent * event=0x0000000000000000) Line 1586	C
 	blender.exe!WM_operator_name_call_ptr(bContext * C=0x0000000013d3cf78, wmOperatorType * ot=0x000000001bc60f28, short context=6, PointerRNA * properties=0x00000000003ff078) Line 1599	C
 	blender.exe!ui_apply_but_funcs_after(bContext * C=0x0000000013d3cf78) Line 785	C
 	blender.exe!ui_popup_handler(bContext * C=0x0000000013d3cf78, const wmEvent * event=0x0000000070e59f78, void * userdata=0x000000003aab6ed8) Line 10114	C
 	blender.exe!wm_handler_ui_call(bContext * C=0x0000000013d3cf78, wmEventHandler_UI * handler=0x000000002657cf98, const wmEvent * event=0x0000000070e59f78, int always_pass=0) Line 585	C
 	blender.exe!wm_handlers_do_intern(bContext * C=0x0000000013d3cf78, wmEvent * event=0x0000000070e59f78, ListBase * handlers=0x00000000202a3fb8) Line 2491	C
 	blender.exe!wm_handlers_do(bContext * C=0x0000000013d3cf78, wmEvent * event=0x0000000070e59f78, ListBase * handlers=0x00000000202a3fb8) Line 2720	C
 	blender.exe!wm_event_do_handlers(bContext * C=0x0000000013d3cf78) Line 3071	C
 	blender.exe!WM_main(bContext * C=0x0000000013d3cf78) Line 421	C
 	blender.exe!main(int argc=1, const unsigned char * * UNUSED_argv_c=0x0000000008e1afa0) Line 507	C
 	[External Code]

in readfile.c

static void link_paint(FileData *fd, Scene *sce, Paint *p)
{
	if (p) {
		p->brush = newlibadr_us(fd, sce->id.lib, p->brush);
		for (int i = 0; i < p->tool_slots_len; i++) {  <---- p->tool_slots_len == 20
			if (p->tool_slots[i].brush != NULL) { <----p->tool_slots == NULL 
				p->tool_slots[i].brush = newlibadr_us(fd, sce->id.lib, p->tool_slots[i].brush);
			}
		}
		p->palette = newlibadr_us(fd, sce->id.lib, p->palette);
		p->paint_cursor = NULL;

		BKE_paint_runtime_init(sce->toolsettings, p);
	}
}

BTW, I can't even start blender with ASAN. I get the following errors:

blender/source/blender/blenloader/intern/readfile.c:6406:4: runtime error: member access within null pointer of type 'struct UvSculpt'
blender/source/blender/depsgraph/intern/depsgraph_tag.cc:317:9: runtime error: member access within null pointer of type 'struct Key'
Brecht Van Lommel (brecht) renamed this task from Blender 2.8 crashing when I try to load any project to Crashing loading .blend file with missing paint tool slots.Mar 30 2019, 9:08 PM
Brecht Van Lommel (brecht) lowered the priority of this task from 90 to High.