Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: [1] 2

Author Topic: more on the ogre3d plugin  (Read 9576 times)

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« on: September 02, 2005, 12:23:03 PM »

Well, I'm not sure if I should have posted in the created topic or created a new one.  I took a chance!  Hi pjcast, its your old  problematic plugin user from the ogre forums!  I like the way you have updated your website, it is very nice.

Sorry to come here with more problems :roll:

As it turns out, when I tested your CEGUI demo from the ogreaddons, I did get the demo to work in debug mode, but it crashes in release mode with an access violation (null pointer is what I'm guessing from reading all the posts in the ogre forum).  I started a new project with the sole purpose of seeing the video play and I posted my code on the ogre forum (should I post here too?).  I still get the same null pointer exception when running the application in release mode.  Runs just fine in debug mode.  

I learned that debug mode substitutes null pointers with data and release mode doesn't.  I wanted to see if I was doing everything right in terms of setting up the code.  I'm so burned out trying to figure out what is going on!

To recap, I'm using OgreSDK 1.0.4, VC++ 6 SP 6 and the latest from CVS as of earlier this week.  I appreciate so much your working with me to get the CEGUI demo to run.  I have triple checked my settings for my compiler and then checked them again!

The libraries I'm using (please let me know if I'm missing anything) are:
Code: [Select]
Release: OgreMain.lib OpenAL32.lib ALut.lib Plugin_TheoraVideoSystem.lib
Debug: OgreMain_d.lib OpenAL32.lib ALut.lib Plugin_TheoraVideoSystem.lib


Also my Tools->Options->Directories->Includes are listed in the following order
Code: [Select]
C:\STLPORT-4.6.2\stlport, C:\OgreSDK\Include,C:\OgreSDK\Dependencies,C:\Program Files\Microsoft Visual Studio\VC98\Include,C:\DXSDK\Include

In the same place, my libraries are in the following order
Code: [Select]
C:\STLPORT-4.6.2\Lib, C:\OgreSDK\Lib,C:\OgreSDK\Dependencies\Lib,C:\Program Files\Microsoft Visual Studio\VC98\Lib,C:\DXSDK\Lib,C:\Program Files\Microsoft Visual Studio\VC98\MFC\Lib

I just feel like I'm missing some detail since the error is happening across the board.  I really do appreciate all the help that you have provided!  You've gotten me so far with this!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #1 on: September 02, 2005, 04:05:15 PM »

Quote

Well, I'm not sure if I should have posted in the created topic or created a new one. I took a chance! Hi pjcast, its your old problematic plugin user from the ogre forums! I like the way you have updated your website, it is very nice.

Sorry to come here with more problems Rolling Eyes


Well, the update was forced upon me (my webserver -so they say- were hacked and lost all data/backups)... and I had no backups of my own... didn't have much too lose if the site went down. Now, though, I have some nice php scripts I made to backup the site's db and forum db. Which reminds me, I should do that this weekend. Yeah, I like the way this new site is looking though. Even though I still have some more customizing to do.

It could in fact be a problem with the plugin and null pointers... I will take a look at it tonite and tomorrow and try to see if I can find anything with my code, and the code you posted on the Ogre site. I think it is better to post here, as it seems not many users on the Ogre forums know much about the plugin anyway :) (well, Jacmoe has had some experience with it). And this way, a collection of posts/bugs will all be in one place.
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #2 on: September 02, 2005, 05:29:03 PM »

Quote from: "pjcast"


Well, the update was forced upon me (my webserver -so they say- were hacked and lost all data/backups)... and I had no backups of my own... didn't have much too lose if the site went down. Now, though, I have some nice php scripts I made to backup the site's db and forum db. Which reminds me, I should do that this weekend. Yeah, I like the way this new site is looking though. Even though I still have some more customizing to do.


Geez!  That sucks having your site hacked!  Dealing with a couple of servers at my job right now that are hacked.  You lost all your backups!  I would cry.  But I guess something good came out of it because your new site is very impressive, I have spent a lot of time just browsing it!  The forums look really cool too.  Can't wait until the rest of your fan base gets back posting!

Quote from: "pjcast"


It could in fact be a problem with the plugin and null pointers... I will take a look at it tonite and tomorrow and try to see if I can find anything with my code, and the code you posted on the Ogre site. I think it is better to post here, as it seems not many users on the Ogre forums know much about the plugin anyway :) (well, Jacmoe has had some experience with it). And this way, a collection of posts/bugs will all be in one place.


