Runtime error in Demo_Player sample

che1404

16-06-2009 20:58:50

Hi there!
I'm having a runtime error in the Demo_Player sample, in the init() function.

void init()
{
CEGUI::Window* sheet = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"SimpleDemo.layout");
CEGUI::System::getSingleton().setGUISheet(sheet);

EVENT("rgb_button",DemoApp::OnRGB); EVENT("yuv_button",DemoApp::OnYUV); EVENT("grey_button",DemoApp::OnGrey);
EVENT("shaders_button",DemoApp::OnShaders); EVENT("Play/Pause",DemoApp::OnPlayPause);
EVENT_EX("seeker",DemoApp::OnSeekStart,CEGUI::Scrollbar::EventThumbTrackStarted);
EVENT_EX("seeker",DemoApp::OnSeekEnd,CEGUI::Scrollbar::EventThumbTrackEnded);

createQuad("video_quad","video_material",-0.5,1,1,-0.94);

TheoraVideoManager* mgr=TheoraVideoManager::getSingletonPtr();

mgr->setInputName(VIDEO_FILE); <------ HERE, THE ERROR

mgr->createDefinedTexture("video_material");
}


It's strange, because the error raises in an assignment statement (string = string).
The error says:
Unhandled exception at 0x784860f7 in Demo_Player.exe: 0xC0000005: Access violation reading location 0x00000058.

I'm using VS2008, and the lastest svn revision of the plugin.
Any idea?
Thanks in advance,
che1404.

che1404

17-06-2009 08:19:45

Hi again.
The problem is that the manager is null, and I was trying to access a null object.
But this is a bit wired, because the TheoraPlugin dll is loaded successfuly during the startup, and the constructor is called normally. Any thoughts?

Finally, I had to do this before using TheoraVideoManager:

...
createQuad("video_quad","video_material",-0.5,1,1,-0.94);

// Create our new External Textue Source PlugIn
TheoraVideoManager* theoraVideoPlugin = new TheoraVideoManager();

// Register with Manger
ExternalTextureSourceManager::getSingleton().setExternalTextureSource("ogg_video",theoraVideoPlugin);
Root::getSingleton().addFrameListener(theoraVideoPlugin);

TheoraVideoManager* mgr=TheoraVideoManager::getSingletonPtr();

Ogre::String test = mgr->getInputName();
...


Thanks!