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
|
RE: I can compile it, but it crashes... - Urkle - 05-16-2010 Hmmm. I'll have to look more at is one. Or just add a breakpoint and walk through it to see what is going on.. RE: I can compile it, but it crashes... - MulleDK19 - 05-17-2010 (05-16-2010, 09:36 PM)Urkle Wrote: Hmmm. I'll have to look more at is one. Or just add a breakpoint and walk through it to see what is going on.. Ya, I tried that... I have no idea what's going on. Edit: I fixed it by adding a break; when it has removed the body it was looking for. Perhaps the exception is due to the list being changed, while iterating (due to the erase()). At least it works now. Anyhow, shouldn't there really be a break;? From what I can figure, DestroyBody() removes one body, right? So after finding it, there's no need to iterate the rest? After getting off the boat and down through the hatch, I get another violation xD C:\Programmer\Microsoft Visual Studio 9.0\VC\crt\src\dbghook.c:65 Call-stack: Quote:> msvcr90.dll!_crt_debugger_hook(int _Reserved=5) Line 65 C RE: I can compile it, but it crashes... - Urkle - 05-17-2010 actually. what I meant by "break" was a breakpoint for debugging, not a break statement :-D another option would be to rewrite the function like this.. Code: void iPhysicsWorld::DestroyBody(iPhysicsBody* apBody) As for your other crash. Just stick a breakpoint (usually by clicking off on the left margin of the source editor) and run the game from VS, and step through to figure out where the NULL value is coming from. RE: I can compile it, but it crashes... - MulleDK19 - 05-17-2010 (05-17-2010, 02:20 PM)Urkle Wrote: actually. what I meant by "break" was a breakpoint for debugging, not a break statement :-D Ya, I know what you meant xD That's what I did, but I couldn't figure the problem. But a break after it removes the body fixed the crash when removing bodies. Edit: The new crash happens on line 2362 in MeshLoaderCollada: Code: while(apNode->msName[lStartChar+4+lDigits] != '_' && apNode->msName[7+lDigits] != 0) lDigits++; RE: I can compile it, but it crashes... - Urkle - 05-17-2010 I would check what apNode is.. make sure it's not NULL. if it is, then trace back to where apNode was created and see why it failed to be created. RE: I can compile it, but it crashes... - MulleDK19 - 05-17-2010 (05-17-2010, 02:45 PM)Urkle Wrote: I would check what apNode is.. make sure it's not NULL. if it is, then trace back to where apNode was created and see why it failed to be created. Seems it's never null... RE: I can compile it, but it crashes... - nckomodo - 05-22-2010 (05-17-2010, 02:20 PM)Urkle Wrote: actually. what I meant by "break" was a breakpoint for debugging, not a break statement :-DHello, I had this same problem and modified the function as exampled, however I ran into another crash which appears to be caused by trying to delete the same body twice I'm not entirely sure if the body was in the list twice or if the iteration failed to step to the next item(which would mean the item is still in the list) (the VS debugger isnt being much help in this regard). At any rate I stuck a break statement in and it seems to be working fine now, I am however concerned that this could cause a memory leak. Any suggestions for a more proper fix or is it something I don't need to worry about? (I'm fairly new to C++ but not programming in general, so I'm just hacking away at the code seeing what I can learn) (quick side note: I made the beef jerky poisoned!) RE: I can compile it, but it crashes... - ricky - 05-23-2010 Hullo, I have got the damn thing to build and run in debug mode. There were a few instances of using reserve instead of resize when the elements were then going to be edited (instead of .push_back) and there were some other strange issues. I can't remember how I fixed them, but you can view the changes on my github pages: http://www.github.com/ricky26/HPL1Engine http://www.github.com/ricky26/PenumbraOverture RE: I can compile it, but it crashes... - MulleDK19 - 05-25-2010 (05-23-2010, 01:12 PM)ricky Wrote: Hullo, I get tons of unresolved externals from your PenumbraOverture source. Quote:Error 1 error LNK2001: unresolved external symbol "public: void __thiscall hpl::cInput::AddAction(class hpl::iAction *)" (?AddAction@cInput@hpl@@QAEXPAViAction@2@@Z) ButtonHandler.obj PenumbraLots more, but this forum treats my quote as more than 5 images... eh..? RE: I can compile it, but it crashes... - gameengineer - 06-09-2010 Anybody get this compiler error? Quote:fatal error C1007: unrecognized flag '-typedil' in 'p2' Converted the projects to VS 2005. Had to create a VS project for OALWrapper but it does compile in both debug and release configurations. HPL and OALWrapper projects finish compiling all sources successfully. The web doesn't have any useful answers yet. EDIT: Ok I figured it out. This is the problem you have when you have 3 Visual Studio compilers installed side by side. I compiled HPL and Prenumbra using VS 2005 projects but I created the OALWrapper using VS 2008. There was a conflict in cl.exe versions being called. Not a clue how the static library for OAWrapper can dictate which cl.exe gets invoked... I just created a new project in VS2005 for OALWrapper and all is well. Prenumbra did finally compile and link but I haven't run it yet. Doing that now... Steve |