So, I was happily coding along one day, minding my own business, when WHAM, my changing vector3df(0,1,0) to vector3df(0,-100,0) for the gravity vector of my camera animator suddenly caused this error:
Unhandled exception at 0x0040110f in future fps.exe: 0xC0000005: Access violation reading location 0x00000000.
I was really iritated by this and was running my previously working .exe file wondering why the project would compile but not run. Then I realized it.... when I was running what I thought was the previous version of my .exe file, I was actually running the .exe I had just created and the very same one that failed to run while debuggin in Microsoft Visual C ++. The program would run just fine with no errors when I run it external to the Visual C++ enviroment...
I would really like to fix this problem so I dont have to run the program externally every time I recompile it, but if there is no answer, I will survive. I will post a copy of my entire project as soon as I upload it.
--peace
Cup Of Tea
P.S.I had this happen once before, which resulted in my dropping the project and moving on. Both projects use a .bsp mesh for the level, so my hypothosis is that it has something to do with loading .bsp meshes, especially since in the command line window when running from debug in Microsoft Visual C++ it said after the error came up, could not load mesh... testlevel.bsp
Microsoft Visual C++ Express FREAKING OUT!
-
- Posts: 8
- Joined: Thu Aug 03, 2006 5:45 am
-
- Posts: 8
- Joined: Thu Aug 03, 2006 5:45 am
Im modifying the directory for the resources so that they are loading from the correct places, but it comes up with an error when loading the level mesh. I can run the program from outside Visual C++ so my filepaths for the models and textures are fine. I just today wrote the specialFX tutorial (thats what Im doing to teach myself Irrlicht... writing the examples out in my own project instead of copy and pasting it) and it came up with a similar error:
Unhandled exception at 0x00402c77 in SpecialFX.exe: 0xC0000005: Access violation reading location 0x00000000.
this time it stopped right before loading the room.3ds file. So its not the .bsp file neccesarily... again it runs fine outside Visual C++. Here is the actually console error, word for word:
Could not load mesh, because file could not be opened.: ./media/room.3ds
Unhandled exception at 0x00402c77 in SpecialFX.exe: 0xC0000005: Access violation reading location 0x00000000.
this time it stopped right before loading the room.3ds file. So its not the .bsp file neccesarily... again it runs fine outside Visual C++. Here is the actually console error, word for word:
Could not load mesh, because file could not be opened.: ./media/room.3ds
--peace
Cup Of Tea
Cup Of Tea
-
- Posts: 224
- Joined: Tue Oct 25, 2005 4:32 pm
- Location: Louisiana, USA, backwater country
- Contact:
do you have an if statement to check whether or not your pointer to the new scene node is valid? this has happened to me, when a mesh fails to load, and no safeguard is put on following uses of it, like texture application or position setting.
the easiest way to protect against this is always making sure to
the easiest way to protect against this is always making sure to
Code: Select all
if(node)
{
...do stuff...
}
When banks compete, you win.
When ISPs compete, you win.
When electronics retailers compete, you win.
When governments compete...you get drafted.
When ISPs compete, you win.
When electronics retailers compete, you win.
When governments compete...you get drafted.
-
- Posts: 78
- Joined: Sat May 27, 2006 9:24 pm
- Location: Logan, UT
Yeah, your bsp node is returning a NULL pointer because it couldn't load, but you're still attempting to use it. You don't need to look at your code so much, besides a null pointer check, but as to where your bsp is. You're not giving Irrlicht the right path & filename to load the bsp from, plain and simple.
rooly showed you a simple way of checking the nodes validity, use it. And triple check your bsps path.
If you have doubts then please post your code and the full paths to your .exe and your .bsp.
rooly showed you a simple way of checking the nodes validity, use it. And triple check your bsps path.
If you have doubts then please post your code and the full paths to your .exe and your .bsp.
Stout Beer