Forums

Full Version: vdrift single-threaded crash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
version 2380 works in multithreaded mode, but if i try to run it in singlethreaded mode i get:
Code:
vdrift: src/game.cpp:1414: void GAME::UpdateCarCollisions(CAR&, std::vector<COLLISION_CONTACT, std::allocator<COLLISION_CONTACT> >&, bool) const: Assertion `cached_collisions.size() == 4' failed.
SIGABRT detected, releasing the mouse
Abort
version 2379 works fine (in both single and multi-threaded modes, so i am not sure what bug got fixed. looks like a new one was introduced, though)

--alex--
Is there a process that's used for debugging in gdb? When I try to run vdrift in gdb to hunt down the issue, vdrift captures the keyboard/mouse, but then gdb halts vdrift, preventing the sigabrt code from releasing the kbd/mouse, leading to a deadlock on input.

I'm getting this bug too: AMD64 Ubuntu Intrepid, single threaded.
Sorry guys, forgot to test the new code before I checked it in. :oops:

Should be fixed in 2381.

The change was to make multithreaded mode actually do something -- before it was splitting drawing into a separate thread from everything else, but they were running in series because when I'd run them in parallel they'd cause crashes due to one thread changing data while the other was trying to access it. Putting proper locks everywhere was negating the performance increase. The code now uses multithreading for calculation of car physics only, so each car gets its own thread. This doesn't result in a huge speedup (the physics code is pretty fast, especially with optimizations on), but it's at least something, and was easy to add.