Skip to content

Ogre3d SampleBrowser.exe crashes in ConfigDialog::display on MSYS2/MinGW: executable has no Win32 resources #27209

@ninepillars

Description

@ninepillars

Description / Steps to reproduce the issue

Environment

  • OS: Windows 10 / Windows 11 (please adjust as needed)
  • Toolchain: MSYS2 MinGW-w64 (x86_64)
  • Compiler: GCC (from MSYS2)
  • Ogre version:
  • Build system: CMake
  • Render system: OpenGL (or D3D11, if applicable)

Description

When running SampleBrowser built under MSYS2/MinGW, the application fails when showing the render system configuration dialog.

The error message reported by Windows is:
"The specified image file does not contain a resource section."

The crash happens in:
ConfigDialog::display()

Expected behavior

SampleBrowser should display the render system configuration dialog normally.

Actual behavior

SampleBrowser fails when attempting to display the ConfigDialog. The executable does not appear to contain a Win32 .rsrc section.

Analysis

It appears that the Win32 resource file (.rc) for SampleBrowser is not being compiled or linked into the executable when building with MinGW/MSYS2.

As a result, calls to Win32 APIs such as FindResource / LoadResource fail because the executable has no resource section.

This can be verified by inspecting the executable:

  • objdump -h SampleBrowser.exe shows no .rsrc section.

Possible cause

The .rc file may not be processed by windres or not added to the target sources in the MinGW/MSYS2 build configuration.

Workaround

Manually skipping the ConfigDialog (e.g. by predefining ogre.cfg or calling restoreConfig()) avoids the crash, but the dialog itself remains unusable.

Question

Is this a known limitation of the MSYS2/MinGW build, or is the resource file expected to be compiled and linked automatically?
If this is unintended, I would be happy to test a patch or provide more build information.

Expected behavior

SampleBrowser.exe start and show the config dialog

Actual behavior

Crashes in ConfigDialog::display

Verification

Windows Version

Windows 11

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions