Maybe upgrading to a newer version of jmimemagic will fix the problem.
To reproduce, create a big file with a funky extension:
dd if=/dev/zero of=/tmp/file-050MB.funky bs=1048576 count=50
And then drag and drop it using the firefox plugin to some workspace.
Here is the log excerpt leading to the memory exception:
18:27:51,162 INFO [MagicParser] endElement(): not adding invalid matcher 'ASCII,'
18:27:51,163 INFO [MagicParser] endElement(): not adding invalid matcher 'continuation,'
18:27:51,164 INFO [MagicParser] endElement(): not adding invalid matcher 'extra field,'
18:27:51,165 INFO [MagicParser] endElement(): not adding invalid matcher 'original filename,'
18:27:51,165 INFO [MagicParser] endElement(): not adding invalid matcher 'comment,'
18:27:51,166 INFO [MagicParser] endElement(): not adding invalid matcher 'encrypted,'
18:27:51,217 INFO [MagicParser] endElement(): not adding invalid matcher 'interlaced'
18:27:51,259 INFO [MagicParser] endElement(): not adding invalid matcher '%s'
18:27:51,261 INFO [MagicParser] endElement(): not adding invalid matcher '%s'
18:27:51,284 INFO [MagicParser] endElement(): not adding invalid matcher 'POSIX'
18:27:51,346 INFO [MagicParser] endElement(): not adding invalid matcher 'Windows 3.x format'
18:27:51,360 INFO [MagicParser] endElement(): not adding invalid matcher 'Windows 3.x format'
18:27:51,390 INFO [MagicParser] endElement(): not adding invalid matcher 'SGI'
18:28:32,267 INFO [CacheManager] resizeAll size=6
18:28:38,275 INFO [CacheManager] resizeAll size=6
18:28:39,186 INFO [IndexingThreadPool] Indexing thread pool will be initialized with a size pool @ 5
18:28:39,194 INFO [IndexingThreadPool] Indexing Thread Pool initialized...
18:28:39,375 INFO [CacheManager] resizeAll size=10
18:28:54,115 ERROR [IndexingSingleDocumentTask] failed to index document with ref: '56435e93-3e27-4e02-82c6-6f5c072f74d6': null
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393)
- is duplicated by
-
NXP-2738 scaning big blobs for html patterns leads to OutOfMemoryError
- Resolved