ktgw0316 / LightZone

LightZone is a photo editor for Mac, Windows, and Linux.
BSD 3-Clause "New" or "Revised" License
320 stars 50 forks source link

DNG file causes crash of LightZone #125

Closed mictadlo closed 10 years ago

mictadlo commented 10 years ago

Hi, I tried to use Lightzone 4, but as soon I click on edit of a DNG picture shot with Pentax K-30, Lightzone crash.

$ lightzone
Starting LightZone version 4.0.0 ...
with options :
This is LightZone 4.0.0 ()
Verifying Libraries
Initializing Engine Utilities
Max Memory: 3629645824
Total Memory: 122683392
Running on 4 processors
Allocating -1125MB for the image cache.
Loading Classes
Scanning Color Profiles
Restoring Preferences
Starting Logging
Scanning Saved Documents
Opening...
Light Crafts JAI Library - 02/05/07
dcraw value: 0
Read 48254976 bytes in 175ms
dcraw value: 0
Read 48254976 bytes in 462ms
Template error: Couldn't access Template "CameraDefault;PENTAX K-30" in /home/mictadlo/LightZone/Templates: /home/mictadlo/LightZone/Templates/CameraDefault;PENTAX K-30.lzt (No such file or directory)
Opening /home/mictadlo/multimedia/photography/pictures/2014/2014-07-22 Adela's birthday/orginal/_IGP5964.DNG
Checking cache for: /home/mictadlo/multimedia/photography/pictures/2014/2014-07-22 Adela's birthday/orginal/_IGP5964.DNG
File not in cache.
metadata width: 4960, height: 3300
dcraw value: 0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fd88701ebab, pid=2772, tid=140567538095872
#
# JRE version: OpenJDK Runtime Environment (7.0_60-b30) (build 1.7.0_60-b30)
# Java VM: OpenJDK 64-Bit Server VM (24.60-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libjava.so+0x18bab]  Java_java_nio_Bits_copyToShortArray+0x1fb
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid2772.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/usr/bin/lightzone: line 35:  2772 Aborted                 ( cd "/opt/lightzone" && LD_PRELOAD="$lzmalibrary" LD_LIBRARY_PATH="/opt/lightzone" exec java -Xmx${maxmem}k -Djava.library.path="/opt/lightzone" -Dfile.encoding=UTF8 -classpath "/opt/lightzone/*" com.lightcrafts.platform.linux.LinuxLauncher ${@} )

How is it possible to fix it?

Thank you in advance.

Mic

mictadlo commented 10 years ago

I installed LightZone version 4.1.0 beta 9 on Manjaro (Arch Linux) 64 Bit and got the following errors by opening this DNG picture (https://drive.google.com/file/d/0B4yXyOMlPkviM0d1THFhNU9hVDA/edit?usp=sharing) :

$ lightzone
Starting LightZone version 4.1.0 beta9 ...
with options :
This is LightZone 4.1.0~beta9 ()
Verifying Libraries
Initializing Engine Utilities
Max Memory: 3629645824
Total Memory: 122683392
Running on 4 processors
Allocating 0MB for the image cache.
Loading Classes
Scanning Color Profiles
Restoring Preferences
Starting Logging
Scanning Saved Documents
Opening...
Light Crafts JAI Library - 02/05/07
dcraw value: 0
Read 48254976 bytes in 297ms
Abort ImageTask--java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
    at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
    at java.util.LinkedList$ListItr.next(LinkedList.java:886)
    at com.lightcrafts.ui.browser.model.ImageDatum.updatePreviews(ImageDatum.java:473)
    at com.lightcrafts.ui.browser.model.ImageDatum.markClean(ImageDatum.java:342)
    at com.lightcrafts.ui.browser.model.ImageTask.run(ImageTask.java:89)
    at com.lightcrafts.ui.browser.model.ImageTaskQueue.run(ImageTaskQueue.java:110)
    at java.lang.Thread.run(Thread.java:745)
dcraw value: 0
dcraw value: 0
Read 48254976 bytes in 504ms
Read 48254976 bytes in 504ms
dcraw value: 0
Read 48254976 bytes in 240ms
dcraw value: 0
Read 48254976 bytes in 448ms
dcraw value: 0
Read 48254976 bytes in 203ms
dcraw value: 0
Read 48254976 bytes in 196ms
dcraw value: 0
Read 48254976 bytes in 184ms
dcraw value: 0
Read 48254976 bytes in 145ms
dcraw value: 0
Read 48254976 bytes in 246ms
dcraw value: 0
Read 48254976 bytes in 148ms
dcraw value: 0
Read 48254976 bytes in 424ms
dcraw value: 0
Read 48254976 bytes in 146ms
dcraw value: 0
Read 48254976 bytes in 150ms
dcraw value: 0
Read 48254976 bytes in 195ms
Opening /home/mictadlo/multimedia/photography/pictures/2014/2014-07-22 Adela's birthday/orginal/_IGP5960.DNG
Checking cache for: /home/mictadlo/multimedia/photography/pictures/2014/2014-07-22 Adela's birthday/orginal/_IGP5960.DNG
File not in cache.
metadata width: 4960, height: 3300
dcraw value: 0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fee30fe9bab, pid=3559, tid=140660584064768
#
# JRE version: OpenJDK Runtime Environment (7.0_60-b30) (build 1.7.0_60-b30)
# Java VM: OpenJDK 64-Bit Server VM (24.60-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libjava.so+0x18bab]  Java_java_nio_Bits_copyToShortArray+0x1fb
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid3559.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/usr/bin/lightzone: line 33:  3559 Aborted                 ( cd $sharedir && LD_LIBRARY_PATH=$sharedir exec java -Xmx${maxmem}k -Djava.library.path=$sharedir -Dfile.encoding=UTF8 -classpath "$sharedir/*" com.lightcrafts.platform.linux.LinuxLauncher ${@} )

Then I tried to run ulimit before starting lightzone, but it is still crashing:

[mictadlo@wp ~]$ ulimit -c unlimited
$ lightzone
Starting LightZone version 4.1.0 beta9 ...
with options :
This is LightZone 4.1.0~beta9 ()
Verifying Libraries
Initializing Engine Utilities
Max Memory: 3629645824
Total Memory: 122683392
Running on 4 processors
Allocating 0MB for the image cache.
Loading Classes
Scanning Color Profiles
Restoring Preferences
Starting Logging
Scanning Saved Documents
Opening...
Light Crafts JAI Library - 02/05/07
dcraw value: 0
Read 48254976 bytes in 247ms
Abort ImageTask--java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
    at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
    at java.util.LinkedList$ListItr.next(LinkedList.java:886)
    at com.lightcrafts.ui.browser.model.ImageDatum.updatePreviews(ImageDatum.java:473)
    at com.lightcrafts.ui.browser.model.ImageDatum.markClean(ImageDatum.java:342)
    at com.lightcrafts.ui.browser.model.ImageTask.run(ImageTask.java:89)
    at com.lightcrafts.ui.browser.model.ImageTaskQueue.run(ImageTaskQueue.java:110)
    at java.lang.Thread.run(Thread.java:745)
dcraw value: 0
dcraw value: 0
Read 48254976 bytes in 549ms
Read 48254976 bytes in 530ms
dcraw value: 0
Read 48254976 bytes in 401ms
dcraw value: 0
Read 48254976 bytes in 170ms
dcraw value: 0
Read 48254976 bytes in 229ms
dcraw value: 0
Read 48254976 bytes in 211ms
dcraw value: 0
Read 48254976 bytes in 158ms
dcraw value: 0
Opening /home/mictadlo/multimedia/photography/pictures/2014/2014-07-22 Adela's birthday/orginal/_IGP5960.DNG
Checking cache for: /home/mictadlo/multimedia/photography/pictures/2014/2014-07-22 Adela's birthday/orginal/_IGP5960.DNG
File not in cache.
metadata width: 4960, height: 3300
Read 48254976 bytes in 306ms
dcraw value: 0
dcraw value: 0
#
# A fatal error has been detected by the Java Runtime Environment:
#
# C  [libjava.so+0x18bab]  Java_java_nio_Bits_copyToShortArray+0x1fb
#
# Core dump written. Default location: /opt/lightzone/core or core.3723
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid3723.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/usr/bin/lightzone: line 33:  3723 Aborted                 ( cd $sharedir && LD_LIBRARY_PATH=$sharedir exec java -Xmx${maxmem}k -Djava.library.path=$sharedir -Dfile.encoding=UTF8 -classpath "$sharedir/*" com.lightcrafts.platform.linux.LinuxLauncher ${@} )
ktgw0316 commented 10 years ago

I think this is a bug in the versions of openjdk-7/8. Anyway, I've just committed a fix for this issue.