Blender crash when physics createConstraint #41570

Closed
opened 2014-08-25 12:27:14 +02:00 by Marcin Nijaki · 45 comments

System Information
Windows 8.1 intel 4200

Blender Version
Broken: 2.71

Short description of error
Blender crash when physics createConstraint

Exact steps for others to reproduce the error
test_bug_270.blend
Open this file and run game engine.
This line:
vehicle = PC.createConstraint(G.car.getPhysicsId(),0,11)
make crash.

**System Information** Windows 8.1 intel 4200 **Blender Version** Broken: 2.71 **Short description of error** Blender crash when physics createConstraint **Exact steps for others to reproduce the error** [test_bug_270.blend](https://archive.blender.org/developer/F106621/test_bug_270.blend) Open this file and run game engine. This line: vehicle = PC.createConstraint(G.car.getPhysicsId(),0,11) make crash.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @marcino15

Added subscriber: @marcino15

#43038 was marked as duplicate of this issue

#43038 was marked as duplicate of this issue

#43176 was marked as duplicate of this issue

#43176 was marked as duplicate of this issue

Added subscriber: @Ace_Dragon

Added subscriber: @Ace_Dragon

Can you try to test this with a recent buildbot build? I ask because I opened two files of my own making use of physics constraints on my machine (one making use of the vehicle template and the other being just generic constraint creation) and there were no crashes.

Can you try to test this with a recent buildbot build? I ask because I opened two files of my own making use of physics constraints on my machine (one making use of the vehicle template and the other being just generic constraint creation) and there were no crashes.
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

I have checked the example and 2.69, 2.71 and current master work OK. In 2.70 the vehicle had a weird behaviour. But in any case blender didn't crash.

Could you check the file in current master (2.72RC) to test if the file works right for you now?

I have checked the example and 2.69, 2.71 and current master work OK. In 2.70 the vehicle had a weird behaviour. But in any case blender didn't crash. Could you check the file in current master (2.72RC) to test if the file works right for you now?
rahul commented 2014-10-18 12:09:32 +02:00 (Migrated from localhost:3001)

Added subscriber: @rahul

Added subscriber: @rahul

Added subscriber: @kohout.markus

Added subscriber: @kohout.markus
Author

I make several tests with Blender 2.72b:
Machine1: Windows 7 64 and Linux, Radeon 5670
Machine2: Windows 8.1 intel 4200

On machine1 evething is OK (both systems), but on machine2 Blender still crashing.

I make several tests with Blender 2.72b: Machine1: Windows 7 64 and Linux, Radeon 5670 Machine2: Windows 8.1 intel 4200 On machine1 evething is OK (both systems), but on machine2 Blender still crashing.

Added subscriber: @JacobMerrill-1

Added subscriber: @JacobMerrill-1

I get random crashes when adding and removing 6dof constraints,

I wish that blender crashing would show a debug screen.....

what object was processed when game crashed?

what step in the game loop?

I get random crashes when adding and removing 6dof constraints, I wish that blender crashing would show a debug screen..... what object was processed when game crashed? what step in the game loop?
Author

Blender crashes on this line:
vehicle = PC.createConstraint(G.car.getPhysicsId(),0,11)

Blender crashes on this line: vehicle = PC.createConstraint(G.car.getPhysicsId(),0,11)

Added subscriber: @raco

Added subscriber: @raco

I can confirm that the file doesn't crash with Blender 2.72b on Windows 7 64-bit. So probably it's a Windows 8 issue.

I can confirm that the file doesn't crash with Blender 2.72b on Windows 7 64-bit. So probably it's a Windows 8 issue.
Member

Added subscribers: @ThomasDinges, @MartijnBerger

Added subscribers: @ThomasDinges, @MartijnBerger
Member

Hi Thomas and Martijn,

As platform maintainers both of you have been added to the loop because we have several crashes in bullet related to windows 8.1. Could you check them, please?

Hi Thomas and Martijn, As platform maintainers both of you have been added to the loop because we have several crashes in bullet related to windows 8.1. Could you check them, please?

Added subscribers: @siegel, @mont29

Added subscribers: @siegel, @mont29

Added subscriber: @dfelinto

Added subscriber: @dfelinto

I get a crash on OSX as well (Blender 2.73).
The problem is an assert:

btAssert(wheel>=0 && wheel < getNumWheels());

And if I print out the variables I get wheel == 4, getNumWheels() == 4.
The back trace is the following:

- 0  0x00000001017084e5 in btRaycastVehicle::applyEngineForce (this=0x11651a070, force=-0, wheel=4) at /Users/dfelinto/blender/git/blender/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp:384
- 1  0x000000010133c669 in WrapperVehicle::ApplyEngineForce (this=0x1125738d0, force=-0, wheelIndex=4) at /Users/dfelinto/blender/git/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp:231
- 2  0x000000010142e339 in KX_VehicleWrapper::PyApplyEngineForce (this=0x112530f40, args=0x110969108) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_VehicleWrapper.cpp:160
- 3  0x000000010142ed29 in KX_VehicleWrapper::sPyApplyEngineForce (self=0x1109c68a0, args=0x110969108) at KX_VehicleWrapper.h:41
- 4  0x00000001019fcca2 in PyEval_EvalFrameEx (f=0x110b9d3e8, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:4227
- 5  0x00000001019f7b74 in PyEval_EvalCodeEx (_co=<value temporarily unavailable, due to optimizations>, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>, argcount=<value temporarily unavailable, due to optimizations>, kws=<value temporarily unavailable, due to optimizations>, defs=<value temporarily unavailable, due to optimizations>, defcount=<value temporarily unavailable, due to optimizations>, closure=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3578
- 6  0x00000001019718d5 in function_call (func=0x110977378, arg=<value temporarily unavailable, due to optimizations>, kw=<value temporarily unavailable, due to optimizations>) at Objects/funcobject.c:632
- 7  0x000000010194f3e7 in PyObject_Call (func=0x110977378, arg=0x10ab0f048, kw=0x0) at Objects/abstract.c:2067
- 8  0x00000001019ffced in PyEval_CallObjectWithKeywords (func=0x110977378, arg=<value temporarily unavailable, due to optimizations>, kw=0x0) at Python/ceval.c:4104
- 9  0x000000010147080d in SCA_PythonController::Trigger (this=0x116518ca0, logicmgr=0x1049fbd10) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_PythonController.cpp:443
- 10 0x0000000101467bb6 in SCA_LogicManager::BeginFrame (this=0x1049fbd10, curtime=0.1641945997873942, fixedtime=0.016666666666666666) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_LogicManager.cpp:200
- 11 0x000000010140ff1a in KX_Scene::LogicBeginFrame (this=0x1058edc00, curtime=0.1641945997873942) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_Scene.cpp:1575
- 12 0x00000001013cbbf0 in KX_KetsjiEngine::NextFrame (this=0x1049fb470) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp:668
- 13 0x00000001012997d6 in BL_KetsjiNextFrame (ketsjiengine=0x1049fb470, C=0x104805ec8, win=0x110dac1d8, scene=0x106bb8e08, ar=0x115b25948, keyboarddevice=0x1058eb400, mousedevice=0x1058ec800, draw_letterbox=0) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:136
- 14 0x0000000101298e4a in StartKetsjiShell (C=0x104805ec8, ar=0x115b25948, cam_frame=0x7fff5fbff2e0, always_use_expand_framing=1) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:581
- 1
I get a crash on OSX as well (Blender 2.73). The problem is an assert: ``` btAssert(wheel>=0 && wheel < getNumWheels()); ``` And if I print out the variables I get wheel == 4, getNumWheels() == 4. The back trace is the following: ``` - 0 0x00000001017084e5 in btRaycastVehicle::applyEngineForce (this=0x11651a070, force=-0, wheel=4) at /Users/dfelinto/blender/git/blender/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp:384 - 1 0x000000010133c669 in WrapperVehicle::ApplyEngineForce (this=0x1125738d0, force=-0, wheelIndex=4) at /Users/dfelinto/blender/git/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp:231 - 2 0x000000010142e339 in KX_VehicleWrapper::PyApplyEngineForce (this=0x112530f40, args=0x110969108) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_VehicleWrapper.cpp:160 - 3 0x000000010142ed29 in KX_VehicleWrapper::sPyApplyEngineForce (self=0x1109c68a0, args=0x110969108) at KX_VehicleWrapper.h:41 - 4 0x00000001019fcca2 in PyEval_EvalFrameEx (f=0x110b9d3e8, throwflag=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:4227 - 5 0x00000001019f7b74 in PyEval_EvalCodeEx (_co=<value temporarily unavailable, due to optimizations>, globals=<value temporarily unavailable, due to optimizations>, locals=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>, argcount=<value temporarily unavailable, due to optimizations>, kws=<value temporarily unavailable, due to optimizations>, defs=<value temporarily unavailable, due to optimizations>, defcount=<value temporarily unavailable, due to optimizations>, closure=<value temporarily unavailable, due to optimizations>) at Python/ceval.c:3578 - 6 0x00000001019718d5 in function_call (func=0x110977378, arg=<value temporarily unavailable, due to optimizations>, kw=<value temporarily unavailable, due to optimizations>) at Objects/funcobject.c:632 - 7 0x000000010194f3e7 in PyObject_Call (func=0x110977378, arg=0x10ab0f048, kw=0x0) at Objects/abstract.c:2067 - 8 0x00000001019ffced in PyEval_CallObjectWithKeywords (func=0x110977378, arg=<value temporarily unavailable, due to optimizations>, kw=0x0) at Python/ceval.c:4104 - 9 0x000000010147080d in SCA_PythonController::Trigger (this=0x116518ca0, logicmgr=0x1049fbd10) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_PythonController.cpp:443 - 10 0x0000000101467bb6 in SCA_LogicManager::BeginFrame (this=0x1049fbd10, curtime=0.1641945997873942, fixedtime=0.016666666666666666) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_LogicManager.cpp:200 - 11 0x000000010140ff1a in KX_Scene::LogicBeginFrame (this=0x1058edc00, curtime=0.1641945997873942) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_Scene.cpp:1575 - 12 0x00000001013cbbf0 in KX_KetsjiEngine::NextFrame (this=0x1049fb470) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp:668 - 13 0x00000001012997d6 in BL_KetsjiNextFrame (ketsjiengine=0x1049fb470, C=0x104805ec8, win=0x110dac1d8, scene=0x106bb8e08, ar=0x115b25948, keyboarddevice=0x1058eb400, mousedevice=0x1058ec800, draw_letterbox=0) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:136 - 14 0x0000000101298e4a in StartKetsjiShell (C=0x104805ec8, ar=0x115b25948, cam_frame=0x7fff5fbff2e0, always_use_expand_framing=1) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:581 - 1 ```

After further investigating I have no problems with the file once I comment out the following lines in the Python script:

138    vehicle.applyEngineForce(G.car["force"],4)
139    vehicle.applyEngineForce(G.car["force"],5)

So all that is left is the Windows 8 related bug.

After further investigating I have no problems with the file once I comment out the following lines in the Python script: ``` 138 vehicle.applyEngineForce(G.car["force"],4) 139 vehicle.applyEngineForce(G.car["force"],5) ``` So all that is left is the Windows 8 related bug.
Author

Can I expect fix this bug in near future?

Can I expect fix this bug in near future?

I think HG1 already committed a fix, in 2.73 but it made constraints break, but there is already a fix for that in 2.73a

I am not sure if it only fixed crashes from rigid body joints, or if vehicle constraints were effected as well.

I think HG1 already committed a fix, in 2.73 but it made constraints break, but there is already a fix for that in 2.73a I am not sure if it only fixed crashes from rigid body joints, or if vehicle constraints were effected as well.
Author

Vehicle constraints in 2.73a still not working.

Vehicle constraints in 2.73a still not working.

Added subscriber: @you.le

Added subscriber: @you.le

Hello! I had the same issue (with Blender 64 bits on windows 8.1 64 bits). Building Blender with Mingw with default user-config.py options solved the problem. When I build with visual studio 2013, it still doesn't work.

Hello! I had the same issue (with Blender 64 bits on windows 8.1 64 bits). Building Blender with Mingw with default user-config.py options solved the problem. When I build with visual studio 2013, it still doesn't work.

This issue was referenced by 4edc1bbe02

This issue was referenced by 4edc1bbe0277620aa9f272d98ea8d4f3642ce2ec
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit 4edc1bbe02.

Closed by commit 4edc1bbe02.
Member

Added subscriber: @brita

Added subscriber: @brita
Member

I confirm Dalai's debugging. The problem is that you are accessing wheels 4 and 5 with the applyEngineForce, while you only have wheels 0 to 3.
That is why it is crashing, though it shouldn't. I am changing to print an error message instead.

The test file also mentioned wheel wiggling but I could not reproduce, so @marcino15 please confirm closing.
(the change should be on the next daily build: https://builder.blender.org/download/ )

I confirm Dalai's debugging. The problem is that you are accessing wheels 4 and 5 with the applyEngineForce, while you only have wheels 0 to 3. That is why it is crashing, though it shouldn't. I am changing to print an error message instead. The test file also mentioned wheel wiggling but I could not reproduce, so @marcino15 please confirm closing. (the change should be on the next daily build: https://builder.blender.org/download/ )
Author

I deleted lines with accessing wheels 4 and 5, but still crashing on line: vehicle = PC.createConstraint(G.car.getPhysicsId(),0,11)

@brita did you test it on Windows 8.1?

I deleted lines with accessing wheels 4 and 5, but still crashing on line: vehicle = PC.createConstraint(G.car.getPhysicsId(),0,11) @brita did you test it on Windows 8.1?
Member

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Member

I do not have a windows machine. I get no crash on Linux 64bit.
I need the windows maintainers to test me this, then..

I do not have a windows machine. I get no crash on Linux 64bit. I need the windows maintainers to test me this, then..

Hello! I don't know if it can helps, but here is a topic I made about the bug on BA:

http://blenderartists.org/forum/showthread.php?357411-Bug-Blender-2-72b-64bits-windows-8-1-64-bits-bge-constraints

This .blend:

http://www.mediafire.com/download/n87q9215aotb240/BugConstraintsWin8.164bitsBlender2.7264bits.blend

crashes Blender too. And many others. I don't know if it's a bug with KX_VehicleWrapper.cpp. I don't think so because it works on windows 7 and it works with 32 bits versions of Blender. So it's a bug which concerns only Blender 64 bits on windows 8.1 64 bits.

I tested on 2 windows 8.1 machines:

First: GTX660 intel core2quad q9550 windows 8.1 pro 64 bits Blender 64 bits
Second: Intel HD 4000 intel core i5 3230m windows 8.1 pro 64 bits Blender 64 bits

On the 2 machines I have python 3.4.2 64 bits installed and Visual studio 2013. On the 2 machines, the .blend I mentionned crashes. Same with the Marcino .blend. Compile blender with mingw solve the problem (But other issues appeared...). So I'm wondering if the bug is related to a missing library in 64 bits sources (I'm a noob so I can't affirm anything), or a conflicting built dll (visual studio: vcomp120.dll, msvcr120.dll, msvcp120.dll... or python dll...). I don't know (just noob ideas).

To recap:

  • Concerns only 64 bits versions of Blender on Windows 8.1 64 bits
  • Tested on 2 machines, same crash (and several people mentionned this bug in BA forum)
  • Happens with bge.constraints (but again, only with 64 bits versions of Blender on windows 8.1 64 bits)

Hope this could help! And thank you very much for trying to resolve the bug!

Hello! I don't know if it can helps, but here is a topic I made about the bug on BA: http://blenderartists.org/forum/showthread.php?357411-Bug-Blender-2-72b-64bits-windows-8-1-64-bits-bge-constraints This .blend: http://www.mediafire.com/download/n87q9215aotb240/BugConstraintsWin8.164bitsBlender2.7264bits.blend crashes Blender too. And many others. I don't know if it's a bug with KX_VehicleWrapper.cpp. I don't think so because it works on windows 7 and it works with 32 bits versions of Blender. So it's a bug which concerns only Blender 64 bits on windows 8.1 64 bits. I tested on 2 windows 8.1 machines: First: GTX660 intel core2quad q9550 windows 8.1 pro 64 bits Blender 64 bits Second: Intel HD 4000 intel core i5 3230m windows 8.1 pro 64 bits Blender 64 bits On the 2 machines I have python 3.4.2 64 bits installed and Visual studio 2013. On the 2 machines, the .blend I mentionned crashes. Same with the Marcino .blend. Compile blender with mingw solve the problem (But other issues appeared...). So I'm wondering if the bug is related to a missing library in 64 bits sources (I'm a noob so I can't affirm anything), or a conflicting built dll (visual studio: vcomp120.dll, msvcr120.dll, msvcp120.dll... or python dll...). I don't know (just noob ideas). To recap: - Concerns only 64 bits versions of Blender on Windows 8.1 64 bits - Tested on 2 machines, same crash (and several people mentionned this bug in BA forum) - Happens with bge.constraints (but again, only with 64 bits versions of Blender on windows 8.1 64 bits) Hope this could help! And thank you very much for trying to resolve the bug!
  • The bug occured for the first time when updated from 2.70a to 2.71
- The bug occured for the first time when updated from 2.70a to 2.71

Added subscriber: @Paul-21

Added subscriber: @Paul-21

I am also having this error on blender 2.73a on windows 8.1 64.

it's crashing on the part where I create the vehicle constraint - just like everyone else.

create the constraint

  vehicle_Constraint = constraints.createConstraint(chassisId, 0, 11)
I am also having this error on blender 2.73a on windows 8.1 64. it's crashing on the part where I create the vehicle constraint - just like everyone else. # create the constraint ``` vehicle_Constraint = constraints.createConstraint(chassisId, 0, 11)
Member

Added subscriber: @viper31

Added subscriber: @viper31
Member

Proposed fix D1122

Proposed fix [D1122](https://archive.blender.org/developer/D1122)

Works for me! Thank you very much! And Congrats!

Works for me! Thank you very much! And Congrats!

This issue was referenced by 9bd2a7c0a8

This issue was referenced by 9bd2a7c0a8fff43d9193184ca6920b4aaed5f6c1
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit 9bd2a7c0a8.

Closed by commit 9bd2a7c0a8.
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
12 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#41570
No description provided.