Game Development Community

Kernel32.dll... And the Pain it Brings...

by Don Cravey · in General Discussion · 04/11/2006 (1:24 pm) · 10 replies

I'm typing this post with the understanding that it will probably be moved to some other forum. Whatever that forum is, I don't know. If I did know, I'd post it there, thus preventing the post from being moved... unless it was originally supposed to be here. Then it would be moved here, in which case, I did the right thing... I think.

Anywho, it's been a while since I've done anything with torque. But, in the time I've spent working on it, I've only had one problem in this game that I could never fix, and I still can't fix it. This game tends to crash on a frequent basis, always bringing up the error message "Torque.EXE has caused an error in Kernel32.DLL. Torque.EXE will now close." Naturally, this wouldn't be such a big deal if that was the only problem with this. But, apparently after I get that error message, I can't run the game again until I reboot the PC. If I try, the game runs slower than a turtle... actually, my turtle can move pretty fast, so I wouldn't know.

Whenever this error comes up, either a player has died or a vehicle crashed into a wall or the terrain (my vehicles are deleted in the onImpact function). And, in a game, that's very, very bad. Everyone who plays my game is afraid to shoot at anyone. I've looked over the functions and datablocks linked to the vehicles and characters in the game. It can't have anything to do with particles or death animations, because I got rid of the player's death animations, and I scripted a makeshift sky-writer with contrail particles that don't die off. Even with that, you have to do a lot of flying around before the game will even slow down. It's not the weapons either. It happens regardless of how the player dies.

I also want to make it clear that I have run several other games on this PC.... Alien Arena, DarkSpace, Heavy Gear 2, Tribes, etc. I never had this error with those games.... not once. There was only one other game on which I had this error... Doom 2. I worked on a map for that game. I would get that error whenever I went to the north end of the map. It took me a year before I realized that all of the walls in the rooms beyond the north door had texture scrolling enabled.

As frustrating as this may be, if I just had the answer as to why this is happening, I'd be content. If it was a problem in the scripts, I'd know I could fix it. If it is a problem with my PC or the OS, I'd know there wasn't anything wrong with the game. But, not knowing what it is gets on my nerves.

If anyone can help me with this, I would really appreciate it. In any case, thanks for at least taking the time to read this post.

#1
04/11/2006 (1:50 pm)
My suggestion would be UNICODE
:)
somewhere in there perhaps is your problem.
I dont know what else in the engine would reference the Kernel32.dll...

why not remove the link reference to the library and you can track who is using it via your new link errors.

then perhaps that might shed some light on what code is failing.

just my 2cents.
#2
04/11/2006 (2:31 pm)
As much as I hate to admit it, I don't have the actual source. >.< Due to current circumstances and recent problems I've had this past year, I haven't had the opportunity to purchase the license/source of the TGE. So, until I do so, I'm working on the rest of the game, like GUI's, weapons, etc. But, considering this, it doesn't seem like it would be a problem with the actual C source or library files unless there was actually a problem with the original Torque engine. And, heh, I doubt there's any C++ errors with the original TGE.

Thanks anyways, though.
#3
04/11/2006 (2:46 pm)
Lol,
doubt there are any errors in the TGE?
heheheheh..
funny stuff.
they day I see a project That large with no bugs/problems/undocumented features..
is the day I die I think....

well no source you are SOL my friend :)

and this is with the stock demo?
or what?
#4
04/11/2006 (4:15 pm)
You using windows 98 or something?
#5
04/11/2006 (4:37 pm)
Windows ME. Worst OS to ever hit the market. The disc makes a good claypigeon though.

I don't know what SOL means, but I'm too lazy to look it up.
#6
04/11/2006 (4:39 pm)
Windows ME. Worst OS to ever hit the market. The disc makes a good claypigeon though.

I don't know what SOL means, but I'm too lazy to look it up.
#7
04/11/2006 (5:30 pm)
SOL = Shit Out Of Luck
#8
04/16/2006 (9:35 am)
The fact that it's kernel32 doesn't say anything, it's just how Windows ME decides to show the message. Try to load up the game on another PC with Windows XP (or send it to me and I'll test) and see if it crashes there, it probably does.

And if it does, just go back to where you started and add a little bit of code until it breaks, then go back and check what it was.
#9
04/17/2006 (8:24 am)
"The fact that it's kernel32 doesn't say anything, it's just how Windows ME decides to show the message."

Yep, you're right... I figured that out just recently when the errors started saying that the game caused an error in OpenAL or the game itself. Now I'm sure it's not my processor... I mean, if it was, why would I be able to run Tribes 2? Doesn't make much sense.

Also, I remember that this isn't the original Torque setup. It's BP, by Game Beavers... err, it was anyways (kinda mutilated it beyond recognition since then). I downloaded it about a year ago because I heard it had scripts for flying vehicles.

A friend and I are about to test run it soon and see what we can figure out. He has a PC that's much better than mine. Once the game crashes on his PC running through the same events, we can rule out PC performance.

I've been looking over all the facts since I posted this. Here's what I know so far. The game crashes whenever a player dies, a vehicle the player is controlling is destroyed, or someone brings up the Options menu in-game. After it crashes, processor usage (when no games or programs are up) shoots up from 10% to anywhere between 50% and 75%. So, when I run any 3-dimensional program after that, whether it be a game or Blender, it stalls and skips.

So, it's not the PC that's causing the problem. It's just being adversely affected by whatever is going on with the game.

Here's what I think it is, and I'm probably wrong because I usually am. Each of these events that trigger the crash has at least one thing in common: they all affect player control and bindings. I think these errors are a result of the game not being able to effectively assign control of anything to the player. But, that's all I've really got it narrowed down to. Like I said, a friend and I are going to run several tests on the game and see what we come up with. If we can just fix this problem, everything else is set, except of course, owning the license. But that'll work out soon, I'm sure. Until then, just gotta keep working on the rest of the game.

Thanks for all the help guys, really. If anyone can shed any more light on this, thanks in advance.
#10
04/18/2006 (12:27 pm)
Don,

I once again tell you to try out the normal TGE demo. If it works, then you know it's a problem with the GameBeavers build or the build you're using. This is standard procedure when something in TGE does not work and you've modified it.

You're also not clear, is this really a crash to desktop, or a freeze? Big difference.
Is this only with vehicles? If so, then it could be the famous infinite loop when you collide with something and the engine cannot resolve it's collisions or forces.