tracker issue : CF-3690487

select a category, or use search below
(searches all categories and all time range)
Title:

Images temporarily stored in the RAM drive can produce exceptions in logs

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Dan Switzer / Dan Switzer (Dan Switzer)

Created: 01/08/2014

Components: CFIMAGE

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 / 287693

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win 2003 Server

Vote Count: 0

Problem Description:

We started seeing an issue where our application.log, exception.log and coldfusion-out.log are all logging errors like the following:

Could not read from ""ram:///797C39D0-CAE4-21F9-D573CFDC3FE7482E.jpg"" because it is a not a file.

The code itself works fine, but every time the code would run, we'd see 3 log entries for each call to our code. We finally tracked down the problem to some code that was creating a thumbnail using the RAM drive.

Our code would use the RAM drive to scale an image, then we would return a reference to the new image. It appears what is happening under the hood is that CF attempts to make calls to the original "source" file and when it doesn't find it, throws hidden exceptions.

Steps to Reproduce:

I've attached an sample that illustrates the problem.

1) Extract the zip file to a web accessible folder.
2) Run the example.cfm
3) Click on the "Run test and generate log entries" link
4) The code will run w/out throwing any errors, but you will see log entries written into the application.log, exception.log and coldfusion-out.log.
5) Click on the "Run test w/fix"
6) Code will run w/out errors being written to the logs

Actual Result:

Code runs fine, but generates exceptions in the logs.

Expected Result:

No exceptions should be generated.

Any Workarounds:

The fix is to write the image to a new image by using the BufferedImage. i.e.

image = imageNew(imageGetBufferedImage(image));

This creates an image that no longer points to a "source" file on disk.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3690487

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Dan G. Switzer, II
External Customer Email:  
External Test Config: We have tested this on fully patched ColdFusion 9.0.1 Windows 2003, using IIS6 as well as on a Mac running Apache.



We have also verified the problem exists in fully patched ColdFusion 10.

Attachments:

  1. January 09, 2014 00:00:00: 1_cf9_image_could_not_read_from_ram.zip

Comments: