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

Crash in Debug Mode #1960

Closed
TGMTGMDev opened this issue Oct 13, 2021 · 2 comments
Closed

Crash in Debug Mode #1960

TGMTGMDev opened this issue Oct 13, 2021 · 2 comments
Assignees
Milestone

Comments

@TGMTGMDev
Copy link

TGMTGMDev commented Oct 13, 2021

Hello
Env: VisualStudio Community 2022 Preview - C++

I wrote a small app (in C++) to display Exif data. I linked to app to Exiv2.lib (as found on the Web site). In Release mode, it works perfectly (I checked against the output of the Exifdata.exe found in the bin directory).
When I run in debug mode, the app crashed directly on opening the image file !!!
Line: Image::AutoPtr image = ImageFactory::open(szFile);

Exception thrown at 0x00007FF85B184F99 in Exif.exe: Microsoft C++ exception: Exiv2::BasicError at memory location 0x0000007203CFD6B0.
Catch give the following info:
Exiv2 Exception on Open File: : Failed to open the data source: Invalid argument (errno = 22)

If i use the option 'Use link time code generation', I got
Exception thrown at 0x00007FF8141B1470 (vcruntime140.dll) in Exif.exe: 0xC0000005: Access violation reading location 0x000002A057666597.
Catch is not called !!!!

Note that this is a Unicode App. But I pass the file name as a char... As a std::string, I got the same crash...

I guess this is because I link a debug app with a release lib .... Same if I uncheck 'use debug libraries' in VS
Is there a web site where I can download the debug release of the lib to check if this is the solution ?

Thank you for your help

Thierry

@clanmills
Copy link
Collaborator

I see you are using Visual Studio 2022. That could be the issue. We publish builds for MSVC 2019. You should be building the code from source for your platform. I would like to screen share with you to walk you through building the code from source.

Here's a build of Exiv2 v0.27.5 RC3 debug/msvc. Can you look at this and give me feedback, please.

exiv2-0.27.5.3-2019msvc64Debug-2021-10-17_16:31:00.zip

If this works for you, I'll add this build configuration to the builds published on exiv2.org. I'm planning to build v0.27.5 on Thursday (2021-10-21).

@clanmills clanmills added this to the v0.27.5 milestone Oct 21, 2021
@clanmills clanmills self-assigned this Oct 21, 2021
@clanmills
Copy link
Collaborator

I'm going to close this as we received no user feedback.

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

2 participants