Blender game embedded player crash #46090

Closed
opened 2015-09-12 21:42:34 +02:00 by José Ricarte · 12 comments

System Information
CPU device capabilities: SSE2 SSE3 SSE41 AVX
renderer: 'GeForce GT 630/PCIe/SSE2'
vendor: 'NVIDIA Corporation'
version: '4.5.0 NVIDIA 346.82'

Blender Version
version 2.75 (sub 4), branch b'master', commit date b'2015-09-09' b'15:06', hash b'a2a0e7a', b'Release'
build date: b'2015-09-09', b'16:19:51'
platform: b'Linux:64bit'

Short description of error
Default file, Blender game render engine, star embedded player game engine and blender crash

**System Information** CPU device capabilities: SSE2 SSE3 SSE41 AVX renderer: 'GeForce GT 630/PCIe/SSE2' vendor: 'NVIDIA Corporation' version: '4.5.0 NVIDIA 346.82' **Blender Version** version 2.75 (sub 4), branch b'master', commit date b'2015-09-09' b'15:06', hash b'a2a0e7a', b'Release' build date: b'2015-09-09', b'16:19:51' platform: b'Linux:64bit' **Short description of error** Default file, Blender game render engine, star embedded player game engine and blender crash
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @ciriaco

Added subscriber: @ciriaco

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This isn't enough to go on, tested the player and it works here.
Could you run the player from a terminal and see if there is any messages printed?

This isn't enough to go on, tested the player and it works here. Could you run the player from a terminal and see if there is any messages printed?
Author

Ok:

