Page MenuHome

Loading old .blend file that has grid subdivisions set to 0 crashes Blender
Closed, ResolvedPublic

Description

Blender Version
Broken: 2.75a c27589e
Worked: Not sure, the file is at least 5 years old from when Blender had the old-style interface.

Upon loading Blender crashes with the backtrace shown below.

I've managed to workaround this bug by altering line 494 of view3d_draw.c to the following:

const int sublines = v3d->gridsubdiv? v3d->gridsubdiv : 1;

This allowed me to load the file, so I could set the subdivisions to a sensible value and save.

Exact steps for others to reproduce the error
Load this file:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       EXC_I386_DIV (divide by zero)

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.blenderfoundation.blender 	0x000000010020f301 drawfloor + 433
1   org.blenderfoundation.blender 	0x000000010020a219 view3d_draw_objects + 553
2   org.blenderfoundation.blender 	0x000000010020be69 view3d_main_area_draw + 1193
3   org.blenderfoundation.blender 	0x00000001004b60ca ED_region_do_draw + 330
4   org.blenderfoundation.blender 	0x000000010017f46c wm_draw_update + 1516
5   org.blenderfoundation.blender 	0x000000010017d8b0 WM_main + 48
6   org.blenderfoundation.blender 	0x0000000100179484 main + 1556
7   org.blenderfoundation.blender 	0x0000000100002134 start + 52