Jump to content

Release/cleanup vehicle - error


Recommended Posts

I am trying to figure out why my game is crashing so often everytime I try to reset my car. I think I have found something but it also leaves with the question whether I am disposing my vehicle correctly.

 

The test script attached is only a slight modification from the Leadwerks vehicle API.

  1. Create a new map with terrain
  2. Create a camera
  3. Creae a pivot
  4. Attach script to pivot:crashtest.lua
  5. Press R, Vehicle is reset correctly
  6. Press R again, the game crashes with the output seen in the screenshot:

post-45-0-50522500-1484592456_thumb.jpg

Link to comment
Share on other sites

Crashes trying to release self.chassis. I put in self.chassis:Hide() as a test and it appeared to function okay.

That is what I use in the game that is currently in the game launcher. However that might be the reason the car becomes so glitchy when trying to load a new car level. That said the error above does seem like a bug. If not than there should be documentation on how to properly dispose of a vehicle/chassis.

 

Setting vehicle to nil first and then releasing the chassis wont work.

Link to comment
Share on other sites

That is what I use in the game that is currently in the game launcher. However that might be the reason the car becomes so glitchy when trying to load a new car level. That said the error above does seem like a bug. If not than there should be documentation on how to properly dispose of a vehicle/chassis.

 

Setting vehicle to nil first and then releasing the chassis wont work.

 

No bug in Linux, so this is Windows only. But game stops at second R hit.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...