"gflBitmapGetXMP" causes crash with certain images

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

User avatar
AmigoJack
Posts: 33
Joined: Tue Mar 09, 2010 6:40 pm

"gflBitmapGetXMP" causes crash with certain images

Post by AmigoJack »

I have serious problems with gflBitmapGetXMP() in v3.11 with at least one JPEG-Image:

upon calling the function an exception occurs:

Code: Select all

Access violation at address 00A94BD8 in module 'libgfl311.dll'. Read of address 012A5000
Unfortunately this cannot be isolated. When I later call gflFreeBitmap() I get another exception:

Code: Select all

Access violation at address 00AB2D0D in module 'libgfl311.dll'. Read of address EEFEEF06
If I would now try to invoke gflLoadBitmap() to load another image I always get GFL_ERROR_NO_MEMORY.

So my next approach was to completely deinitialize and exit the whole GFL to load it again from fresh. This also doesn't work, because with freeing the second of both DLLs (no matter which order - it is always the second) I get an MSVC++-exception:

Code: Select all

Runtime Error!

Program: "...my.exe"

R6017 
- unexpected multithread lock error
This ultimately terminates the host application. :-(


This is a true problem, because I cannot use gflBitmapGetXMP at all, because there is no way to tell if it will gonna corrupt the whole GFL or not. Once the GFL gets corrupted, it's not usable anymore - and unloading the DLLs gives the MSVC++-exception which, in turn, terminates the application it was loaded by.

If I never touch this function I also have no problems at all - the Image can be loaded and displayed very well. Compared it to the behaviour of xnview version 1.97 - Image is loaded there also and the XMP-data is even read correctly without any flaw.

I added the picture of interest.
You do not have the required permissions to view the files attached to this post.