Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-13059

NPE when converting a file with bytes that are not encoded in UTF-8 nor in ASCII

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8
    • Fix Version/s: 5.8.0-HF01, 5.9.1
    • Component/s: Convert

      Description

      Typically in the Drive test test_integration_synchronization.py.test_binding_synchronization_empty_start with the '\x80' byte.

      We get the following stacktrace:

      2013-10-30 18:08:57,698 WARN  [Nuxeo-Work-default-2] [org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory] Cannot compute document thumbnail
      java.lang.NullPointerException
      	at org.nuxeo.ecm.platform.convert.plugins.UTF8CharsetConverter.detectEncoding(UTF8CharsetConverter.java:96)
      	at org.nuxeo.ecm.platform.convert.plugins.UTF8CharsetConverter.convert(UTF8CharsetConverter.java:78)
      	at org.nuxeo.ecm.platform.convert.plugins.UTF8CharsetConverter.convert(UTF8CharsetConverter.java:58)
      	at org.nuxeo.ecm.platform.convert.plugins.JODBasedConverter.convert(JODBasedConverter.java:194)
      	at org.nuxeo.ecm.core.convert.extension.ChainedConverter.convertBasedSubConverters(ChainedConverter.java:86)
      	at org.nuxeo.ecm.core.convert.extension.ChainedConverter.convert(ChainedConverter.java:64)
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:168)
      	at org.nuxeo.ecm.platform.thumbnail.converter.AnyToThumbnailConverter.convert(AnyToThumbnailConverter.java:88)
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:168)
      	at org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory.computeThumbnail(ThumbnailDocumentFactory.java:86)
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailServiceImpl.computeThumbnail(ThumbnailServiceImpl.java:100)
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailAdapter.computeThumbnail(ThumbnailAdapter.java:57)
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.processDoc(UpdateThumbnailListener.java:47)
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.handleEvent(UpdateThumbnailListener.java:94)
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:157)
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:65)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      2013-10-30 18:08:58,248 WARN  [Nuxeo-Work-default-1] [org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory] Cannot compute document thumbnail
      java.lang.NullPointerException
      	at org.nuxeo.ecm.platform.convert.plugins.UTF8CharsetConverter.detectEncoding(UTF8CharsetConverter.java:96)
      	at org.nuxeo.ecm.platform.convert.plugins.UTF8CharsetConverter.convert(UTF8CharsetConverter.java:78)
      	at org.nuxeo.ecm.platform.convert.plugins.UTF8CharsetConverter.convert(UTF8CharsetConverter.java:58)
      	at org.nuxeo.ecm.platform.convert.plugins.JODBasedConverter.convert(JODBasedConverter.java:194)
      	at org.nuxeo.ecm.core.convert.extension.ChainedConverter.convertBasedSubConverters(ChainedConverter.java:86)
      	at org.nuxeo.ecm.core.convert.extension.ChainedConverter.convert(ChainedConverter.java:64)
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:168)
      	at org.nuxeo.ecm.platform.thumbnail.converter.AnyToThumbnailConverter.convert(AnyToThumbnailConverter.java:88)
      	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:168)
      	at org.nuxeo.ecm.platform.thumbnail.factories.ThumbnailDocumentFactory.computeThumbnail(ThumbnailDocumentFactory.java:86)
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailServiceImpl.computeThumbnail(ThumbnailServiceImpl.java:100)
      	at org.nuxeo.ecm.core.api.thumbnail.ThumbnailAdapter.computeThumbnail(ThumbnailAdapter.java:57)
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.processDoc(UpdateThumbnailListener.java:47)
      	at org.nuxeo.ecm.platform.thumbnail.listener.UpdateThumbnailListener.handleEvent(UpdateThumbnailListener.java:94)
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:157)
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:65)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: