[GTK4 C] App runs on Debug and into EDI but crashes on Release

I’m making an application targeted to run on Linux and Windows, it ok on Linux, but on Windows I’m having troubles to debug as it runs on debug and also into the EDI (I’m using Code::Blocks) but crashes on Release. Is there a way I can do to debug on Release ? To be able to run the .exe files, I needed to find and add add the file libffi-8.dll into MSys2\Mingw64\bin folder where there was not this dll but libffi-7.dll. It was needed by gdbus.exe.

Install gdb in MSYS2 using pacman:

pacman -S mingw-w64-x86_64-gdb

Then open the release .exe in gdb:

gdb /path/to/exe

And type run into gdb. When the application crashes, type the command bt in gdb.

Thank you, I will try that.

My problem was that on release Windows needs all pointers to be explicitely initialized. Finally that project made me learn that Windows pitfalls are

  • non ASCII characters into strings (french accents on my case)
  • strings that have trailing “Carriage Return” char (13) that make them inusable as file name
  • pointers that are not initialized
    Otherwise GTK4 C can be cross-compiled easily (Linux and Windows)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.