Hi Robert,

Thank you for your reply.  It was supposed to be "arguments.", just a
typo.

I did finally get the viewer to run and it was indeed caused by
mixed OSG lib/dll's running with our software and dependencies.
Basically, rebuilding osg1.2 from source on the vista machine and
linking with all components also "freshly" built in the same environment
made the exceptions like the one described stop completely.

Thanks,
-Matt


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Friday, October 24, 2008 1:22 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg::ApplicationUsage::setDescription()
causesexception 0xC0000005 on Vista

Hi Matt,

I presume you use "arguments." rather than "arguments->" in your code
as the code in your email won't compile and if it somehow did then the
compiler is totally screwed... and the case of the problem.

With the assumption that this is just a typo, the crash is very odd
indeed.  The code is all pretty straight forward.  The
arguments.getApplicationUsage() should return the
ApplicationUsage::instance(), that is attached in the ArgumentParser
constructor.  This has never been reported as an issue before, but
perhaps some how on your system the instance() function is working.

It's worth noting that osg::ApplicationUsage and osg::ArgumentParser
have changed little since 1.2, and the usage example you provide is
similar to the standard OSG examples so is something that is compiled
and run very often by many hundreds of developers working under Vista
without problem.

Given this, I'd guess that the problem is down to issues at your end,
perhaps a problem with mixed OSG lib/dll's, or not setting the correct
options in VS such as mulit-threaded dll's etc.

Robert.



On Thu, Oct 23, 2008 at 6:53 PM, Matt McPheeters
<[EMAIL PROTECTED]> wrote:
> Greetings,
>
>
>
> Hopefully someone else has already experienced this and has a fix:
>
>
>
> We have a command-line viewer program that runs perfectly fine on XP
but
> crashes almost immediately in main() on a Vista build.
>
>
>
> Here is the offending code:
>
>
>
> int main( int argc, char **argv )
>
> {
>
>    osg::setNotifyLevel( osg::WARN );
>
>
>
>    osg::ArgumentParser arguments( &argc, argv );
>
>
>
>    arguments->setApplicationName( arguments.getApplicationName() );
>
>    arguments->getApplicationUsage()->setDescription(
> arguments.getApplication() + " is the standard..." );    // This is
the line
> that causes the exception.
>
>  }
>
>
>
>
>
> This program is using OSG version 1.2.  All of the OSG examples run
fine.
>
>
>
> In the autos window of Visual Studio 2005 (has already been updated
with
> Vista-related Service Packs) the local variable <arguments> contains
good
> data.  If
>
> I declare an instance of osg::ApplicationUsage * and set it equal to
> arguments.getApplicationUsage() instead of using it "inline" it also
points
> to valid
>
> data, except that its _description member variable is equal to the
empty
> string because this is where the program crashes.
>
>
>
> Also, when the crash occurs, the call stack is in ntdll.dll but there
is a
> message that reads [Frames below may be incorrect and/or missing, no
symbols
>
> loaded for ntdll.dll].
>
>
>
> None of this may be relevant, but when you don't know what you are
missing
> every clue might help.  The answer may be as simple as a preprocessor
> directive
>
> but I have searched to no avail.
>
>
>
> Thanks.
>
> -Matt
>
> _______________________________________________
> osg-users mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to