OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osg::ApplicationUsage::setDescription() causesex


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Matt McPheeters
Guest





PostPosted: Fri Oct 24, 2008 10:03 pm    Post subject:
osg::ApplicationUsage::setDescription() causesex
Reply with quote

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:
[mailto:] On Behalf Of Robert
Osfield
Sent: Friday, October 24, 2008 1:22 AM
To: OpenSceneGraph Users
Subject: Re: 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
<> wrote:
Quote:
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
Quote:
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
Quote:
that causes the exception.

}





This program is using OSG version 1.2. All of the OSG examples run
fine.
Quote:



In the autos window of Visual Studio 2005 (has already been updated
with
Quote:
Vista-related Service Packs) the local variable <arguments> contains
good
Quote:
data. If

I declare an instance of osg::ApplicationUsage * and set it equal to
arguments.getApplicationUsage() instead of using it "inline" it also
points
Quote:
to valid

data, except that its _description member variable is equal to the
empty
Quote:
string because this is where the program crashes.



Also, when the crash occurs, the call stack is in ntdll.dll but there
is a
Quote:
message that reads [Frames below may be incorrect and/or missing, no
symbols
Quote:

loaded for ntdll.dll].



None of this may be relevant, but when you don't know what you are
missing
Quote:
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


http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g

g


------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Sat Oct 25, 2008 11:36 am    Post subject:
osg::ApplicationUsage::setDescription() causesex
Reply with quote

Hi Matt,

On Fri, Oct 24, 2008 at 11:02 PM, Matt McPheeters
<> wrote:
Quote:
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.

With 2.x versions of the OSG we now version the .lib and .dll's so
that issues with incorrect linking is much less of an issue.

Robert.


------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Happy New Year to all OSG Users Chris Hanson General 0 Mon Jan 07, 2019 10:17 am View latest post
No new posts osg-users Digest, Vol 138, Issue 27 Zachary1234 General 0 Tue Jan 01, 2019 1:16 am View latest post
No new posts osg-users Digest, Vol 137, Issue 14 poweruserm@live.com.au General 0 Fri Nov 16, 2018 11:16 pm View latest post
No new posts General Users starting questions in O... A Z General 1 Mon Oct 15, 2018 3:59 am View latest post
No new posts osg-users Digest, Vol 136, Issue 8 jonasydy General 0 Wed Oct 10, 2018 12:40 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP