Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyGUI is crashing on a second monitor #238

Open
corentinjaffre opened this issue Feb 21, 2022 · 3 comments
Open

MyGUI is crashing on a second monitor #238

corentinjaffre opened this issue Feb 21, 2022 · 3 comments

Comments

@corentinjaffre
Copy link

Tried the demos (ex: Demo_PanelView.exe), with Ogre 1.13.2, using directX9 and they crash when I move the window on my second screen.

Could be an issue with the font textures:
From Paroj:
My guess would be that the MyGUI Fonts are manually created but without providing a loader callback, so we cannot auto-restore them.

@Altren
Copy link
Contributor

Altren commented Feb 21, 2022

My guess would be that the MyGUI Fonts are manually created but without providing a loader callback, so we cannot auto-restore them.

MyGUI always handled that. Also not auto-restoring resources would cause empty data rather than crash in most cases.
Could you be more specific about the crash? Logs, crash callstack, error message, etc.

@corentinjaffre
Copy link
Author

When I move Demo_PanelView.exe to the 2nd monitor:
"cannot increment value-initialized map/set iterator"
in
D3D9ResourceManager::notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device)
Seems to be with Ogre::Resource = {mCreator=0x0000000000443f70 {...} mName="97634480_TrueTypeFont" mGroup="MyGuiResourceGroup" ...}

Ogre.log doesn't have the time to update its log before the crash, so there is no relevant information in it.

My call stack:

RenderSystem_Direct3D9_d.dll!std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<Ogre::D3D9Resource *>>>::operator++() Line 198	C++
>	RenderSystem_Direct3D9_d.dll!Ogre::D3D9ResourceManager::notifyOnDeviceCreate(IDirect3DDevice9 * d3d9Device=0x0000000005b9c5c0) Line 70	C++
 	RenderSystem_Direct3D9_d.dll!Ogre::D3D9Device::createD3D9Device() Line 776	C++
 	RenderSystem_Direct3D9_d.dll!Ogre::D3D9Device::acquire() Line 146	C++
 	RenderSystem_Direct3D9_d.dll!Ogre::D3D9DeviceManager::linkRenderWindow(Ogre::D3D9RenderWindow * renderWindow=0x00000000004473e0) Line 137	C++
 	RenderSystem_Direct3D9_d.dll!Ogre::D3D9Device::validateDisplayMonitor(Ogre::D3D9RenderWindow * renderWindow=0x00000000004473e0) Line 991	C++
 	RenderSystem_Direct3D9_d.dll!Ogre::D3D9Device::validate(Ogre::D3D9RenderWindow * renderWindow=0x00000000004473e0) Line 844	C++
 	RenderSystem_Direct3D9_d.dll!Ogre::D3D9RenderWindow::_beginUpdate() Line 821	C++
 	OgreMain_d.dll!Ogre::RenderTarget::updateImpl() Line 153	C++
 	OgreMain_d.dll!Ogre::RenderTarget::update(bool swap=false) Line 558	C++
 	OgreMain_d.dll!Ogre::RenderSystem::_updateAllRenderTargets(bool swapBuffers=false) Line 265	C++
 	OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets() Line 1230	C++
 	OgreMain_d.dll!Ogre::Root::renderOneFrame() Line 863	C++
 	Demo_PanelView.exe!base::BaseManager::drawOneFrame() Line 149	C++
 	Demo_PanelView.exe!base::SdlBaseManager::run() Line 165	C++
 	Demo_PanelView.exe!startApp<demo::DemoKeeper>() Line 59	C++
 	Demo_PanelView.exe!WinMain(HINSTANCE__ * hInst=0x000000013fe10000, HINSTANCE__ * __formal=0x0000000000000000, char * strCmdLine=0x000000000036444e, int argc=1) Line 82	C++
 	[External Code]	

@paroj
Copy link
Contributor

paroj commented May 4, 2022

looks like your loader becomes invalid, while the texture is still alive: https://forums.ogre3d.org/viewtopic.php?p=552832#p552832

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants