This shouldnt happen: glFoo
by Mark Storer · in Torque Game Engine · 09/01/2005 (9:54 am) · 7 replies
I've managed to screw up my game pretty badly.
I don't even remember what I was working on last, but when I went to start some tinkering this morning before work, I couldn't get past the initial "black window" dialog (on XP, BTW). I wait a bit, but to no avail.
Checking the log, I see several dozen "This shouldn't happen: glFoo\n... glBar... glBaz..." you get the idea.
Searching the source for "This shouldn't happen", I can't seem to find the .cc or .cs responsible for the errors.
"Humph. Okay, time to check GG", I say to myself. M yself said: "Good thinkin'!" ,so it's off to the invaluable site search page, looking for "This shouldn't happen". Sure enough, I get several results. Yay.
But none of them seem relevant. Boo. One person is talking about importing diffs with two many brushes, another is talking about bad drivers. No joy there.
Busted! Next?
Okay, I tried swapping my modified version of the starter.fps for the original: Same problem.
I then thought to get a fresh copy of the source from GG.com and run a diff tool to see what I'd fubarred. My initial pass didn't turn up anything obvious.
Idea 1: Replace my .exe with the one that came with the SDK installation, try that. If it fails, its my script outside of the starter.fps tree.
Idea 2: If its my exe, I can swap out source files, one patch at a time (I've got the AIVehicle and enhanced telnet debugger) until it works again.
Very strange.
Can anyone here give me some idea of What Is Broken (and where that "This shouldn't happen" thing is being generated)? Any help would be appreciated.
I don't even remember what I was working on last, but when I went to start some tinkering this morning before work, I couldn't get past the initial "black window" dialog (on XP, BTW). I wait a bit, but to no avail.
Checking the log, I see several dozen "This shouldn't happen: glFoo\n... glBar... glBaz..." you get the idea.
Searching the source for "This shouldn't happen", I can't seem to find the .cc or .cs responsible for the errors.
"Humph. Okay, time to check GG", I say to myself. M yself said: "Good thinkin'!" ,so it's off to the invaluable site search page, looking for "This shouldn't happen". Sure enough, I get several results. Yay.
But none of them seem relevant. Boo. One person is talking about importing diffs with two many brushes, another is talking about bad drivers. No joy there.
Busted! Next?
Okay, I tried swapping my modified version of the starter.fps for the original: Same problem.
I then thought to get a fresh copy of the source from GG.com and run a diff tool to see what I'd fubarred. My initial pass didn't turn up anything obvious.
Idea 1: Replace my .exe with the one that came with the SDK installation, try that. If it fails, its my script outside of the starter.fps tree.
Idea 2: If its my exe, I can swap out source files, one patch at a time (I've got the AIVehicle and enhanced telnet debugger) until it works again.
Very strange.
Can anyone here give me some idea of What Is Broken (and where that "This shouldn't happen" thing is being generated)? Any help would be appreciated.
About the author
#2
09/01/2005 (10:23 am)
Means it's not binding the named OpenGL functions to anything. 1.4 has a more meaningful error message. :) Is it for a specific range of GL calls?
#3
It starts with "glGenTexture" and goes on for 30 or 40 lines, IIRC. I'm at work just now, so don't have the log file handy.
09/01/2005 (12:48 pm)
@Stefan: OpenGL, strictly default rendering thus far. Not likely to change any time soon either.It starts with "glGenTexture" and goes on for 30 or 40 lines, IIRC. I'm at work just now, so don't have the log file handy.
#4
You will get this error if one of two things or both happen:
1) Not setting the canvas (look to make sure your calling initCanvas)
2) Trashed your GUI Profiles (make sure you dont have an error in defaultProfiles.cs)
09/01/2005 (7:30 pm)
Actually,You will get this error if one of two things or both happen:
1) Not setting the canvas (look to make sure your calling initCanvas)
2) Trashed your GUI Profiles (make sure you dont have an error in defaultProfiles.cs)
#5
09/02/2005 (9:04 am)
99% of the time this error is caused by having the wrong drivers.
#6
I DL'd and installed a stock version of the SDK. That demo .exe ran just fine in its own directory.
Swapping out my .exe for the stock one running all my script didn't help... same spew of GL-related errors. It must be some GUI thing. I do recall monkeying about with the canvas a bit (trying without success to get a cursor to appear and disappear without adding any gui elements to the FPS screen). It's entirely possible that I removed a line that Should Be There (like a call to initCanvas()). Knowing what to look for will make it much easier to pour through my windiff output. Thanks.
Thanks for the heads up.
@Ben: It looks like there are at least two different things that can set off this spew of GL-related errors. You mentioned that the error message was going to be more informative... will it be able to differentiate between a "malformed" canvas and bad drivers?
The good news: I don't really have anything in my script directories that I'm attached to. I'll just replace everything (AND GET CVS UP AND RUNNING) tonight or on saturday.
Thanks everyone. I really appreciate the help.
09/02/2005 (10:36 am)
I did a little more prodding last night. It's defintely not the drivers or my .EXE.I DL'd and installed a stock version of the SDK. That demo .exe ran just fine in its own directory.
Swapping out my .exe for the stock one running all my script didn't help... same spew of GL-related errors. It must be some GUI thing. I do recall monkeying about with the canvas a bit (trying without success to get a cursor to appear and disappear without adding any gui elements to the FPS screen). It's entirely possible that I removed a line that Should Be There (like a call to initCanvas()). Knowing what to look for will make it much easier to pour through my windiff output. Thanks.
Thanks for the heads up.
@Ben: It looks like there are at least two different things that can set off this spew of GL-related errors. You mentioned that the error message was going to be more informative... will it be able to differentiate between a "malformed" canvas and bad drivers?
The good news: I don't really have anything in my script directories that I'm attached to. I'll just replace everything (AND GET CVS UP AND RUNNING) tonight or on saturday.
Thanks everyone. I really appreciate the help.
#7
09/02/2005 (5:29 pm)
If it's only happening for a few calls, and not EVERY CALL then it means that something is calling GL before its initialized. Dunno what that might be, setting some breakpoints might be good. It also means it's not a big deal, if things work in general and it doesn't recur in the same run.
Torque Owner Stefan Lundmark