T O P I C R E V I E W |
jcrochet |
Posted - Jun 21 2011 : 01:41:57 Hello everybody,
I have a "big" problem with ImageEN 3.1.2 in my application.
I can't load or preview some pictures comming from a fuji camera and I got an access violation. With ImageEN 3.0.5 there is no problem.
I figured out that the problem come from hyieutils.pas unit in the function "TIETagsHandler.ReadFromStream". The headerType of the tags is iemnIFDOFFSET.
I saw an update in 3.1.0 in procedure TIETagsHandler.CheckHeader about fujifilm maker. If a remove the item
(signature:'FUJIFILM'; base:iemnTIFFHeader; headerType:iemnIFDOFFSET; byteOrder:ieboLittleEndian) the problem disappear.
Do you have any ideas about this error ?
Edit: I tried to load the pictures with the demo "Photo Editor" in Download section of the site and I had the same problem. There is no preview of the picture in the OpenFile Dialog and have an access violation
Regards, |
20 L A T E S T R E P L I E S (Newest First) |
jcrochet |
Posted - Jul 22 2011 : 00:12:49 Hi Uwe, Fabrizio,
If I open and save one of the image with an another product, there will bo no error in ImageEN.
The problem is that my Application has been distributed to many users and I can't tell them to save theirs pictures with an another software if they own a FujiFilm cam.
I will try ImageEN4.0.0.... or downgrade to 3.0.5
Julien |
fab |
Posted - Jul 21 2011 : 12:54:19 No problem using version 4.0.0. |
Uwe |
Posted - Jul 21 2011 : 08:58:45 Have you tried to open and save one of the images yet? As I mentioned before, something's wrong with the maker notes. Saving the images again might correct this problem. |
jcrochet |
Posted - Jul 21 2011 : 08:49:06 Hi Fabrizio,
I come back again with my JUFIFILM pictures problem ! :(
Here is a little delphi 2007 project with ImageEN 3.1.2 patched. http://update.sidexa.fr/PO/ImageEN/Projets2.zip
This project loads 31 FUJIFILM pictures inside a TImageEnMView component. One button clear all pictures from the component with a while loop and a "Application.ProcessMessages" call for each pictures.
When I click on the button, I got an Access Violation inside :
destructor TIOParams.Destroy;
begin
FreeAndNil(fEXIF_Tags);
FreeAndNil(fEXIF_MakerNote); -->> ACCESS VIOLATION HERE
...
end;
Some information to help you:
If I move the vertical scrollbar to the bottom and then click on the Delete button, there is no access violation.
If a remove the "Application.ProcessMessages" there is no error.
If I load other pictures from other manufacturer there is no error.
Regards, Julien |
Uwe |
Posted - Jul 06 2011 : 19:40:59 Thanks, Fabrizio, just received it. Give me a few days for the test. In the meantime, I took a closer look at the image, and it seems that there's something wrong with its maker notes. I get a warning for an "Unknown format for MakerNotes tag 0x0" |
fab |
Posted - Jul 06 2011 : 12:11:38 Uwe, I just sent you an email with an ImageEn test version.
|
Uwe |
Posted - Jul 06 2011 : 11:27:54 I did, Fabrizio.
The bug can be traced to line 20174 in procedure TIETagsHandler.Clear in hyieutils.pas:
if assigned(fUnparsedData) then freemem(fUnparsedData); <--------- here
D2007 Pro (all updates applied), latest ImageEn version
|
fab |
Posted - Jul 06 2011 : 11:07:09 Please make sure you have applied correctly both the patches, because I still cannot replicate it. |
Uwe |
Posted - Jul 05 2011 : 16:53:34 Yes, plain and simple
ImageEnVect1.IO.LoadFromFile()
Here's some more info coming from FastMM:
-------------------------------------------------------- FastMM has detected an error during a FreeMem operation. The block footer has been corrupted.
The block size is: 374
This block was allocated by thread 0xFBC, and the stack trace (return addresses) at the time was: 40324E 5C3AB4 6CA237 5A7F26 68CA74 68CD6F 9BAD96 9B6067 57EB59 476B24 7AA16B
The block is currently used for an object of class: Unknown
The allocation number is: 371400
The block was previously freed by thread 0xF54, and the stack trace (return addresses) at the time was: 40326A 6FD9E4 737D57 54DDAE 54D964 77B9D0E9 [BaseThreadInitThunk] 77C716C3 [Unknown function at RtlInitializeExceptionChain] 77C71696 [Unknown function at RtlInitializeExceptionChain]
The current thread ID is 0xFBC, and the stack trace (return addresses) leading to this error is: 40326A 6CA28F 5A7F26 68CA74 68CD6F 9BAD96 9B6067 57EB59 476B24 7AA16B 7A2AB3
Current memory dump of 256 bytes starting at pointer address 7FF77AB0: 46 55 4A 49 46 49 4C 4D 1A 00 00 00 07 00 04 00 00 00 30 31 33 30 10 00 02 00 1F 00 00 00 3E 01 00 00 00 00 00 00 00 00 00 00 5E 01 00 00 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 66 01 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 40 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 F U J I F I L M . . . . . . . . . . 0 1 3 0 . . . . . . . . > . . . . . . . . . . . ^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
fab |
Posted - Jul 05 2011 : 15:24:54 In this case I am unable to replicate. Do you just load the jpeg using, for example:
ImageEnView.IO.LoadFromFile(...);
|
Uwe |
Posted - Jul 05 2011 : 14:31:29 Fabrizio, it's the image that was mentioned in the third post from the top.
http://update.sidexa.fr/PO/PVSE/P0003.JPG |
fab |
Posted - Jul 05 2011 : 14:11:44 Uwe, please could post a link to the image you are testing? |
Uwe |
Posted - Jul 05 2011 : 12:34:56 The patch doesn't work - at least not in Vista Home Premium 32bit (all updates applied). FastMM reports a memory error every time I try to open the image.
Error: "FastMM has detected an error during a FreeMem operation. The block footer has been corrupted."
I tried to upload a screenshot, BTW, but your forum software crashes with a Microsoft VBScript runtime error '800a004c'...
|
jcrochet |
Posted - Jul 05 2011 : 00:21:53 Hi Fabrizio,
Thank you for the patch ! It Works ! ![](images/icon_smile_2.gif)
|
fab |
Posted - Jul 04 2011 : 13:27:40 Hi, thank you for the test project and file (...I hope you don't use TImageEnIO alone in your projects...).
To fix this problem please open hyieutils.pas and go to TIETagsHandler.ReadFromStream method. Add the marked code:
....
iemnIFDOFFSET:
begin
// read IFD offset and move
CopyMemory(@dw, @buffer[bufferPos], sizeof(dword));
inc(bufferPos, dw-8);
end;
end;
if bufferPos >= size then // <<<< ADD THIS
exit; // <<<< ADD THIS
case fEXIFMakerInfo.byteOrder of
ieboFromTIFFHeader: littleEndian := fEXIFMakerInfo.TIFFHeader.Id = $4949;
ieboLittleEndian: littleEndian := true;
ieboBigEndian: littleEndian := false;
end;
....
|
jcrochet |
Posted - Jul 04 2011 : 06:31:13 Update : The error come from
tagscount := IECSwapWord(pword(@buffer[bufferPos])^, not littleEndian); in hyieutils.pas TIETagsHandler.ReadFromStream procedure.
Regards, |
jcrochet |
Posted - Jul 04 2011 : 06:28:46 Hi everybody
I came back with my problem of loading picture from FUJIFILM camera.
A customer call me because he got some Access Violation in my App when loading some pictures.
I put a little delphi 2007 project here so you can test it. http://update.sidexa.fr/PO/ImageEN/Project.zip The Access Violation accurs about once every 10 times.
Thank you for your help. |
jcrochet |
Posted - Jun 22 2011 : 00:50:52 Excuse me it was an error in my own source code.
Everything is working well Thank you Fabrizio |
fab |
Posted - Jun 21 2011 : 06:37:25 Unfortunately I cannot replicate. Is the same jpeg (P0003.JPG)? |
jcrochet |
Posted - Jun 21 2011 : 04:53:31 Thank you for your help !
Now I can load and open the image. but unfortunately I have a new error. To chosse the image on hard disk I use a TOpenImageEnDialog object. And when I call the destructor "FOpenDialog.Free" I got an EInvalidPointer exception ("opération de pointeur invalide" in french)
In debug mode I found that the error is in "TOpenImageEnDialog.Destroy" when the "FreeAndNil(FImageEnView);" is called. Then I figured out that the exception is thrown in "TIETagsHandler.Clear" procedure in hyieutils.pas unit when the instruction "freemem(fTIFFEnv.IFD);" is called.
Thank you for your help. |