The TORCS Racing Board
Username: Password: Remember Me?
Lost Password Register
Author: phi | Created: 2017-12-20 08:59:47
Subject: Michigan Speedway: DanDroid/DummyDrivers
Hi, Danny


driver.cpp::updateBasics() ==> C0000005 (access violation):

Some meters after the starting line 'mCar.car()->_trkPos.seg->side[mOnLeftSide]' is NULL and TORCS stops.

Strangely, Dummy stop in line 276, and Droid stop in line 278.


Have a nice day.
Last Edited: 2017-12-20 09:05:51 by phi
    Author: dummy | Created: 2017-12-20 09:27:38
    Subject: Re: Michigan Speedway: DanDroid/DummyDrivers
    Hi Paulo,

    Thank you for reporting this bug. I guess the following will fix it, but I don't know what the problem with line 278 is.

    if (mCar.car()->_trkPos.seg->side[mOnLeftSide] != NULL) {
    mBorderFriction = mCar.car()->_trkPos.seg->side[mOnLeftSide]->surface->kFriction;
    } else {
    mBorderFriction = 1.0;
    }
    Last Edited: 2017-12-20 09:31:09 by dummy
      Author: phi | Created: 2017-12-20 09:53:16
      Subject: Re: Michigan Speedway: DanDroid/DummyDrivers
      It works, thanks. In line 278 Droid stop with 'this = NULL' (is not the case of Dummy). Probably is a debug bug, I dont know.
      Last Edited: 2017-12-20 09:53:16 by phi