Problem with OpenGL and ATI HD3850
Tom Evans
tevans.uk at googlemail.com
Thu Apr 30 11:58:34 UTC 2009
On Thu, 2009-04-30 at 06:34 +0200, Oliver Lehmann wrote:
> John Hein wrote:
>
> > Try printing to stderr instead of stdout (or set stdio to be
> > unbuffered with setvbuf(3)) - you may be getting farther than you
> > think and are getting bitten by stdio buffering.
> >
> > Also is this threaded?
>
> Tested it:
>
> void GLSupport::initialiseExtensions(void)
> {
> // Set version string
> const GLubyte* pcVer = glGetString(GL_VERSION);
> fprintf(stderr,"100\n");
>
> assert(pcVer && "Problems getting GL version string using glGetString");
> fprintf(stderr,"101\n");
> String tmpStr = (const char*)pcVer;
This string object ...
> fprintf(stderr,"102\n");
> LogManager::getSingleton().logMessage("GL_VERSION = " + tmpStr);
> fprintf(stderr,"103\n");
> mVersion = tmpStr.substr(0, tmpStr.find(" "));
> fprintf(stderr,"104\n");
>
> olivleh1 at kartoffel olivleh1> freeorion
> unknown chip id 0x9515, can't guess.
> 100
> 101
> main() caught exception(std::exception): basic_string::_S_construct NULL not valid
... isn't this string object (unless they have typedef'ed std::string
String). Is it possible there is a String constructor elsewhere doing
something different with pcVer, which then leads to trying to construct
a std::string with a NULL?
>
> It looks like it is threaded but I'm not sure.
>
> (gdb) file /usr/local/bin/freeorion
> Reading symbols from /usr/local/bin/freeorion...done.
> (gdb) run
> Starting program: /usr/local/bin/freeorion
> [New LWP 100138]
> [New Thread 0x8062020b0 (LWP 100138)]
> unknown chip id 0x9515, can't guess.
> 100
> 101
> main() caught exception(std::exception): basic_string::_S_construct NULL not valid
>
> Program exited normally.
> (gdb)
>
>
> How can I output whatever glGetString returns?
>
fprint(stderr, "%x %s\n", pcVer, pcVer);
put it right after your 101 printf.
Cheers
Tom
More information about the freebsd-x11
mailing list