Blender crashes - how to investigate, find culprit?

Asked by darenw on 2011-12-10

When I'm using Blender to create a 3D model, it often crashes. I suspect something other than Blender itself is the problem. It used to run fine for hours, but suddenly started crashing about three weeks ago. This crash occurs nondeterministically, but when it occurs, it's immediately following a right-click on an object. I can right-click an unpredictable number of times just fine, but then suddenly poof! Blender instantly vanishes and I'm looking at the command line.

I don't recall if there were any updates to Ubuntu, if I installed or removed some software with Synaptic, or not. I had been using ubuntu 11.04, with xubuntu-desktop added, which I might have done around the time the crashing started. When 11.10 came out, I hoped it would fix the crash, but no it didn't.

Thinking I had a buggy version of Blender, I tried an earlier version. And an even earlier version. Then the newest. Then compiled the newer-than-newest from subversion. (Or do they use git? I forget.) All Blender 2.5x and 2.6x show this crash. It's a Heisenbug in that all attempts to create a small simple scene for testing won't lead to a crash. Apparently the bug senses when I'm doing serious work. Scenes that do crash have meshes of only a few hundred quads, and only 3 or 4 lights with default textures.

From years of experience with computers, software development and Linux, I get the impression it's a problem with some library or X11 version mismatch, maybe something with the windows manager or desktop system, or a misconfiguration of any of these.

Here's the Question: What are some techniques for gaining more information about these crashes, so I can pinpoint the culprit? Or at least come up with a short list of suspects?

More info for the technical-detail inclined:
Strace and gdb running Blender don't reveal much. Here's a gdb run that crashed:

(gdb) r
Starting program: /home/darenw/SW/bin/blender
[Thread debugging using libthread_db enabled]
connect failed: No such file or directory
ndof: spacenavd not found
[New Thread 0x7ffff17ff700 (LWP 4659)]
[Thread 0x7ffff17ff700 (LWP 4659) exited]
[New Thread 0x7ffff17ff700 (LWP 4660)]
[New Thread 0x7fffebfff700 (LWP 4661)]
[New Thread 0x7fffeb7fe700 (LWP 4662)]
[Thread 0x7fffeb7fe700 (LWP 4662) exited]
found bundled python: /home/darenw/Blender/sw/blender-2.61rc-linux-glibc27-x86_64/2.60/python
read blend: /home/darenw/proj/WiggleWave/anim/crash_dsw2727B.blend

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f1fed8 in ?? ()
(gdb)

and strace's dying gasp ends with:

munmap(0x7f9e4a5ca000, 65536) = 0
ioctl(8, 0x40086409, 0x7fffc51d23c0) = 0
munmap(0x7f9e4a6ea000, 128) = 0
ioctl(8, 0x40086409, 0x7fffc51d23c0) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu blender Edit question
Assignee:
No assignee Edit question
Solved by:
darenw
Solved:
2011-12-14
Last query:
2011-12-14
Last reply:
2011-12-10
Andres Attemann (attemann) said : #1

You probably already done this but just in case:
memory test
hdd fsck and smart status
try to switch video drivers, e.g. if you're using nouveau then switch to nvidia-current and vice versa. Same with ati drivers.

Maybe related? https://bugs.launchpad.net/ubuntu/+source/blender/+bug/787244

You can also open a new bug:
1. Open a terminal by hitting CTRL + ALT + T
2. Insert and run this command:
ubuntu-bug blender

darenw (darenw) said : #3

Disk, memory are okay. All other software runs fine. I made an official bug report. Not sure how I can test video drivers without shutting down all the other stuff I have up all the time, but some time this weekend I'll try that.

darenw (darenw) said : #4

Switched to fglrx, which I had no clue about until this. Oddly, I had to switch to KDE in order for it to work right. But I've modeled all day in Blender y'day with zero crashes. It would be nice if the original default driver could be fixed, however.