From owner-freebsd-x11@FreeBSD.ORG Thu Apr 30 11:58:33 2009 Return-Path: Delivered-To: x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DC2C10656B1 for ; Thu, 30 Apr 2009 11:58:33 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id B67328FC1B for ; Thu, 30 Apr 2009 11:58:32 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by ewy19 with SMTP id 19so1775751ewy.43 for ; Thu, 30 Apr 2009 04:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=XbqMY051WDMM/pputhBpxowl6KAuS3oT9F8uXo3vx8c=; b=g2a9oL2NRYCTcQr9uL//S6zNIIpzbdF3j0CLyWhRt7JNfdrSzPETH/p9A08vzFDDHw o0CC+XEL5OANVDj3fdB8IR1XMoblRUaQUsK1o8EX4h7QVghAzTzYOUCevVNGFnzMFD7s oUmRmDhysk6zByWgrdLKjqWKFE+1PgrACrQb8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=DChspoBYEoPeEpG5+7xm7JI163lyCKQFy4ZL3MCvFTR1icQbaW4XbqcY3c0NFy9O48 43acgAogNHikHmAOhGWuWUI5Q9nnJm8eT/DYK/wL86OyDDxRRcA+84L2kbGfRY9YKnce cp1YlJyv52Knhnqkhc8XhU65HScqENSEXheTY= Received: by 10.216.7.207 with SMTP id 57mr456580wep.104.1241092711639; Thu, 30 Apr 2009 04:58:31 -0700 (PDT) Received: from ?192.168.1.66? (87-194-39-182.bethere.co.uk [87.194.39.182]) by mx.google.com with ESMTPS id u14sm5418485gvf.17.2009.04.30.04.58.30 (version=SSLv3 cipher=RC4-MD5); Thu, 30 Apr 2009 04:58:31 -0700 (PDT) From: Tom Evans To: Oliver Lehmann 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> Content-Type: text/plain Date: Thu, 30 Apr 2009 12:57:52 +0100 Message-Id: <1241092672.3294.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: x11@freebsd.org Subject: Re: Problem with OpenGL and ATI HD3850 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 11:58:34 -0000 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