I can compile it, but it crashes... - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html) +--- Forum: HPL1 Engine (https://www.frictionalgames.com/forum/forum-28.html) +--- Thread: I can compile it, but it crashes... (/thread-3362.html) Pages:
1
2
|
I can compile it, but it crashes... - MulleDK19 - 05-14-2010 So I got it all compiled, and got a Penumbra.exe, but it just crashes. I copied it to my Penumbra: Overture game folder. I don't really know what's wrong, or how I could possibly find out. I had to ignore TaskKeyHook.lib though. Perhaps that's the problem? I have no idea what it is, or where to get it? It's not included in the source. Another deprecated Windows SDK library perhaps? Edit: Oh... It's part of the HPL1Engine... TaskKeyHook.h RE: I can compile it, but it crashes... - Urkle - 05-14-2010 game folder? or the redist folder? It needs to be in the same folder where the resources.cfg file is. Also look at the hpl.log that is generated in the Game folder in your "Documents And Settings" folder. All errors are only logged to the hpl.log :-D RE: I can compile it, but it crashes... - MulleDK19 - 05-14-2010 (05-14-2010, 07:50 PM)Urkle Wrote: game folder? or the redist folder? It needs to be in the same folder where the resources.cfg file is. I'm placing it where the original Penumbra.exe is. There's no log created... I just launch the executable, and "Penumbra.exe has stopped working" pops up. That's it. Here's my executable: http://www.treesoft.dk/penumbra/Penumbra.zip RE: I can compile it, but it crashes... - Urkle - 05-14-2010 I've removed the TaskKeyHook stuff as it wasn't even being used anymore. Try building a debug build for windows and configuring Visual Studio to install and debug the binary to see where it crashes. RE: I can compile it, but it crashes... - MulleDK19 - 05-14-2010 (05-14-2010, 08:21 PM)Urkle Wrote: I've removed the TaskKeyHook stuff as it wasn't even being used anymore. It crashes before it reaches int hplMain(const tString& asCommandLine) I placed a Sleep(10000); and it still crashes instantly. Edit: I just compiled a debugging executable. It's failing in OAL_LoggerObject.cpp In function Code: wstring BuildLogFilename ( const string& asFilename ) RE: I can compile it, but it crashes... - Urkle - 05-14-2010 OK.. That's odd.. Step through that function and see what is returning bad data. I've personally only tested the non-windows branch of that function.. RE: I can compile it, but it crashes... - Thomas - 05-14-2010 Might also be that the OALWrapper is not compiled correctly or something like that and that the function it tries to access does not exist. Add all OALWrapper cpp files to the HPL1 project and build it that way (in case you are not already doing so). Otherwise just do what Urkle said and try and nail it down. Might also wanna just do a sepperate project where u only try and run the OALWrapper. RE: I can compile it, but it crashes... - MulleDK19 - 05-15-2010 (05-14-2010, 09:13 PM)Thomas Wrote: Add all OALWrapper cpp files to the HPL1 project and build it that way (in case you are not already doing so). Still the same. hmm... I'll make a small video. Edit: Nevermind... I included it in a copy project I then deleted... lol... It seems to work now... at least it executes code it didn't before. Well, at least it launched... I got a black screen... Then a mouse, then a "LOADING" text, and then a crash. Here's the log: Quote:-------- THE HPL ENGINE LOG ------------ Window's crash report: Quote:Problem signature: Edit: I've been trying to nail it down. It's apparently somewhere in Code: bool cInit::Init(tString asCommandLine) Code: mpPlayer = hplNew( cPlayer,(this) ); Code: cString::FloatStringToArray(&vRawData[0],pVecText->Value(),lSize * 3); When I try to step over that line, I get this: Quote:Microsoft Visual Studio C Runtime Library has detected a fatal error in Penumbra.exe. After some testing... It seems any reference to vRawData is causing the error. hmm... Hmm... I fixed it by uncommenting the code just above instead... I guess that was the original code, which was then swapped with a more optimal solution? Yup... At least I got to the main menu... I'm gonna do some testings... Anyone got a way to fix it, so I don't have to use unoptimized code? Edit: And crashes while loading a level Edit: All fixed now Edit: Now it crashed... Mid-game Hmm... My build is pretty unstable, lol. I better find a way to fix the FloatStringToArray(); 'cause the lighting in my build is very poor, and it crashes randomly. My compilations must be really bad... The random crashes I get is from Code: void iPhysicsWorld::DestroyBody(iPhysicsBody* apBody) On this line (159): Code: for(; it != mlstBodies.end(); ++it) RE: I can compile it, but it crashes... - Urkle - 05-16-2010 ahh yes.. the iterators.... Those have been a royal pain in the posterior. The issue is MS does their "own" implementation of them that doesn't follow the standard that everyone else follows when it comes to how erase() works. However, for this specific issue that's not the problem.. It just seems the iteration is done incorrectly. as it = mlstBodies.erase(it); increments it so it is being double incremented (and can skip entries).. this is a bug.. I'll make a fix and push it up. And it looks like the only place that has that issue.. Good http://github.com/FrictionalGames/HPL1Engine/commit/d64c516dbed39f006042b20509d01e3470adfaee RE: I can compile it, but it crashes... - MulleDK19 - 05-16-2010 (05-16-2010, 04:34 PM)Urkle Wrote: ahh yes.. the iterators.... Those have been a royal pain in the posterior. The issue is MS does their "own" implementation of them that doesn't follow the standard that everyone else follows when it comes to how erase() works. Now I get a read access violation on line 161: Code: void iPhysicsWorld::DestroyBody(iPhysicsBody* apBody) |