|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0257 |
| Class | ARCHITECTURE |
| Severity | 2 |
| Status | ready |
Models: —
Found: 2026-11-26, FhVis on Windows made no render window.
SDL 2 is linked statically into FhVis.exe, fhVisDll.dll and OgreBites.dll on Windows. Each copy has its own state. FhVisWindowContext::CreateRenderWindow called fhsim::visual::StartSdlVideo() (WindowSystem.cpp:44) first. That ran in fhsim's copy and registered the window class "SDL_app". OgreBites' copy then failed RegisterClassEx for the same name, SDL_Appname became NULL and SDL_CreateWindow returned NULL. OgreApplicationContextSDL (Ogre 14.6.2, OgreApplicationContextSDL.cpp:57-68) then passed garbage as externalWindowHandle. ogre.log showed sdlwin=0 and a window of 1280x0 on D3D11. On GL3Plus selectPixelFormat failed. D3D11 does not throw on a bad handle.
The input SDL calls (pollEvents in OgreBites) go to a copy that has no window. A work-around in FhVisWindowContext (create the window first on Windows, throw on a null native handle) hides it. Any other SDL call made from fhsim's own copy can fail the same way.
Lasting fix: one shared SDL (a shared library) in conan/set.profile, with ogre3d rebuilt against it.
fhvis-window-windows (DRIVER=windows) on a Windows build, with fhsim and OgreBites sharing one SDL.
Rebuilds ogre3d and every consumer on Windows.