Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: crash with vehicle at exit #593

Closed
youle31 opened this issue Sep 10, 2017 · 5 comments
Closed

Bug: crash with vehicle at exit #593

youle31 opened this issue Sep 10, 2017 · 5 comments
Labels

Comments

@youle31
Copy link
Collaborator

youle31 commented Sep 10, 2017

debug trace: http://pasteall.org/pic/show.php?id=118620
file: http://pasteall.org/blend/index.php?id=47778

edit: recents commits related to vehicle:
3341047
4fd1407

@youle31 youle31 added the bug label Sep 10, 2017
@DCubix
Copy link
Collaborator

DCubix commented Sep 10, 2017

Also, the wheels are shaking and applyBraking has a delay before activating

@panzergame
Copy link
Contributor

I failed reproduce the crash even while running valgrind.
About the wheel shaking it looks that bullet doesn't support non-normalized vector for axis and down direction.
I propose you to normalize these vector internally to avoid any user errors.

@youle31
Copy link
Collaborator Author

youle31 commented Sep 10, 2017

Thanks for explanation panzergame! About the crash, i'll reconnect after my night. Now we have a cool all in one template for vehicle, that's cool. Thanks TwisterGE!

panzergame added a commit that referenced this issue Sep 11, 2017
Previously when a controller was removed we checked
vehicle constraints using it to be removed as we do
for other kind of constraints. But the way we removed
the constraint was to iterate over all vehicle constraint
and when the chassis match the controller to delete,
then we call the function RemoveVehicle which actually
does the deletion of the constraint and removed from
a vehicle constraints list.
But as the elements of the list could be remove the
iteration over all the elements without taking in account
the deletion of the items resulted in invalid memory
acces.

To solve this issue the function RemoveVehicle is overriden
to support CcdPhysicsController as first argument and
does the lookup into it with a proper managing of iteration
over variable size list.

Fix a part of #593.
@panzergame
Copy link
Contributor

The crash was fixed in the last release (0.2.0).

panzergame added a commit that referenced this issue Sep 15, 2017
Previously the user was able to specify a unormalized axis direction
for wheel and suspension in a vehicle wrapper, but bullet doesn't handled
it properly and generated odd wheel angles.

To fix this issue we ensure that the axis direction are well normalized.

Fix second part of issue: #593.
@youle31
Copy link
Collaborator Author

youle31 commented Sep 15, 2017

I forgot tp close sorry

@youle31 youle31 closed this as completed Sep 15, 2017
lordloki added a commit that referenced this issue Apr 3, 2020
Previously when a controller was removed we checked vehicle constraints
using it to be removed as we do for other kind of constraints. But the
way we removed the constraint was to iterate over all vehicle constraint
and when the chassis match the controller to delete, then we call the
function RemoveVehicle which actually does the deletion of the
constraint and removed from a vehicle constraints list.
But as the elements of the list could be remove the iteration over all
the elements without taking in account the deletion of the items
resulted in invalid memory access.

To solve this issue the function RemoveVehicle is overriden to support
CcdPhysicsController as first argument and does the lookup into it with
a proper managing of iteration over variable size list.

Fix a part of #593.

Initially commited by panzergame
lordloki added a commit that referenced this issue Apr 3, 2020
Previously the user was able to specify a unormalized axis direction for
wheel and suspension in a vehicle wrapper, but bullet doesn't handled it
properly and generated odd wheel angles.

To fix this issue we ensure that the axis direction are well normalized.

Fix second part of issue: #593.

Initially commited by panzergame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants