System hang when debugging

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

z0r
Posts: 7
Joined: Wed Oct 18, 2006 8:29 am
Location: Japan

System hang when debugging

Postby z0r » Wed Jul 20, 2011 3:32 am

When debugging Blender in QTCreator, my whole system sometimes hangs. Has anyone else experienced this? I have noticed this on a couple of different machines, but it seems to only happen with ATI video cards (using either open source or closed drivers). My machine at work, which has an nVidia card, doesn't seem to be affected.

This doesn't happen every time, but it happens often enough to make me hesitate to run Blender in a debugger. Maybe 1 in 5 times. When it does happen, I have to do a hard reset of my machine.

Any assistance stopping this from happening would be greatly appreciated. Is it because I'm debugging an OpenGL app? Or because of QTCreator?

OS: Ubuntu 10.04 and 11.04
Affected video cards: ATI Mobility Radeon x1400 (FOSS driver, no Compiz), Mobility Radeon HD 5430 (fglrx, using Compiz)

z0r
Posts: 7
Joined: Wed Oct 18, 2006 8:29 am
Location: Japan

Postby z0r » Wed Jul 20, 2011 5:20 am

A bit more testing: this happens even if using plain old gdb instead of QTCreator, and it happens whether or not Compiz is running.

z0r
Posts: 7
Joined: Wed Oct 18, 2006 8:29 am
Location: Japan

Postby z0r » Sun Aug 14, 2011 10:47 am

The solution seems to be to use Mesa instead of the regular drivers. In Ubuntu 11.04: Install libgl1-mesa-dev, then preload /usr/lib/mesa/libGL.so when starting Blender.

    On the command line:

    Code: Select all

    LD_PRELOAD=/usr/lib/mesa/libGL.so gdb blender

    In QTCreator: Projects mode > Run settings > Run Environment > Details > Add; variable=LD_PRELOAD, value=/usr/lib/mesa/libGL.so


Thanks to ideasman_42 for his help with this!

z0r
Posts: 7
Joined: Wed Oct 18, 2006 8:29 am
Location: Japan

Postby z0r » Sun Sep 30, 2012 7:31 am

z0r wrote:
    On the command line:

    Code: Select all

    LD_PRELOAD=/usr/lib/mesa/libGL.so gdb blender



In Ubuntu 12.04, the path is actually

Code: Select all

/usr/lib/x86_64-linux-gnu/mesa/libGL.so

But it's quite unusable (causes flickering).


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 2 guests