Yeah, I will start posting some of my more troublesome issues here.  I try to post some things there because I know how helpful it can be to others.  That is mostly why I posted my entire code.  I figured maybe someone can view it and use it too! But then, I'm also expecting users who have had success to respond... which doesn't happen to often!  :wink:

I really appreciate you taking the time to look at things.  I understand if you are busy getting your new site off the ground.  I will also try to look to see if there is anything else that I may be missing.  I wanted to isolate the plugin by creating a new project that just plays a video.  Just to make sure I wasn't doing something stupid in the main project!

Thanks so much for your help!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #3 on: September 03, 2005, 12:17:34 PM »

Ok, I rechecked out my plugin. And built rebuilt it. And I tried debug and release CEGUI demo which worked just fine here.

Now, of course, this still does not rule out the possibility of an unintialied variable in the plugin/demo casuing havoc.... Sometimes these things will work fine on one computer, and blow up on another computer. Many factors come into play in what the uninialised memory actually holds.

Now, where exactly does the CEGUI program in release blow up on you? And what was the error you recieved? And strange entries in Ogre.log when it blows up? I believe you are using the cheerios commerical ogg.. so, that is a good common base test, as I know it is encoded ok.

Perhaps you could zip up your release directory with everything in it(dll's, configs, etc). You can e-mail it to me, or put it up on the web. And I can test it on my computer. Though, it should be identical to my own build here.. but, something to test anyway.

I will keep searching though.
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #4 on: September 03, 2005, 03:21:36 PM »

Quote from: "pjcast"
Ok, I rechecked out my plugin. And built rebuilt it. And I tried debug and release CEGUI demo which worked just fine here.

Now, of course, this still does not rule out the possibility of an unintialied variable in the plugin/demo casuing havoc.... Sometimes these things will work fine on one computer, and blow up on another computer. Many factors come into play in what the uninialised memory actually holds.

Now, where exactly does the CEGUI program in release blow up on you? And what was the error you recieved? And strange entries in Ogre.log when it blows up? I believe you are using the cheerios commerical ogg.. so, that is a good common base test, as I know it is encoded ok.

Perhaps you could zip up your release directory with everything in it(dll's, configs, etc). You can e-mail it to me, or put it up on the web. And I can test it on my computer. Though, it should be identical to my own build here.. but, something to test anyway.

I will keep searching though.


Hi pjcast!  Thank you so much for running a test for me!  I guess it is bittersweet that the issue isn't happening on your end.  I can package up my release directory and get it to your for testing. I'll also send you the project code that I posted on the ogre forum.  It's only one file plus all the necessary includes and libs! I know what you mean by having some machines run applicationns that other machines crash on.  It would definitely be worth it to see!
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #5 on: September 04, 2005, 06:53:42 AM »

Hi pjcast, I just wanted to let you know that I posted a zip file of the guitesting application.  I sent you an email with the location of the link!  Thank you so much for your help!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #6 on: September 04, 2005, 09:37:05 AM »

Ok, well, I defininately see a crash when running your release build. Not sure what it could be just yet... One line in Ogre log sticks out though.. Immediately after loading the ogg texture, this line: 10:33:48: End of movie file reached shows up. Now, the movie should not end so quickly.. Hmm, I'll keep looking.

btw, why do have extra dll's in the release dir (ogg.dll, OpenAL32.dll, vorbis.dll, vorbisenc.dll, vorbisfile.dll, wrap_oal.dll)? Ogg & vorbis should be statically linked to the plugin.. unless those are needed by OpenAL, and you were planning on using OpenAL.
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #7 on: September 04, 2005, 12:20:11 PM »

Quote from: "pjcast"
Ok, well, I defininately see a crash when running your release build. Not sure what it could be just yet... One line in Ogre log sticks out though.. Immediately after loading the ogg texture, this line: 10:33:48: End of movie file reached shows up. Now, the movie should not end so quickly.. Hmm, I'll keep looking.

btw, why do have extra dll's in the release dir (ogg.dll, OpenAL32.dll, vorbis.dll, vorbisenc.dll, vorbisfile.dll, wrap_oal.dll)? Ogg & vorbis should be statically linked to the plugin.. unless those are needed by OpenAL, and you were planning on using OpenAL.


I seriously can't thank you enough for your help solving this mystery!  You can remove those extra dll files.  Sorry about that.  In my main project I do use OpenAL, hence the two openal libs.  The other libs (vorbis etc....) I added thinking that I was missing some libs for the application to work.  If they aren't necessary, then please remove them!

Thank you so much for your time!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #8 on: September 04, 2005, 02:07:00 PM »

Just to be sure about null/unintialized variables... I ran the CEGUI demo through valgrind on Linux. I found one thing that was unitialized, I doubt this will solve your problem, but, it's worth a try:

(cegui demo)
in MovieLogic::MovieLogic constructor:
add this somewhere in there:
maxTime = 0;

One thing you could try to (to compare to this), is, in your vdeo app that uses video overlays, change the line in the material script to: play_mode play. Then, remove any calls to the TheoraPlugin inside your app (ie changePlayMode, ect, and setting up audio). Just to see if it crashes right away.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #9 on: September 04, 2005, 02:09:58 PM »

And, if you could try to step through the debugger and find out what line it crashes on inside the plugin.. As I don't have VC6 here, it would really help me out :)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #10 on: September 04, 2005, 08:37:56 PM »

One little thing I noticed too (probably not the cause either).. But, in your debug build of the plugin, you link against the ogg and vorbis .dll libs. And, in your release (it appears) you linked against the static libs of ogg/vorbis.

I recommend you change you debug project settings to link against ogg_static_d.lib and vorbis_static_d.lib as it will be less dll's to deploy with your app.

Edit:
Comparing the ogre.log and cegui.log, to me, it looks like it's crashing inside CEGUI
..Specifically, in MainModule.cpp of CEGUI demo, this line:

      Imageset *img = ImagesetManager::getSingleton().createImageset(
            temp, mMovieControl->getTexture() );

The last line in my cegui.log here is: 04/09/2005 21:33:25 (InfL1)   Attempting to create Imageset 'MyImagesNumber' with texture only.

Can you inspect the texture instance returned from getTexture and make sure it is not null, and step into that method and see why/when it crashes.
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #11 on: September 05, 2005, 10:18:15 AM »

Quote from: "pjcast"

One thing you could try to (to compare to this), is, in your vdeo app that uses video overlays, change the line in the material script to: play_mode play. Then, remove any calls to the TheoraPlugin inside your app (ie changePlayMode, ect, and setting up audio). Just to see if it crashes right away.


Hi pjcast, So I tried just commenting out the line changePlayMode in my video plugin test app and it still crashed :? .  I did change the material script to play_mode play.  I left the other calls to get the plugin and the texture in there however!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
more on the ogre3d plugin
« Reply #12 on: September 05, 2005, 10:20:41 AM »

Are you seeing the same crash in the CEGUI code that I posted above? If so, can you identify if one of the parameters is null using the debugger, and step into CEGUI to see what is causing the crash...
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #13 on: September 05, 2005, 10:21:14 AM »

Quote from: "pjcast"
One little thing I noticed too (probably not the cause either).. But, in your debug build of the plugin, you link against the ogg and vorbis .dll libs. And, in your release (it appears) you linked against the static libs of ogg/vorbis.

I recommend you change you debug project settings to link against ogg_static_d.lib and vorbis_static_d.lib as it will be less dll's to deploy with your app.

Edit:
Comparing the ogre.log and cegui.log, to me, it looks like it's crashing inside CEGUI
..Specifically, in MainModule.cpp of CEGUI demo, this line:

      Imageset *img = ImagesetManager::getSingleton().createImageset(
            temp, mMovieControl->getTexture() );

The last line in my cegui.log here is: 04/09/2005 21:33:25 (InfL1)   Attempting to create Imageset 'MyImagesNumber' with texture only.

Can you inspect the texture instance returned from getTexture and make sure it is not null, and step into that method and see why/when it crashes.


Hmmm, never even thought to look in the cegui log!  Yes I will check to see if there is a null pointer there and let you  know what I get!
Logged

smonijhay

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
more on the ogre3d plugin
« Reply #14 on: September 05, 2005, 10:26:33 AM »

Quote from: "pjcast"
Are you seeing the same crash in the CEGUI code that I posted above? If so, can you identify if one of the parameters is null using the debugger, and step into CEGUI to see what is causing the crash...


Well, I don't know how relevant this is, but when I rebuild the projects, the guitesting application does give me this warning about CEGUI
Code: [Select]

C:\OgreSDK\include\CEGUI/CEGUIGlobalEventSet.h(36) : warning C4275: non dll-interface class 'CEGUI::Singleton<class CEGUI::GlobalEventSet>' used as base for dll-interface class 'CEGUI::GlobalEventSet'
        C:\OgreSDK\include\CEGUI/CEGUIGlobalEventSet.h(35) : see declaration of 'GlobalEventSet'



at the beginning of the class CEGUIEXPORT GlobalEventSet.  I'm going to check the code you just posted to see what happens!
Logged
Pages: [1] 2