Crashing loading .blend file with missing paint tool slots #63046

Closed
opened 2019-03-28 13:25:47 +01:00 by Edward Linley · 12 comments

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: cd92f8ea46
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.Temp_box.blend

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

**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: `cd92f8ea46` 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.[Temp_box.blend](https://archive.blender.org/developer/F6894969/Temp_box.blend) **Exact steps for others to reproduce the error** Simply try to open the file.
Author

Added subscriber: @JzakOfKhabar

Added subscriber: @JzakOfKhabar

Added subscriber: @antoniov

Added subscriber: @antoniov

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 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.

Added subscribers: @LazyDodo, @ZedDB

Added subscribers: @LazyDodo, @ZedDB

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

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

I can not reproduce this on my end (linux). @LazyDodo can you reproduce this too (we can double confirm that this is probably a windows issue).
Member

@ZedDB given @antoniov stack trace seems to suggest mem issues,try running with ASAN see if that has anything to say about it.

@ZedDB given @antoniov stack trace seems to suggest mem issues,try running with ASAN see if that has anything to say about it.
Member

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]	
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] ```
Member

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);
	}
}
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'
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' ```
Campbell Barton was assigned by Brecht Van Lommel 2019-03-28 20:18:29 +01:00
Brecht Van Lommel changed title from Blender 2.8 crashing when I try to load any project to Crashing loading .blend file with missing paint tool slots 2019-03-30 21:08:45 +01:00

Added subscriber: @matc

Added subscriber: @matc

This issue was referenced by c0432c2385

This issue was referenced by c0432c2385e655563cc9cfeec6e97f531d0b1f24

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
7 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#63046
No description provided.