[mir-coders] cannot publish jpeg of type: 700 x 525 24bit Exif N 10470

boud boud at riseup.net
Sun Apr 22 00:35:24 UTC 2007


hi mir-coders,

Does someone know what size/format of jpeg images we should require users to 
format their images to? (i know this sounds like a silly question, 
but this bug has been around for a long time.)


On the poland installation of mir, there's a reproducible problem.

For some time (several months), people have been complaining about not
being able to upload images.  i tested image publishing, and i had no
problem, and nobody gave concrete evidence of the
problem (nobody realised that the size of the images was a problem),
so i assumed that people had done something fairly strange and exotic
with their images, or had low bandwidth problems.

i asked for help on #mir anyway, and someone suggested i install the
latest cvs version of mir (about a month or so ago).

i did this. It required some further hacking of templates in etc/ and
some confusion to some indymedia contributors due to changes in the
comments publishing template, but now all seems back to normal (except
for filters, of which some work and others don't, but that's another issue).

Now we have a highly reproducible problem. Jpeg images such as the
one attached give the following error messages and no image file is
stored on the server:


* including the image using the normal user publish interface:

############ ERROR MESSAGE BEGIN
error with attachment: mir.session.SessionFailure: java.lang.NullPointerException
############ ERROR MESSAGE END


* uploading directly from the admin interface:

############ ERROR MESSAGE BEGIN


The system caused an error

This can happen. Even if the following error message is not be comprehensible for you,
it might be helpful to techniczna lista dyskusyjna imc-pl:


2007-04-22 00:10 -- mir.media.MediaExc: java.lang.NullPointerException


mir.media.MediaExc: java.lang.NullPointerException
at mir.media.image.ImageMagickImageProcessor.writeScaledData(ImageMagickImageProcessor.java:370)
at mircoders.entity.EntityImages.setImage(EntityImages.java:78)
at mircoders.media.MediaHandlerImages.store(MediaHandlerImages.java:106)
at mircoders.media.MediaHandlerImages.store(MediaHandlerImages.java:97)
at mircoders.media.MediaUploadProcessor.processMediaUpload(MediaUploadProcessor.java:98)
at mircoders.servlet.ServletModuleUploadedMedia.insert(ServletModuleUploadedMedia.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at mir.servlet.ServletModule.handleRequest(ServletModule.java:134)
at Mir.process(Mir.java:220)
at mir.servlet.AbstractServlet.doPost(AbstractServlet.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)


So please send an e-mail with the red text and detailed information regarding the events that led to this error to techniczna lista dyskusyjna imc-pl. Thanks!


############ ERROR MESSAGE END


JPEG information about the enclosed image:

  700 x 525  24bit Exif  N   10470



i created this image with gimp.


After changing the size to 800 x 600 , the image uploads with no problem.

This is why i suspect the problem is with size.

The first two lines in the trace:

mir.media.MediaExc: java.lang.NullPointerException
at mir.media.image.ImageMagickImageProcessor.writeScaledData(ImageMagickImageProcessor.java:370)

also suggest that ImageMagick has some bug in scaling images of size 
700 x 525 - and presumably of other sizes which people have been trying.


Does anyone have any ideas or clues about this bug or how to solve it?

thanks
boud (imc-pl-tech volunteer)
-------------- section suivante --------------
Une pièce jointe non texte a été nettoyée...
Nom: cms.jpg
Type: image/jpeg
Taille: 10470 octets
Desc: 700 x 525 jpeg image - gives mir error
Url: http://lists.indymedia.org/pipermail/mir-coders/attachments/20070422/7e48738b/attachment.jpg 


More information about the mir-coders mailing list