![]() |
Can't load any track - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4) +--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9) +--- Thread: Can't load any track (/showthread.php?tid=1627) |
Can't load any track - CrystalH - 03-31-2012 Hi. 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 http://pastebin.com/idCbY3Vq I've tried to debug, Code: bool TRACK::LOADER::BeginLoad() Code: bool TRACK::LOADER::ContinueLoad() Code: std::pair <bool, bool> loadstatus = ContinueObjectLoad(); This line fails loading: Code: 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 - NaN - 04-01-2012 Weird. I don't have winxp to replicate unfortunately, will see if I can get access to one. - joevenzon - 04-01-2012 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: ![]() const std: ![]() 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. - CrystalH - 04-28-2012 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 bool CARDYNAMICS::Load( 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. - NaN - 04-28-2012 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. - CrystalH - 04-29-2012 Right. OK, I've started tests: First it crashes in: Code: [-------------- RUNNING UNIT TESTS --------------] Code: [-------------- RUNNING UNIT TESTS --------------] void VERTEXARRAY::SetNormals( on line float * myarray = &(normals[offset]); for offset = 0. OMG. ![]() Anyway paths are ok, gui works and most files are read right, but just to be sure, I have main directory here: e:\v\_pro\SR\v\vdr_git\ 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: http://pastebin.com/LXAEHN4F Ah and I forked your repo on: https://github.com/stuntrally/vdrift/commits/master 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: http://pastebin.com/duULr5cm Any ideas ? I'd like to compile in VS2008, maybe you could test it in VS2008 express ? http://www.microsoft.com/en-us/download/details.aspx?id=20682 Or just tell me what to check/debug now. - NaN - 04-29-2012 Yeah, unit tests seem to be somewhat outdated, should run them more often. I'll try to build with vs2008 later today. - CrystalH - 04-29-2012 Ok I think I've found the problem. In bool CARTIRE::Load( if I change the line if (!LoadParameters(*type, error)) return false; to 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; - CrystalH - 04-29-2012 Hmm, Inside: 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; - NaN - 04-29-2012 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. Edit: Patches are welcome. - NaN - 04-29-2012 OK. The required changes turned out to be rather simple. I can confirm the loading bugs you are encountering with vs2008. - NaN - 04-29-2012 I've pushed a fix for the loading issue. Please test. - CrystalH - 04-30-2012 Wow, great. The game works fine now. Big Thanks NaN. Btw. The simplest way to solve the VS2008 problem with list align is here: http://code.google.com/p/vdrift-ogre/issues/detail?id=135 |