Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFIMAGE / ImageResize problems

New Here ,
Apr 21, 2008 Apr 21, 2008
Definitely there are some issues happening these days on the HMS servers since our images upload/resize functions stopped working since Friday.

I tried a lot of ways to fix this but seems to be a server related problem. We setup a test script trying to do this:

1. Upload a JPG file with a size greater than 640 x 480 on the server
2. Create a "thumbnail" of the images (150 x Y) and save it to "thumbs/" folder
3. Create a "big version" of the images (640 x Y) and save it to "images/" folder
4. Delete the original file

It crashes on the 3rd step, and saves only part of the resize JPG file.

http://www.viaromania.eu/upload/index.cfm

The error we are getting is this one:

An exception occured while trying to write the image.
Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : coldfusion.image.ImageWriter$ImageWritingException: An exception occured while trying to write the image.


Later edit:

- This is acting totally strange... for some JPG files it works fine, for some of them it crashes when trying to write the resized image on the server and for some of them it is crashing when trying to delete the original file from the disk. I just don't get it!

If you want to test it, download this image: http://www.viaromania.eu/upload/PICT0238.jpg

And try the script with it. It should crash on RESIZE.

Next, download this image: http://www.viaromania.eu/upload/_2422339695_237906822d_b.jpg

And try the script with it. It should crash on DELETE original file.

And download this image: http://www.flickr.com/photos/24769044@N08/2422339695/sizes/l/

And it will work fine...

What is going on? Does anyone else experienced the same problems?

NOTE: Images crashing were previously resized using ACDSee Pro software.
2.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 21, 2008 Apr 21, 2008
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 26, 2008 Apr 26, 2008
Follow-up:
In one of the threads above KSmith mentions a patch is available for the file locking issue.

Patch for CFImage and Image functions in ColdFusion 8.0.1 (kb403411)
http://www.adobe.com/go/kb403411

The patch does not resolve the second issue "Missing Huffman code table entry". At least not for me..
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 29, 2008 Apr 29, 2008

> The patch does not resolve the second issue "Missing Huffman code table entry". At least not for me..

can you please let me know the email address on which i can contact you..my email id ksakhare@adobe.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 30, 2008 Apr 30, 2008
Kiran Sakhare wrote:
> can you please let me know the email address on which i can contact you

Okay. I sent you an email/PM with my email address.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2008 Apr 30, 2008
You are right, the patch didn't solve the problem. It works now for some of the JPG formats but still crashing for most of them.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2008 May 05, 2008
We upgraded to 8.01 today (Windows 2003 server) and immediately started seeing problems with the CFIMAGE routines. The hotfix hasn't worked for us, though it seems to have made the frequency slightly less.

Our application log shows a few of these every few minutes:

An exception occured while trying to write the image. Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : coldfusion.image.ImageWriter$ImageWritingException: An exception occured while trying to write the image.

Is work on this hotfix ongoing? Can we expect to see an update sometime soon?

Or.... my favorite and more typical situation, am I the only one still having this issue? 🙂

Many thanks,
- Piper
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 05, 2008 May 05, 2008
Soon we are releasing hotfix for the below mentioned image issues

1) File locking issue -- Which will not allow you to overwrite the image
2) Missing Huffman code table entry
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 06, 2008 May 06, 2008
ThePiperDown,

There are a few issues experienced by yourself and others that do not appear to be solved by the previous patch:

- Locked image files
- Missing Huffman code table entry
- Quantization table 0x02 was not defined
- Image files locked on error

I have been using java directly, instead of ImageWrite, to try and work around these issues. See full code here
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=1358449
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2008 May 06, 2008
CFSearching, the work around is working, thanks for the heads up!

Kiran, I'm subscribed to this thread, as I'm sure a number of others are as well. Would you be so kind as to post here once more when the new hotfix is released?

Thank you guys!
- Piper
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 07, 2008 May 07, 2008
Updated hot fix was published today. Visit http://www.adobe.com/go/kb402604 for list of all CF8/8.01 hot fixes. Again, the CFImage hot fix was updated today (5/7/08).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 07, 2008 May 07, 2008
Ken Smith wrote:
> Updated hot fix was published today

That is good news. Thanks for the update.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2008 May 09, 2008
Unfortunately there is no change. It still works only with the workaround found on Adobe support forum and not working using ColdFusion original "ImageWrite" function. If you want to try it yourself, I modified my original testing script so you can choose what function to use: the original CF - ImageWrite or the workaround - ImageWriteReplacement.

Use this image: http://www.viaromania.eu/upload/sample/STA73827.JPG

And this script: http://www.viaromania.eu/upload/

Choose the first then the second checkbox.


Adrian.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 09, 2008 May 09, 2008
Adrian,

I tried the test page but cannot see the detailed error message. Just "Sorry, an error has occurred in displaying this page.".

> Use this image: http://www.viaromania.eu/upload/sample/STA73827.JPG

I have applied the updated patch. So I downloaded that image and tried it locally, using the code in your original post. It runs perfectly for me. Are you sure the patch was applied correctly? Verify that the server was restarted afterward. Otherwise, you would not see the changes.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2008 May 09, 2008
Hi,

Thanks for trying to help.
So, we capture the errors and send it by email to webmaster that's why you didn't see it on the screen. The error you are getting is this:

"Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : java.lang.NullPointerException
MessageAn exception occured while trying to write the image. "

I just turned OFF error capture so if you will try it now you will get the error.

I am not 100% sure the patch was installed, all I have is an email from HostMySite telling me they applied the patch. Is there any way to test for myself if it was applied?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 09, 2008 May 09, 2008
Adrian,

Yes, I can see the full exception now.

I suspect the updated hotfix was not applied. You could try dumping the server scope and checking your version number. However, since this was an update to a previously released hotfix I do not know if the version numbers changed. What version do you see if you run this code?

<cfdump var="#server#">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2008 May 09, 2008
http://www.viaromania.eu/server.cfm

PRODUCTVERSION 8,0,1,195765
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 09, 2008 May 09, 2008
Adrian,

That is what I have too. However, there were two releases of this hotfix: one in April and one this month. Unfortunately.. they both seem to have the same version information. So there was no change to my version number when I applied the updated (May 2008) version of the hotfix. Other than version number, I do not know how to tell the difference between the two.

But again, since it is working for me I suspect the new updated hotfix was not applied. ie Perhaps they applied the one from April, but not the one released this month.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 09, 2008 May 09, 2008
If you want to see the source code please check this:

http://www.viaromania.eu/upload/upload.txt
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 09, 2008 May 09, 2008
Adrian,

I have not tried it, but it looks similar to your original code, which does work for me. At this point, I would suggest asking your provider about the hotfix. Mention that there was an update to the original (not a new hotfix). So it may have exact same version number. Ask if they applied the new update that was released on 05/07/2008 or just the original one from April 2008. You need the new one from 05/07/2008.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 15, 2008 May 15, 2008
LATEST
Hey Guys,
We tried the latest/greatest CFImage hotfix (updated) yesterday but we started finding the same errors again in the application.log:

An exception occured while trying to write the image. Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : coldfusion.image.ImageWriter$ImageWritingException: An exception occured while trying to write the image.

We're still successfully using the java code workaround, but it is noticeably slower than the CFImage writing function, so we had to increase timeouts on the upload pages to deal with that.

Is anyone else still experiencing this issue?

Best,
- Piper
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources