Page MenuHome

Blender 2.59 file with texface causes blenderplayer 2.61 to crash
Closed, ArchivedPublic

Description

Category: Conversion

If a scene contains old texface objects, blenderplayer 2.61 will segfault while loading it. Some texface conversion messages are printed to the console; then, it crashes when trying to access G.main, which is NULL (see attached stack trace).

This is probably an unimportant bug, since the workaround is so simple: load the file in 2.61, and save it. Now that I know the workaround, I would be content with the bug being simply closed.

== System info ==
OS: Ubuntu 11.10 (64-bit)
Blender: r42947 (2.61+)
Video: ATI Mobility Radeon HD 5430 (closed fglrx driver)
CPU: Intel Core i5 U 430

Event Timeline

Hi Alex,
It seems that the problem was fixed. In trunk I get no crashes with blenderplayer.
I'm closing the report now. If the problem is still there (even though there is a known workaround), mind replying? I can re-open the track if need be

Hi Dalai,

Hmm no, it still crashes for me, at the same place. main is null in:

foreach_nodetree (main=0x0, calldata=0x1fbadb8, func=0xa291f5 <ntree_verify_nodes_cb>), blender/source/blender/nodes/shader/node_shader_tree.c:68

This is in r48799.

Hi Alex,
can you retry with a build from builder.blender.org or make sure you remove the entire blender project before rebuilding it?

blenderplayer doesn't update DNA automatically so it may be the problem.
(I don't get this in OSX nor Mitchell in Windows, but I don't believe a linux only problem makes sense here)

I cannot seem to reproduce the crash using Windows or Arch when using a recent SVN build.

Mitchell, so you tried it in Arch Linux, using the attached matConveryBug.blend? It happens for me every time. I just confirmed it again with http://builder.blender.org/download/blender-2.63-r48909-linux-glibc27-x86_64.tar.bz2; the text on the console is:

$ ./blender-2.63-r48909-linux-glibc27-x86_64/blenderplayer ~/Downloads/matConvertBug.blend
TexFace Convert: Material "Material.TF.66050" created.
TexFace Convert: Material "Material.TF.131073" created.
Segmentation fault (core dumped)

Attaching a stack trace from current trunk HEAD.

Okay, correction when using the player, I do get a crash in Windows and Linux (Arch). I was testing Blender, and not the player earlier.

I reopened then. though I find this a strange bug. My guess is that the material we are creating in the texface conversion code is creating a problem to the stack of materials
thus breaking for (ma= main->mat.first; ma; ma= ma->id.next)

Hi Alex. I'm going to close this.
Basically because the real issue is in the node_shader code (G.main shouldn't be used like this) and it's a pending fix for depsgraph fixes.
Also, no one just go and use a blenderplayer from a new blender. It's expected from the user to use the new blender first (thus saving the file) before deploying it.

Thanks for the report though. (also for my own records, this has nothing to do with texface code changes)

Dalai Felinto (dfelinto) changed the task status from Unknown Status to Archived.Feb 22 2013, 10:06 AM