Frictional Games Forum (read-only)
Strange behavior with examples - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html)
+--- Forum: HPL1 Engine (https://www.frictionalgames.com/forum/forum-28.html)
+--- Thread: Strange behavior with examples (/thread-3412.html)



Strange behavior with examples - draxd - 05-19-2010

I'm trying to use Video Test from tests folder. I compiled it with Visual Studio 2010 but it crashes , and after little of debugging I found that Video Manager is missing. This also says in hpl.log ,
ERROR: Could not find a loader for 'test_video2.ogm'.
and in void cResources::Init where mpVideoManager is created it looks that it for some reason gets null value.
Anyone get some idea about this. I tried to find reason for this but whos not able to.

Also I wish to add this, in sources/resources/Resources.cpp line 133:
mpParticleManager = hplNew( cParticleManager,(apGraphics, this) );
mlstManagers.push_back(mpParticleManager);
mpSoundManager = hplNew( cSoundManager,(apSound, this) );
mlstManagers.push_back(mpParticleManager);

This looks like copy paste bug to me , I presume that line number 4 should be:
mlstManagers.push_back(mpSoundManager );
Is this ok ?

Update :
I managed to fix this problem by commenting out INCLUDE_THEORA in lowlevelresourcessdl.cpp
line 27:
//#ifdef INCLUDE_THEORA
#include "impl/VideoStreamTheora.h"
//#endif

and

line 143:
//#ifdef INCLUDE_THORA
apManager->AddVideoLoader(hplNew( cVideoStreamTheora_Loader,()));
//#endif


RE: Strange behavior with examples - Thomas - 05-20-2010

VideoManager is only implemented for Win32 (it was never used in the games). Adding it for other OSConfused is an exercise for the user Smile


RE: Strange behavior with examples - draxd - 05-20-2010

Well as I said above , I'm windows user coz I'm using Visual C++ express 2010 and it does not work for me neither.


RE: Strange behavior with examples - Thomas - 05-20-2010

Ah sorry, strange. Perhaps have just set it to NULL. Search for it and see if u can activate it again.


RE: Strange behavior with examples - draxd - 05-20-2010

(05-20-2010, 10:15 AM)Thomas Wrote: Ah sorry, strange. Perhaps have just set it to NULL. Search for it and see if u can activate it again.

No it gets allocated by hplNew and pointer gets value but after it`s added to mlstManagers by mlstManagers.push_back then it's back to null

mpVideoManager = hplNew( cVideoManager,(apGraphics, this) );
mpVideoManager here gots value
mlstManagers.push_back(mpVideoManager);
and now mpVideoManager is null

debuger is kinda acting strange during this time so I can't see all variables values but in code that is searching manager for ogg video manager is set to null