Date: Thu, 30 Apr 2009 12:57:52 +0100 From: Tom Evans <tevans.uk@googlemail.com> To: Oliver Lehmann <lehmann@ans-netz.de> Cc: x11@freebsd.org Subject: Re: Problem with OpenGL and ATI HD3850 Message-ID: <1241092672.3294.6.camel@localhost> In-Reply-To: <20090430063454.969303d0.lehmann@ans-netz.de> References: <20090429164113.f0b48048.lehmann@ans-netz.de> <20090429163843.GB370@slackbox.xs4all.nl> <18936.36210.823588.838523@gromit.timing.com> <20090430063454.969303d0.lehmann@ans-netz.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1241092672.3294.6.camel>
