Page MenuHome

Blender crashes when calling LibNew/LibFree multiple times on objects with materials
Closed, DuplicatePublic

Description

System Information
Windows 7 64-bit
Intel HD Graphics 4000

Blender Version
Broken: 2.69 r60995, 2.70 19e627c, 2.71 9337574, 2.72rc eb464ee
Worked: 2.67 r56533 2.68a r58537

Files

- Contains an Empty in the active layer that has the following script:

import bge

for i in range(3):
    print('LibNew:', i)
    bge.logic.LibNew('New', 'Mesh', ['Plane'])
    print('LibFree:', i)
    bge.logic.LibFree('New')

There is a Plane on the inactive layer that is using the default material.

Description
The BGE crashes after calling LibFree twice on objects that have a material attached.

Exact steps for others to reproduce the error
Open crash.blend. Press P to start the BGE. Blender will immediately crash after printing the following to the console:

LibNew: 0
LibFree: 0
LibNew: 1
LibFree: 1

This shows the crash occurs at the second call to LibFree.

Additional Notes

  • The calls to LibNew/LibFree do not have to happen on the same frame for the crash to occur.
  • Changing the name of the library each loop has no effect
  • Changing the mesh/material that LibNew/LibFree is called on each loop has no effect. The only requirement is that the objects have a material
  • It does not matter if the object passed to LibNew is on an active or inactive layer.
  • The crash happens on both Multitexture and GLSL shading modes.

Event Timeline

mobious created this task.Oct 10 2014, 5:54 AM
mobious raised the priority of this task from to 90.
mobious updated the task description. (Show Details)
mobious added a project: Game Engine.
mobious edited a custom field.
mobious added a subscriber: mobious.