Terminal:
ciriaco@fenix-ciriacus:~$ '/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender'
connect failed: No such file or directory
Read new prefs: /home/ciriaco/.config/blender/2.75/config/userpref.blend
found bundled python: /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/2.75/python
Detected GL_ARB_texture_env_combine
Detected GL_ARB_texture_cube_map
Detected GL_ARB_multitexture
Detected GL_ARB_shader_objects
Detected GL_ARB_vertex_shader
Detected GL_ARB_fragment_shader
Detected GL_ARB_vertex_program
Detected GL_ARB_depth_texture
Detected GL_EXT_separate_specular_color
Writing: /tmp/blender.crash.txt
Violación de segmento (`core' generado)

blender.crash.txt :

Blender 2.75 (sub 4), Commit date: 2015-09-09 15:06, Hash a2a0e7a

bpy.context.scene.render.engine = 'BLENDER_GAME' # Property

backtrace

/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(BLI_system_backtrace+0x1d) [0x1a3adbd]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1056234]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1056411]
/lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7f876c0a6d40]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(_Z23initGamePythonScriptingP4Main+0x2a) [0x19571ba]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(_Z15setupGamePythonP15KX_KetsjiEngineP8KX_SceneP4MainP7_objectPS6_S7_iPPc+0xd5) [0x1957485]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(StartKetsjiShell+0x869) [0x18e3f69]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x10e4f24]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1075f22]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x107642f]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1385186]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x13972a1]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1077796]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1077ad6]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(wm_event_do_handlers+0x1ba) [0x1077dea]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(WM_main+0x18) [0x105e9c8]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(main+0x556) [0x1058fb6]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f876c091ec5]
/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0xf5ad61]

Ok: Terminal: ciriaco@fenix-ciriacus:~$ '/home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender' connect failed: No such file or directory Read new prefs: /home/ciriaco/.config/blender/2.75/config/userpref.blend found bundled python: /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/2.75/python Detected GL_ARB_texture_env_combine Detected GL_ARB_texture_cube_map Detected GL_ARB_multitexture Detected GL_ARB_shader_objects Detected GL_ARB_vertex_shader Detected GL_ARB_fragment_shader Detected GL_ARB_vertex_program Detected GL_ARB_depth_texture Detected GL_EXT_separate_specular_color Writing: /tmp/blender.crash.txt Violación de segmento (`core' generado) blender.crash.txt : # Blender 2.75 (sub 4), Commit date: 2015-09-09 15:06, Hash a2a0e7a bpy.context.scene.render.engine = 'BLENDER_GAME' # Property # backtrace /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(BLI_system_backtrace+0x1d) [0x1a3adbd] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1056234] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1056411] /lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7f876c0a6d40] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(_Z23initGamePythonScriptingP4Main+0x2a) [0x19571ba] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(_Z15setupGamePythonP15KX_KetsjiEngineP8KX_SceneP4MainP7_objectPS6_S7_iPPc+0xd5) [0x1957485] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(StartKetsjiShell+0x869) [0x18e3f69] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x10e4f24] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1075f22] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x107642f] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1385186] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x13972a1] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1077796] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0x1077ad6] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(wm_event_do_handlers+0x1ba) [0x1077dea] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(WM_main+0x18) [0x105e9c8] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender(main+0x556) [0x1058fb6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f876c091ec5] /home/ciriaco/Escritorio/blender-2.76-testbuild2-linux-glibc211-x86_64/blender() [0xf5ad61]

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

I can confirm the crash using testbuild2 on Kubuntu 15.04 64-bit.
The strange thing is that when I build version a2a0e7a locally (CMake/gcc 4.9.2-10ubuntu13) it runs just fine. This makes it hard to debug, as a debug build doesn't crash :(

A second test using blender-2.75-79c668d-linux-glibc211-x86_64.tar.bz2 also crashes.

This is the decompiled assembly at the crash:

        Function: _Z23initGamePythonScriptingP4Main
0x1957dd6  <+0x0016>         lea    0x353b20a(%rip),%edi        # 0x4e92fe6
0x1957ddc  <+0x001c>         xor    %r8d,%r8d
0x1957ddf  <+0x001f>         xor    %ecx,%ecx
0x1957de1  <+0x0021>         xor    %edx,%edx
0x1957de3  <+0x0023>         xor    %esi,%esi
0x1957de5  <+0x0025>         callq  0x364dc00 <PyImport_ImportModuleLevel>
0x1957dea  <+0x002a>  CRASH  subq   $0x1,(%rax)
0x1957dee  <+0x002e>         jne    0x1957dfa <_Z23initGamePythonScriptingP4Main+58>
0x1957df0  <+0x0030>         mov    0x8(%rax),%rdx
0x1957df4  <+0x0034>         mov    %rax,%rdi
0x1957df7  <+0x0037>         callq  *0x30(%rdx)
0x1957dfa  <+0x003a>         callq  0x1957c30 <initBGE>
0x1957dff  <+0x003f>         mov    %rax,%rbx
0x1957e02  <+0x0042>         callq  0x364b8f0 <PyImport_GetModuleDict>
0x1957e07  <+0x0047>         lea    0x353b1dc(%rip),%rsi        # 0x4e92fea
0x1957e0e  <+0x004e>         mov    %rbx,%rdx
0x1957e11  <+0x0051>         mov    %rax,%rdi
0x1957e14  <+0x0054>         callq  0x35bc570 <PyDict_SetItemString>
0x1957e19  <+0x0059>         callq  0x19d40b0 <_ZN12PyObjectPlus22NullDeprecationWarningEv>
0x1957e1e  <+0x005e>         pop    %rbx
0x1957e1f  <+0x005f>         xor    %edi,%edi
0x1957e21  <+0x0061>         jmpq   0x1a1d380 <PyC_DefaultNameSpace>
0x1957e26                    nopw   %cs:0x0(%rax,%rax,1)

The crash happens at 0x1957dea, which is the line after the call to PyImport_ImportModuleLevel.

I'm not a master at assembly, but my bet is that PyImport_ImportModuleLevel returns NULL, which we subsequently try to Py_DECREF(), causing a crash.

On my self-build version, I can import the "aud" module (in Blender's Python console):

>>> import aud
>>> aud

<module 'aud' (built-in)>

However, on a buildbot-built version, I cannot:

>>> import aud

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: No module named 'aud'
I can confirm the crash using testbuild2 on Kubuntu 15.04 64-bit. The strange thing is that when I build version a2a0e7a locally (CMake/gcc 4.9.2-10ubuntu13) it runs just fine. This makes it hard to debug, as a debug build doesn't crash :( A second test using [blender-2.75-79c668d-linux-glibc211-x86_64.tar.bz2](https://builder.blender.org/download/) also crashes. This is the decompiled assembly at the crash: ``` Function: _Z23initGamePythonScriptingP4Main 0x1957dd6 <+0x0016> lea 0x353b20a(%rip),%edi # 0x4e92fe6 0x1957ddc <+0x001c> xor %r8d,%r8d 0x1957ddf <+0x001f> xor %ecx,%ecx 0x1957de1 <+0x0021> xor %edx,%edx 0x1957de3 <+0x0023> xor %esi,%esi 0x1957de5 <+0x0025> callq 0x364dc00 <PyImport_ImportModuleLevel> 0x1957dea <+0x002a> CRASH subq $0x1,(%rax) 0x1957dee <+0x002e> jne 0x1957dfa <_Z23initGamePythonScriptingP4Main+58> 0x1957df0 <+0x0030> mov 0x8(%rax),%rdx 0x1957df4 <+0x0034> mov %rax,%rdi 0x1957df7 <+0x0037> callq *0x30(%rdx) 0x1957dfa <+0x003a> callq 0x1957c30 <initBGE> 0x1957dff <+0x003f> mov %rax,%rbx 0x1957e02 <+0x0042> callq 0x364b8f0 <PyImport_GetModuleDict> 0x1957e07 <+0x0047> lea 0x353b1dc(%rip),%rsi # 0x4e92fea 0x1957e0e <+0x004e> mov %rbx,%rdx 0x1957e11 <+0x0051> mov %rax,%rdi 0x1957e14 <+0x0054> callq 0x35bc570 <PyDict_SetItemString> 0x1957e19 <+0x0059> callq 0x19d40b0 <_ZN12PyObjectPlus22NullDeprecationWarningEv> 0x1957e1e <+0x005e> pop %rbx 0x1957e1f <+0x005f> xor %edi,%edi 0x1957e21 <+0x0061> jmpq 0x1a1d380 <PyC_DefaultNameSpace> 0x1957e26 nopw %cs:0x0(%rax,%rax,1) ``` The crash happens at 0x1957dea, which is the line after the call to `PyImport_ImportModuleLevel`. I'm not a master at assembly, but my bet is that `PyImport_ImportModuleLevel` returns NULL, which we subsequently try to `Py_DECREF()`, causing a crash. On my self-build version, I can import the "aud" module (in Blender's Python console): ``` >>> import aud >>> aud <module 'aud' (built-in)> ``` However, on a buildbot-built version, I cannot: ``` >>> import aud Traceback (most recent call last): File "<blender_console>", line 1, in <module> ImportError: No module named 'aud' ```

This issue was referenced by eca704f579

This issue was referenced by eca704f579981b5d96f56999a298c0a74c3ef582

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Since I don't use SCons myself, but the buildbot does, we have to wait until another run of the buildbot to see if this is really fixed.

@ciriaco can you check with tomorrow's build?

Since I don't use SCons myself, but the buildbot does, we have to wait until another run of the buildbot to see if this is really fixed. @ciriaco can you check with tomorrow's build?
Author

Hi Sybren,

blender-2.75-a712459-linux-glibc211-x86_64 run Ok

Thanks for your work

Hi Sybren, blender-2.75-a712459-linux-glibc211-x86_64 run Ok Thanks for your work

Excellent! Thanks for checking.

Excellent! Thanks for checking.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#46090
No description provided.