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

Another CFImage bug

Guest
Apr 17, 2008 Apr 17, 2008

Copy link to clipboard

Copied

Second cfImage bug I've found in a week. Tried reporting it to Adobe, but their bug report form throws a 404 (nice).

Basically, certain JPGs will cause CF (or more specifically, Java) to throw this error after reading them to memory, then writing it to disk:
Missing Huffman code table entry
javax.imageio.IIOException: Missing Huffman code table entry at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method) at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:996) at coldfusion.image.ImageWriter.writeJPeg(ImageWriter.java:60) at coldfusion.image.ImageWriter.writeImage(ImageWriter.java:119) at coldfusion.image.Image.write(Image.java:578) at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593) at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500)

Run the attached code with the image found here:
http://img141.imageshack.us/img141/9549/testimagefk9.jpg

If you put the URL into the cfimage source (instead of downloading the image and reading it locally) you get a different error:
coldfusion.image.Image$ReadImageMetadataException: Exception occured in JPG processing.
segment size would extend beyond file stream length
at coldfusion.image.Image.initializeMetadata(Image.java:2403)
at coldfusion.image.Image.getExifMetadata(Image.java:2415)
at coldfusion.image.Image.write(Image.java:577)
at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593)
at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500)

Verified on Win2K, Win2K3, and WinXP. CF version 8.0.1.
TOPICS
Advanced techniques

Views

6.3K

Translate

Translate

Report

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 15, 2008 May 15, 2008

Copy link to clipboard

Copied

Piper,

The patch has been working for us. Maybe you are seeing a new bug. Wrap your cfimage code try/catch (see my previous post), and trap the actual error. What you are seeing in the logs is a generic error and won't tell you what the true problem is.

Votes

Translate

Translate

Report

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
Explorer ,
May 19, 2008 May 19, 2008

Copy link to clipboard

Copied


Hello, I work with Piper. We've wrapped the CFIMAGE Write tags in catch / try blocks as suggested. I'm attaching the resulting HTML (from cfdump var="#cfcatch#") . Any thoughts? Is there anyway to paste RAW html in the forums? If not, can you point me in the direction of what to look for in this CFDUMP output? I'll paste some of what seems to be the more pertinent information below.

Thanks in advance for any and all help!
Rob

Message: Metadata components != number of destination bands
StackTrace: javax.imageio.IIOException: Metadata components != number of destination bands at com.sun.imageio.plugins.jpeg.JPEGImageWriter.checkSOFBands(JPEGImageWriter.java:1208) at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:656) at coldfusion.image.ImageWriter.writeJPeg(ImageWriter.java:70) at coldfusion.image.ImageWriter.writeImage(ImageWriter.java:102) at coldfusion.image.Image.write(Image.java:615) at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593) at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at cfupload2ecfm1559718899._factor11(D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm:248) at cfupload2ecfm1559718899._factor12(D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm:1) at cfupload2ecfm1559718899.runPage(D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


TagContext array
1 struct
COLUMN 0
ID CFIMAGE
LINE 248
RAW_TRACE at cfupload2ecfm1559718899._factor11(D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm:248)
TEMPLATE D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm
TYPE CFML

2 struct
COLUMN 0
ID CF_UPLOAD
LINE 1
RAW_TRACE at cfupload2ecfm1559718899._factor12(D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm:1)
TEMPLATE D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm
TYPE CFML

3 struct
COLUMN 0
ID CF_UPLOAD
LINE 1
RAW_TRACE at cfupload2ecfm1559718899.runPage(D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm:1)
TEMPLATE D:\Websites\LouisvilleMojoCom\Gallery\upload.cfm
TYPE CFML

Votes

Translate

Translate

Report

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 19, 2008 May 19, 2008

Copy link to clipboard

Copied

LATEST
RE: Metadata components != number of destination bands

That looks like a new bug to me.

Just to keep this organized, start a new thread for this bug, post that dump and give a link to the image causing the error (see my first post in this thread for an example). Reply to this post with the new post URL and we'll all try to replicate your error.

I haven't seen that error yet, so you may have discovered something new.

Votes

Translate

Translate

Report

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
Documentation