Skip to content

GIMP crash caused by setlocale bug on Windows (via Exiv2 in the call stack) #3225

@Wormnest

Description

@Wormnest

Describe the bug

We (GIMP) have received several crash issues on Windows that proved difficult to diagnose. Our Ms Store handler finally received a crash log that indicates a possible relation to exiv2.

In other cases the telltale sign is libc++abi: terminating due to uncaught exception of type std::bad_alloc: std::bad_alloc, which at this time we are assuming to be the same issue. (Most of GIMP itself is C, not C++)

To Reproduce

Steps to reproduce the behavior:

  1. GIMP's Windows developers have not been able to reproduce on their systems. We depend on users reporting this.
  2. They try to load an image and then they get a crash, usually without details.

Expected behavior

Loading of images including loading their metadata through gexiv2 -> exiv2 succeeds.

Desktop (please complete the following information):

  • OS and version: so far this seems to be Windows only
  • Exiv2 version and source: GIMP 3.0.0 and 3.0.2 use 0.28.5, RC3 where this also happened may have used an earlier version, all supplied by MSYS2, CLANG64 profile.
  • Compiler and version: clang as provided by MSYS2
  • Compilation mode and/or compiler flags:

Additional context

Looking at the trace linked above, I wonder if this could be related to the code that replaced the Data handling regex, maybe in combination with locale handling? Just a wild guess, I'm not a C++ expert.

I wish we could give more details, but I thought it good to make you aware of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwindowsWindows Specific issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions