firstperson driving vehicle problem

I can’t make get in and out of vehicles games no more.The game logic keeps on crashing the blender game engine.Here is the blend.

http://www.pasteall.org/blend/36396

The game doesn’t crash here (2.74, linux, amd64, radeon with prop drivers). I can’t tell if it also works because I’m not sure what the intended behavior is.

He means than when he press E nothing renders:D

When i press e the game engine crashes.Meaning it gets out of the whole program.What could be causing that?

Yeah, here is crashing too if you press E right after P to play the scene. Could be because the scene was made with an older version of Blender maybe ? It’s just a guess. I have no idea.

You have to press E as soon as you start the game to crash it. If you move away it’s not going to crash.

I fixed it. It’s the camera logic bricks. You have one Always sensor in pulse mode switching the camera and then a message trying to switch to the other camera.

That’s not how you switch cameras. Try again. LOL

Attachments

get in example fixed.blend (94.3 KB)

No it is not.It is made with blender 2.74.

Check the file I uploaded. I fixed it so it’s not crashing anymore but do a different switching for the cameras. Always in pulse mode ? Used for camera switching ? Seriously ? You know that’s wrong.

Gpu latency is 76 percent.How about yours?I did not know that.That is the way i always been doing that and it worked.

It is not fixed.It still crashes when i press e.Does that happen for you?

It looks like even the fixed one is crashing if you set the view to be on the camera. If you don’t look through the camera is not crashing. I don’t know what it is but must redo the logic bricks.

Use an integer or boolean to cycle through cameras.

GPU latency is high on mine too. About 47% or 8.12 milliseconds. Some rasterizer bugs or something.

I ran the test file through a debugger and I think I have an answer on “why”. The crash is a null pointer and it is triggered by the new LOD code. This lod code is a new feature and it has been updated so this explain why older versions of blender might have worked.
The engine crashes when the LOD code tries to access the active camera of the scene.
The test file deletes the active camera and replaces it with another one.
To make it work you must ensure to switch the camera before killing the current one.
Maybe.

That’s exactly what I said too. You have to redo the camera switcher using a property. When integer is 1 cam1 is active , when integer is 2 cam2 is active. No killing of the cameras. Don’t do endObject on the camera.

I wonder if anybody else has had that problem.

Here my version of a camera switcher done in 10 seconds and it’s not crashing.

Attachments

camera switcher.blend (84.7 KB)

As far as I remember, bge has always been quite happy to crash when the active_camera suddenly disappears. That’s because the code implicitly requires that an active camera always exists. The issue that you’re facing now is “new” just because a new piece of the system has been introduced which uses this precondition that has always been there.
Note that you can remove a camera from the game, you just have to be sure that the camera is no longer the active one before to kill it.

If you want to crash Blender just add and endObject actuator on the active camera and activate it by some keyboard key. And there you go. You just crashed it again. LOL

It worked.Now i can finally get back to making my game again.Thankyou, very much for your help.:yes: