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 

simple osgOcean code crushed


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgOcean [osgOcean]
View previous topic :: View next topic  
Author Message
markyang
Newbie


Joined: 01 Aug 2012
Posts: 6

PostPosted: Fri Aug 31, 2012 2:15 pm    Post subject:
simple osgOcean code crushed
Reply with quote

Hi,

I have received some existing code that uses osgOcean.
it has the following code segment:
Code:
osg::ref_ptr<osgOcean::FFTOceanSurface> oceanSurface = new osgOcean::FFTOceanSurface(64, 256, 64, osg::Vec2f(1.1f,1.1f), 12.0f, 1000.0f, 0.8f, 1e-8, true, 2.5, 10.f, 256 );
oceanSurface->setWaveTopColor(osg::Vec3f( 0.6, 0.7, 0.7));

osg::ref_ptr<osgOcean::OceanScene> oceanScene = new osgOcean::OceanScene(oceanSurface.get());
osg::ref_ptr<osg::Node> scenetest = osgDB::readNodeFile("cessna.osg");
oceanScene->addChild(scenetest);

It will crush in the call "addChild()" with the error: "unhandled exception at 0x.... in ...exe: 0xc000005: access violationg reading location 0xfffffffffffff. Bascially, I can't add any child node to oceneScene.

Is there something missed in my code?

I am able to compile and run the osgsample program. But it was unable to find some of the ive files.

I am new to OSG. any help is greatly appreciated.


Thank you!

Cheers,
Ruigang
Back to top
View user's profile Send private message
kcbale
User


Joined: 04 Mar 2011
Posts: 68

PostPosted: Fri Aug 31, 2012 2:35 pm    Post subject:
simple osgOcean code crushed
Reply with quote

Hi  Ruigang,

Are you sure you haven't got a DLL mismatch? It can often cause strange behaviour such as this.


I haven't experienced this problem at all with osgOcean.


Regards,


Kim.

On 31 August 2012 15:15, Ruigang Yang < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi,

I have received some existing code that uses osgOcean.
it has the following code segment:

Code:
osg::ref_ptr<osgOcean::FFTOceanSurface> oceanSurface = new osgOcean::FFTOceanSurface(64, 256, 64, osg::Vec2f(1.1f,1.1f), 12.0f, 1000.0f, 0.8f, 1e-8, true, 2.5, 10.f, 256 );
oceanSurface->setWaveTopColor(osg::Vec3f( 0.6, 0.7, 0.7));

osg::ref_ptr<osgOcean::OceanScene> oceanScene = new osgOcean::OceanScene(oceanSurface.get());
osg::ref_ptr<osg::Node> scenetest = osgDB::readNodeFile("cessna.osg");
oceanScene->addChild(scenetest);


It will crush in the call "addChild()" with the error: "unhandled exception at 0x.... in ...exe: 0xc000005: access violationg reading location 0xfffffffffffff. Bascially, I can't add any child node to oceneScene.

Is there something missed in my code?

I am able to compile and run the osgsample program. But it was unable to find some of the ive files.

I am new to OSG. any help is greatly appreciated.


Thank you!

Cheers,
Ruigang

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49707#49707





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
markyang
Newbie


Joined: 01 Aug 2012
Posts: 6

PostPosted: Fri Aug 31, 2012 5:31 pm    Post subject:
Reply with quote

Hi, Kim,
thank you for the quick reply. I suspect the DLL mismatch issue.
So I copied the ocean example progrma with the dll together. it runs fine.
then I copied that dll to my current project. Then I will have that crush issue.
I even tried to rename that dll to make sure that the program is indeed using the dll I put in there. that is also positive: my program immediately complained about missing dlls.

So what else can I check? do I need to put the fftss dll somewhere?
I only compiled a 64bit release version of the dll too. Do I need to compile a debug version since I am running debug mode?




Thank you!

Cheers,
Ruigang
Back to top
View user's profile Send private message
kcbale
User


Joined: 04 Mar 2011
Posts: 68

PostPosted: Sat Sep 01, 2012 3:40 pm    Post subject:
simple osgOcean code crushed
Reply with quote

Hi Ruigang,

It's quite hard to diagnose the issues you're having from the description. However, if you are programming with Visual Studio or in windows you will need to have the appropriate version of the DLL (Debug/Release) to match the build type that the program was built with. I.e. Debug program build with the debug osgocean dll. This is also the same for 64/32 bit builds, you can't mix them.


FFTSS is a static lib so you shouldn't need to copy a DLL.


I haven't tried to compile osgocean and it's dependencies as 64bit though. I'm not sure if fftss supports 64bit archs.


Sorry I can't be of more help.


K.


On 31 August 2012 18:31, Ruigang Yang < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi, Kim,
thank you for the quick reply. I suspect the DLL mismatch issue.
So I copied the ocean example progrma with the dll together. it runs fine.
then I copied that dll to my current project. Then I will have that crush issue.
I even tried to rename that dll to make sure that the program is indeed using the dll I put in there.  that is also positive: my program immediately complained about missing dlls.

So what else can I check? do I need to put the fftss dll somewhere?
I only compiled a 64bit release version of the dll too. Do I need to compile a debug version since I am running debug mode?




Thank you!

Cheers,
Ruigang

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=49711#49711





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgOcean [osgOcean] 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 How best to provide C++ code examples... pugdogfan General [forum] 0 Thu Jan 19, 2017 8:26 am View latest post
No new posts code for merging tri strips in a cach... cbuchner1 General 0 Tue Jan 03, 2017 12:35 pm View latest post
No new posts Tearing hair out over simple GLSL ins... loopy General 7 Thu Dec 22, 2016 5:17 pm View latest post
No new posts How to merge osgocean and osgearth Rambabu General 2 Wed Dec 07, 2016 12:43 pm View latest post
No new posts OsgOcean Rambabu General 1 Mon Nov 28, 2016 11:00 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