Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't load any track
03-31-2012, 12:29 PM,
Can't load any track
I'm on windows xp 32bit, compiled VDrift in visual studio 2008.
Gui works fine.
But I can't load any track.
When loading track starts, I see progress but right after, it goes back to menu.

This is log.txt

I've tried to debug,
bool TRACK::LOADER::BeginLoad()
goes fine to end, but in
bool TRACK::LOADER::ContinueLoad()
returns here:
std::pair <bool, bool> loadstatus = ContinueObjectLoad();
if (loadstatus.first)
return false;

This line fails loading:
if (!content.load(objectdir, model_name, object.model))

It's either something wrong with paths, or something deeper in code.

[08:33:50] ERROR: Failed to load 3dgr0002_gsblade.dof-00.joe from: C:\Documents and Settings\username\Documents\VDrift/tracks/suzuka2005/objects data/tracks/suzuka2005/objects data/carparts data/trackparts

it fails even with all paths set to data/ (manually in code):

ERROR: Failed to load back0002_back05.dof-00.joe from: data/tracks/paulricard88/objects data/tracks/paulricard88/objects data/carparts data/trackparts
04-01-2012, 09:12 AM,
Weird. I don't have winxp to replicate unfortunately, will see if I can get access to one.
04-01-2012, 01:57 PM,
3dgr0002_gsblade.dof-00.joe is the first model inside data/tracks/suzuka2005/objects/objects.jpk. I don't see any way to get the error you got without getting an earlier error explaining what the load error was. If you want to try to debug this, put breakpoints in contentmanager.cpp in the load functions and see which one gets hit for the .joe files. It should be this one:

bool ContentManager::load(
std::tr1:Confusedhared_ptr<MODEL>& sptr,
const std:Confusedtring& abspath,
const JOEPACK& pack)

and if you step into this line:

if (temp->Load(name, error, !model_vbo, &pack))

you should end up in MODEL_JOE03::Load in model_joe03.cpp. Try and figure out why that's returning false.
04-28-2012, 01:45 PM,
Ok, I've debugged today a bit further. This is extremely strange and I don't know what's wrong.
I've put a breakpoint in bool MODEL_JOE03::Load,
it is hit when entering track menu, the rotating car is loaded, and is there,
but when I press practice game it does not get hit at all (it should several times right?).

I've done also following, in game.cpp:
bool GAME::NewGame(bool playreplay, bool addopponents, int num_laps)
it fails here:
if (!LoadTrack(trackname))
so i commented out the //return false;
then it fails in
if (!LoadCar(carname, carpaint, carcolor, track.GetStart(0).first, track.GetStart(0).second, true, false, carfile))
if I comment out there //return false;
game doesnt crash, starts but it is just black screen with hud times bar, N gear ABS,TCS controls.

Then I went to bool GAME::LoadCar(
and both
if (!car.LoadGraphics(
if (!car.LoadPhysics(
fail, no idea why.

Further, in
bool CAR::LoadPhysics(
the line
if (!dynamics.Load(cfg, size, center, position, rotation, damage, world, error_output)) return false;
fails, going inside the
it happens just here
error << "No differential declared" << std::endl;
Why ?? LoadClutch,LoadEngine and the 4 methods before it succeed.
if i comment out the return false there it goes few lines but fails in:
bool CARTIRE::Load(
on everything that is supposed to be loaded from it.

Track surfaces were ok and start postions too.
I have put manual arrays filling in code for tire load, but then it failed on some shape_id in FractureBody being null, whatever.

Is something wrong with PTree code ? I don't know what's going on here.
Half of the stuff isn't loaded while the other half is.
04-28-2012, 02:28 PM,
I'd focus on the first thing that fails. Make sure you are using the latest data with the latest source.

You can write out PTree content to check if there are parser issues. It also has got a few unit tests.

No idea what's wrong. I test it with vs2010, gcc4.6, clang on win7 and gcc4.6 on linux somewhat regularly. Just don't know anyone with winxp.
04-29-2012, 05:32 AM,
Right. OK, I've started tests:
First it crashes in:
[-------------- RUNNING UNIT TESTS --------------]
Assertion failed: !sigma_hat.empty(), file .\src\cartire.cpp, line 83
After commenting out tire tests (/*QT_TEST(tire_test) ..*/ in cartire.cpp) I have
[-------------- RUNNING UNIT TESTS --------------]
.\src\config.cpp(344): 'config_include' FAILED: cfg_test_file_loaded
.\src\joepack.cpp(207): 'joepack_test' FAILED: p.Load("data/test/test1.jpk")
.\src\joepack.cpp(208): 'joepack_test' FAILED: p.fopen("testlist.txt")
.\src\joepack.cpp(211): 'joepack_test' FAILED: value1 (0) should equal value2 (16)
.\src\joepack.cpp(215): 'joepack_test' FAILED: value1 () should equal value2 (This is
a test.
and then it crashes in
void VERTEXARRAY::SetNormals(
on line
float * myarray = &(normals[offset]);
for offset = 0.

OMG. Confusedhock:

Anyway paths are ok, gui works and most files are read right, but just to be sure, I have main directory here:
this is the git sources repo with subdir src\ having all *.h and *.cpp

inside main dir I have data\ which is rev 981 from svn: vdrift/vdrift-data
i've set env. var VDRIFT_DATA_DIRECTORY to e:\v\_pro\SR\v\vdr_git\data (didnt change anything, data\ subdir is read anyway right?)

and main dir has also vdrift-win\ subdir with bullet\ include\ and lib\ (from git).

Here is my log when I press practice race, which doesnt crash just has no track or car with black screen and default hud:

Ah and I forked your repo on:

I've put some more debug output for the first crash with tire test, see my last commit for diff. You had tire_path "/touring" which doesnt exist, I changed to "/tire/touring". Now it loads params and Debug pTree shows good values, log is here:

Any ideas ?
I'd like to compile in VS2008, maybe you could test it in VS2008 express ?
Or just tell me what to check/debug now.
04-29-2012, 05:55 AM,
Yeah, unit tests seem to be somewhat outdated, should run them more often. I'll try to build with vs2008 later today.
04-29-2012, 06:00 AM,
Ok I think I've found the problem. In
bool CARTIRE::Load(
if I change the line
if (!LoadParameters(*type, error)) return false;
if (!LoadParameters(cfg, error)) return false;
the tire_test passes.
If not then in CARTIRE::LoadParameters the pTree is empty (DebugPrint shows nothing).

Maybe there is something wrong with passing that type to template argument in
if (!cfg.get("type", type, error)) return false;
04-29-2012, 06:38 AM,
bool CARTIRE::LoadParameters(const PTree & cfg
cfg looks not empty, but begin() == end(). Thus cfg.DebugPrint() writes nothing here.
There is _value="tire-touring" but _children is empty [0].
But _parent has [49] _children (all the a,b,c tire params).
So this line can't find any tire param and fails:
if (!cfg.get(st.str(), lateral[i], error)) return false;
04-29-2012, 05:17 PM,
Sigh, won't compile with vs2008. Will see if I feel masochistic enough to waste time on working around their stl implementation(which they seem to have fixed in vs2010 btw).

Just remembered that the bullet dudes had to roll their own vector class aka btAlignedObjectArray.

Patches are welcome.
04-29-2012, 06:24 PM,
OK. The required changes turned out to be rather simple. I can confirm the loading bugs you are encountering with vs2008.
04-29-2012, 07:25 PM,
I've pushed a fix for the loading issue. Please test.
04-30-2012, 01:07 AM,
Wow, great.
The game works fine now.
Big Thanks NaN.

Btw. The simplest way to solve the VS2008 problem with list align is here:

Forum Jump:

Users browsing this thread: 1 Guest(s)