Bug 1350210

Summary: [abrt] ufraw: lfModifier::~lfModifier(): ufraw killed by SIGSEGV
Product: [Fedora] Fedora Reporter: moravcik
Component: ufrawAssignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: antonio.montagnani, dbhole, francocomida, nicubunu, nphilipp, sergio
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/e57189e608d38f7932290d3951abbac284a063b1
Whiteboard: abrt_hash:7dfe7acc70aaca35efda68b362a7f690458f3a5f;
Fixed In Version: ufraw-0.22-4.fc25 ufraw-0.22-4.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-28 20:20:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: mountinfo
none
File: namespaces
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages
none
Test bed file none

Description moravcik 2016-06-26 13:28:25 UTC
Description of problem:
I have worked with NEF file and when passing result to Gimp (using the button in the bottom right corner of the Ufraw window)
it crashed and an Oops dialog appeared.
BTW, Using ufraw-gimp-plugin also crashed at the last step with message: Procedure 'file-ufraw-load' returned no return values

Version-Release number of selected component:
ufraw-0.22-1.fc24

Additional info:
reporter:       libreport-2.7.1
backtrace_rating: 4
cmdline:        ufraw
crash_function: lfModifier::~lfModifier
executable:     /usr/bin/ufraw
global_pid:     5806
kernel:         4.5.7-300.fc24.x86_64
pkg_fingerprint: 73BD E983 81B4 6521
pkg_vendor:     Fedora Project
reproducible:   Not sure how to reproduce the problem
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (6 frames)
 #0 lfModifier::~lfModifier at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:270
 #1 lfModifier::Destroy at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:143
 #2 lf_modifier_destroy at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:308
 #3 ufraw_close at ufraw_ufraw.c:770
 #4 ufraw_preview at ufraw_preview.c:5970
 #5 ufraw_chooser at ufraw_chooser.c:162

Comment 1 moravcik 2016-06-26 13:28:30 UTC
Created attachment 1172542 [details]
File: backtrace

Comment 2 moravcik 2016-06-26 13:28:31 UTC
Created attachment 1172543 [details]
File: cgroup

Comment 3 moravcik 2016-06-26 13:28:32 UTC
Created attachment 1172545 [details]
File: core_backtrace

Comment 4 moravcik 2016-06-26 13:28:34 UTC
Created attachment 1172546 [details]
File: dso_list

Comment 5 moravcik 2016-06-26 13:28:35 UTC
Created attachment 1172547 [details]
File: environ

Comment 6 moravcik 2016-06-26 13:28:37 UTC
Created attachment 1172548 [details]
File: exploitable

Comment 7 moravcik 2016-06-26 13:28:38 UTC
Created attachment 1172549 [details]
File: limits

Comment 8 moravcik 2016-06-26 13:28:40 UTC
Created attachment 1172550 [details]
File: maps

Comment 9 moravcik 2016-06-26 13:28:41 UTC
Created attachment 1172551 [details]
File: mountinfo

Comment 10 moravcik 2016-06-26 13:28:43 UTC
Created attachment 1172552 [details]
File: namespaces

Comment 11 moravcik 2016-06-26 13:28:44 UTC
Created attachment 1172553 [details]
File: open_fds

Comment 12 moravcik 2016-06-26 13:28:45 UTC
Created attachment 1172554 [details]
File: proc_pid_status

Comment 13 moravcik 2016-06-26 13:28:47 UTC
Created attachment 1172555 [details]
File: var_log_messages

Comment 14 Sergio Basto 2016-06-27 00:35:57 UTC
(In reply to moravcik from comment #0)
> Truncated backtrace:
> Thread no. 1 (6 frames)
>  #0 lfModifier::~lfModifier at
> /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:270
>  #1 lfModifier::Destroy at
> /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:143
>  #2 lf_modifier_destroy at
> /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:308
>  #3 ufraw_close at ufraw_ufraw.c:770
>  #4 ufraw_preview at ufraw_preview.c:5970
>  #5 ufraw_chooser at ufraw_chooser.c:162

It is clearly a crash on close , with lensfun involved , btw do you have also installed gimp-lensfun ? do you get this crash often ?

Comment 15 moravcik 2016-06-27 07:54:13 UTC
(In reply to Sergio Monteiro Basto from comment #14)
> (In reply to moravcik from comment #0)
> > Truncated backtrace:
> > Thread no. 1 (6 frames)
> >  #0 lfModifier::~lfModifier at
> > /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:270
> >  #1 lfModifier::Destroy at
> > /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:143
> >  #2 lf_modifier_destroy at
> > /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:308
> >  #3 ufraw_close at ufraw_ufraw.c:770
> >  #4 ufraw_preview at ufraw_preview.c:5970
> >  #5 ufraw_chooser at ufraw_chooser.c:162
> 
> It is clearly a crash on close , with lensfun involved , btw do you have
> also installed gimp-lensfun ? do you get this crash often ?

Every attempt (about 10) after installing Fedora 24 ended with a crash.
After your message I installed gimp-lensfun and there is a slight change in
the ufraw behaviour: when sending result to Gimp - Gimp starts, progress bar 
is running and then I get an error dialog:
"Opening '/tmp/DSC_4925.NEF_8RTSJY.ufraw' failed: Procedure 'file-ufraw-load' returned no return values"
There was no change in ufraw-gimp behaviour.

Comment 16 Sergio Basto 2016-07-02 23:00:06 UTC
Goggling around https://bugzilla.redhat.com/show_bug.cgi?id=947988#c8 says:

Sorry forgot to add, as mentioned above downgrading lensfun to 0.2.5-6 does restore functionality.

Could be again ufraw/lensfun vector , I may do one build in copr , may you try one build without lensfun support ?

Comment 17 moravcik 2016-07-03 23:47:27 UTC
(In reply to Sergio Monteiro Basto from comment #16)
> Goggling around https://bugzilla.redhat.com/show_bug.cgi?id=947988#c8 says:
> 
> Sorry forgot to add, as mentioned above downgrading lensfun to 0.2.5-6 does
> restore functionality.
> 
> Could be again ufraw/lensfun vector , I may do one build in copr , may you
> try one build without lensfun support ?

I didn't try downgrade yet, tomorrow I will check the other computer with Fedora 23 for the lensfun version (though it is 32bit distro). The last version on F23 x86_64 worked (I used it about a month ago and I update imediately when I find new updates).

If you can provide the build I will test it. I don't have any experience with the copr yet - I believe you mean copr.fedorainfracloud.org.

Comment 18 moravcik 2016-07-05 17:40:47 UTC
(In reply to Sergio Monteiro Basto from comment #16)
> Goggling around https://bugzilla.redhat.com/show_bug.cgi?id=947988#c8 says:
> 
> Sorry forgot to add, as mentioned above downgrading lensfun to 0.2.5-6 does
> restore functionality.
> 
> Could be again ufraw/lensfun vector , I may do one build in copr , may you
> try one build without lensfun support ?

Oldest lensfun version present in Fedora 24 x86_64 repos is 0.3.0 so I can't try version 0.2.5-6.
On Fedora 22 32 bit (I misspoke in the last reply) I have ufraw working with these installed packages:
gimp.i686         2:2.8.16-1.fc22  @updates
lensfun.i686      0.3.0-6.fc22     @updates
ufraw-common.i686 0.21-1.fc22      @updates
ufraw-gimp.i686   0.21-1.fc22      @updates

Current workaround: 
1. Save edited image creates a ppm file (and crashes too - I'm not sure whether I should file new crash report or just mention it here),
2. convert file.ppm file.png
3. Open file.png in GIMP and do the rest of the editing work.

Comment 19 moravcik 2016-07-05 18:27:25 UTC
Sorry for all the comments.
Ufraw crashes after clicking on ANY of these buttons: Cancel, Save, Send-to-GIMP, X - close the application in the upper right corner of window (depending on the current window manager theme) although after clicking to Save the ppm image is saved successfully (as mentioned above).
System always offers sending crash report - should I do it for all the cases (read: clicking on each button)? Can it help to find the common denominator of the crashes?

Comment 20 Sergio Basto 2016-07-05 23:37:42 UTC
thanks for all reports , feel free to send more , works with lensfun.i686      0.3.0-6.fc22  , but on F24 we have 0.3.2 , so you still don't exclude a lensfun incompatibility ? , soon I have a little spare time I will send build (with lensfun) to copr ...

Comment 21 Sergio Basto 2016-07-09 16:47:32 UTC
*** Bug 1354112 has been marked as a duplicate of this bug. ***

Comment 22 Sergio Basto 2016-07-12 16:25:42 UTC
Antoni or Moravcik can you test this builds [1]? :

https://copr.fedorainfracloud.org/coprs/sergiomb/builds_for_Stable_Releases/build/380090/

and report it back ? 

[1] 

    dnf copr enable sergiomb/builds_for_Stable_Releases 
    dnf update ufraw

Comment 23 antonio montagnani 2016-07-12 18:39:58 UTC
from the very first tests, it seems to work, at least when opening a PEF file from a Pentax Dslr

Comment 24 moravcik 2016-07-12 22:56:52 UTC
(In reply to Sergio Monteiro Basto from comment #22)
> Antoni or Moravcik can you test this builds [1]? :
> 
> https://copr.fedorainfracloud.org/coprs/sergiomb/builds_for_Stable_Releases/
> build/380090/
> 
> and report it back ? 
> 
> [1] 
> 
>     dnf copr enable sergiomb/builds_for_Stable_Releases 
>     dnf update ufraw

I can confirm success on both ufraw and ufraw-gimp-plugin from your build. 
No crashes on Cancel, Save or Send-to-gimp. Passing result to GIMP work in 
both the ufraw program and the plugin, also saving image to ppm file seems to give correct output. Tested on VM Fedora 24 x86_64 with NEF file from Nikon dslr.

I'm happy this worked and if there's anything more I should do about it, please let me know.

Comment 25 Sergio Basto 2016-07-13 02:30:53 UTC
(In reply to moravcik from comment #24)

> I'm happy this worked and if there's anything more I should do about it,
> please let me know.

I'm happy too, as workaround I'm building officially the same package (without lensfun) , we checked Debian , also have the same problem [1], I will see where it is fixed  


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787569

Comment 26 Fedora Update System 2016-07-13 02:49:32 UTC
ufraw-0.22-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ff63d7ba2f

Comment 27 Fedora Update System 2016-07-14 01:55:02 UTC
ufraw-0.22-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ff63d7ba2f

Comment 28 Nils Philippsen 2016-07-17 20:53:24 UTC
Sorry for showing up late, but I didn't have the time to look at this earlier. Sergio, thanks for taking up the slack :).

I'm not very happy about working around this issue by building without lensfun, because it removes a feature that I believe many users use. On the other hand, I accept that this is better than ufraw crashing left and right until we have a real fix ;).

In order to get to the bottom of this, here's the (IMO) relevant part of the backtrace:

--- 8< ---
Thread 1 (Thread 0x7feb7260ca40 (LWP 5806)):
#0  lfModifier::~lfModifier (this=0x0, __in_chrg=<optimized out>) at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:270
No locals.
#1  0x00007feb716039c9 in lfModifier::Destroy (this=0x0) at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:143
No locals.
#2  0x00007feb71603a65 in lf_modifier_destroy (modifier=<optimized out>) at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:308
No locals.
#3  0x00005624b150ac5a in ufraw_close (uf=uf@entry=0x5624b320eaf0) at ufraw_ufraw.c:770
No locals.
--- >8 ---

Looking at frame #1, here this is NULL, this means that lf_modifier_destroy() is called with a NULL value in frame #3 -- frame #2 is just a C-API wrapper around the C++ code of the library. Here's the affected code from frame #3:

--- 8< ---
void ufraw_close(ufraw_data *uf)
{
    ...
#ifdef HAVE_LENSFUN
    lf_modifier_destroy(uf->TCAmodifier);  <-- line 770, where the crash happens
    lf_modifier_destroy(uf->modifier);
#endif
--- >8 ---

I've skimmed over the rest of code that touches on ->TCAmodifier (and ->modifier) and didn't find that it's safe to assume that these members are always set. To me, the code should first check that the relevant members are not NULL before attempting to destroy the object. What do you think, Sergio?

Comment 29 Sergio Basto 2016-07-17 21:47:31 UTC
This is temporary fix "until we find a fix". 
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787569 and other reports is not just a crash also result in artifacts in some images ... so shouldn't be so easy to fix . 

I just report it upstream: https://sourceforge.net/p/ufraw/bugs/406/

Comment 30 Nils Philippsen 2016-07-29 17:58:18 UTC
*** Bug 1348725 has been marked as a duplicate of this bug. ***

Comment 31 Sergio Basto 2016-07-29 20:17:16 UTC
Nils Philippsen, may I or should I , push the package to stable ? upstream didn't reply yet !

Comment 32 Fedora Update System 2016-08-02 19:54:12 UTC
ufraw-0.22-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 33 Nils Philippsen 2016-10-10 07:08:46 UTC
Hey Sergio, any news on this with regards to a "real" fix, i.e. one that restores lensfun functionality?

Comment 34 Sergio Basto 2016-10-10 16:55:14 UTC
http://ufraw.cvs.sourceforge.net/viewvc/ufraw/ufraw/?sortby=date#dirlist

we have 2 patches in cvs , 
1 - Add patches to use RGB channel multipliers from ID file and implement noExit option. The Cancel button acts as Quit when noExit is set. Patches were found in the ufraw-devel archive.

2 - Fix bug #407: Wrong variable type for find_green() return value.

First patch mention cancel, so maybe we may try apply it on rpm package, enable lensfun again and send the package to updates-testing. 

what do you think Nils ?

Comment 35 Nils Philippsen 2016-10-15 00:35:21 UTC
Do you mean both changes? I don't see how the second one is related, but you have been more involved in this issue... Anyway, sounds good to me.

Comment 36 Sergio Basto 2016-10-25 17:40:49 UTC
*** Bug 1366860 has been marked as a duplicate of this bug. ***

Comment 37 Fedora Update System 2016-10-26 20:32:27 UTC
ufraw-0.22-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-30400a011c

Comment 38 Fedora Update System 2016-10-26 22:26:18 UTC
ufraw-0.22-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce93091901

Comment 39 Sergio Basto 2016-10-27 03:18:30 UTC
Antonio and  Nicu Buculei can you test this new version ? please

Comment 40 antonio montagnani 2016-10-27 05:32:57 UTC
No, just tried nut it doesn't work for me.

When I exit from Ufraw Gimp says:
Opening of /home/antonio/Immagini/xxx.PEF failed. Procedure "file-ufraw-load" has not given return values.

(not sure of translation)

Comment 41 antonio montagnani 2016-10-27 05:36:34 UTC
another comment: I tried Ufraw stand-alone but it crashes very often and in a really short time.

Comment 42 Sergio Basto 2016-10-27 18:00:46 UTC
(In reply to antonio montagnani from comment #41)
> another comment: I tried Ufraw stand-alone but it crashes very often and in
> a really short time.

can you backtrace Ufraw stand-alone with dbg ? 


   dnf debuginfo-install ufraw-0.22-3
   gdb ufraw 
   run DSC_5388.NEF

after crash 

   bt

Comment 43 antonio montagnani 2016-10-27 20:33:02 UTC
dnf debuginfo-install ufraw-0.22-3
abilitazione del repository rpmfusion-free-updates-debuginfo
abilitazione del repository fedora-debuginfo
abilitazione del repository rpmfusion-nonfree-debuginfo
abilitazione del repository updates-debuginfo
abilitazione del repository rpmfusion-nonfree-updates-debuginfo
abilitazione del repository rpmfusion-free-debuginfo
Fedora 24 - x86_64 - Test Updates Debug         1.5 MB/s | 1.3 MB     00:00    
Ultima verifica della scadenza dei metadati: 0:00:02 fa il Thu Oct 27 22:30:48 2016.
Dipendenze risolte.
Niente da fare
Completo!

why??? I cant' install it

Comment 44 Sergio Basto 2016-10-27 21:06:16 UTC
gdb give you the right command , should be: 

dnf debuginfo-install ufraw-0.22-3.fc24.x86_64

Comment 45 Sergio Basto 2016-10-27 21:07:25 UTC
or 
dnf debuginfo-install --enablerepo=updates-testing  ufraw-0.22-3.fc24.x86_64

Comment 46 antonio montagnani 2016-10-28 06:05:34 UTC
gdb ufraw 
GNU gdb (GDB) Fedora 7.11.1-86.fc24
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ufraw...Reading symbols from /usr/lib/debug/usr/bin/ufraw.debug...done.
done.
(gdb) run IMGP3168.PEF
Starting program: /usr/bin/ufraw IMGP3168.PEF
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe3885700 (LWP 3687)]
[New Thread 0x7fffe3084700 (LWP 3688)]
[New Thread 0x7fffe2666700 (LWP 3689)]
[New Thread 0x7fffe1e65700 (LWP 3690)]
[New Thread 0x7fffe1661700 (LWP 3691)]
[New Thread 0x7fffe0e60700 (LWP 3692)]
[New Thread 0x7fffcbfff700 (LWP 3693)]
[Thread 0x7fffcbfff700 (LWP 3693) exited]
[Thread 0x7fffe1661700 (LWP 3691) exited]
[Thread 0x7fffe0e60700 (LWP 3692) exited]
[Thread 0x7fffe2666700 (LWP 3689) exited]
[New Thread 0x7fffe0e60700 (LWP 3695)]
[New Thread 0x7fffe2666700 (LWP 3696)]
[New Thread 0x7fffe1661700 (LWP 3697)]
[Thread 0x7fffe1e65700 (LWP 3690) exited]
[New Thread 0x7fffe1e65700 (LWP 3699)]
[New Thread 0x7fffcbfff700 (LWP 3700)]

Thread 1 "ufraw" received signal SIGSEGV, Segmentation fault.
lfModifier::~lfModifier (this=0x0, __in_chrg=<optimized out>)
    at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:270
270	    free_callback_list (SubpixelCallbacks);
Missing separate debuginfos, use: dnf debuginfo-install PackageKit-gtk3-module-1.1.3-2.fc24.x86_64 adwaita-gtk2-theme-3.20.2-1.fc24.x86_64 gvfs-client-1.28.3-1.fc24.x86_64 libcanberra-0.30-11.fc24.x86_64 libcanberra-gtk2-0.30-11.fc24.x86_64 libogg-1.3.2-5.fc24.x86_64 libtdb-1.3.9-1.fc24.x86_64 libtool-ltdl-2.4.6-12.fc24.x86_64 libvorbis-1.3.4-6.fc24.x86_64
(gdb) bt
#0  lfModifier::~lfModifier (this=0x0, __in_chrg=<optimized out>)
    at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:270
#1  0x00007ffff6fb59c9 in lfModifier::Destroy (this=0x0)
    at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:143
#2  0x00007ffff6fb5a65 in lf_modifier_destroy (modifier=<optimized out>)
    at /usr/src/debug/lensfun-0.3.2/libs/lensfun/modifier.cpp:308
#3  0x00005555555f8c5a in ufraw_close (uf=uf@entry=0x555555a8a950)
    at ufraw_ufraw.c:770
#4  0x000055555563a1c0 in ufraw_preview (uf=0x555555a8a950, rc=0x7ffffffdd350, 
    plugin=0, save_func=<optimized out>) at ufraw_preview.c:5975
#5  0x00005555555f3977 in main (argc=<optimized out>, argv=<optimized out>)
    at ufraw.c:143
(gdb)

Comment 47 antonio montagnani 2016-10-28 06:09:46 UTC
Forgot to add my comment:

Ufraw works and let me modify the image, it crashes when I click on Save button (but image is saved)

Comment 48 Sergio Basto 2016-10-30 03:47:24 UTC
(In reply to antonio montagnani from comment #46)
(...)
(gdb) run IMGP3168.PEF
(...) 

I don't know if is ask too much but can you send me, offlist , one image that crash with ufraw ?  too see if is the image problem ? I also could do other tests ...   

We have other reports that can use ufraw with lensfun without any problem, I also don't had any problem .

Comment 49 antonio montagnani 2016-10-30 05:34:49 UTC
Created attachment 1215496 [details]
Test bed file

If file extension is PEF it crashes, if extension is DGN it is ok. Already reported, I have to find teh work-around

Comment 50 antonio montagnani 2016-10-30 06:19:00 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1015796

I have found it, please check if it was solved. Have a look at comment #15.

But now Ufraw crashes also after saving as jpeg file.

Comment 51 Sergio Basto 2016-10-30 17:44:52 UTC
*** Bug 1015796 has been marked as a duplicate of this bug. ***

Comment 52 Sergio Basto 2016-10-30 18:35:29 UTC
(In reply to antonio montagnani from comment #47)
> Forgot to add my comment:
> 
> Ufraw works and let me modify the image, it crashes when I click on Save
> button (but image is saved)

I press saved and [Inferior 1 (process 11370) exited normally]
wrote IMGP3168.ppm , if is what you mean ... 

(In reply to antonio montagnani from comment #50)
> https://bugzilla.redhat.com/show_bug.cgi?id=1015796
> 
> I have found it, please check if it was solved. Have a look at comment #15.
> 
> But now Ufraw crashes also after saving as jpeg file.

how you save as a jpeg file ?  I used "export as" .jpeg in gimp and no problem.

In ufraw after load img, I press cancel and no problem. 

my configuration: 
<?xml version="1.0" encoding="utf-8"?>
<UFRaw Version='7'>
  <WB>Camera WB</WB>
  <WBFineTuning>0</WBFineTuning>
  <Temperature>4768</Temperature>
  <Green>1.060</Green>
  <ChannelMultipliers>1.818182 1.000000 1.450758 1.000000</ChannelMultipliers>
  <Lensfun>
    <LensModel>Pentax, smc Pentax-DA 50-200mm f/4-5.6 DA ED</LensModel>
    <Vignetting Index='6th order polynomial'>
      <Model Label='6th order polynomial'>
        <k1>-0.03124</k1>
        <k2>-0.15160</k2>
        <k3>0.02787</k3>
      </Model>
    </Vignetting>
    <Distortion Index='3rd order polynomial'>
      <Model Label='3rd order polynomial'>
        <k1>0.007685</k1>
      </Model>
    </Distortion>
    <LensGeometry>Rectilinear</LensGeometry>
  </Lensfun>
<Shrink>5</Shrink>
<BaseLinearCurve Current='yes'>
</BaseLinearCurve>
<LinearCurve Current='yes'>
</LinearCurve>
<MatrixInputProfile Current='yes'>Color matrix
</MatrixInputProfile>
<sRGBOutputProfile Current='yes'>sRGB
</sRGBOutputProfile>
<SystemDisplayProfile Current='yes'>System default
</SystemDisplayProfile>
<Make>Pentax</Make>
<Model>K-x</Model>
</UFRaw>

have you a custom configuration ? just a guess .

Comment 53 antonio montagnani 2016-10-30 22:57:25 UTC
(In reply to Sergio Monteiro Basto from comment #52)
> (In reply to antonio montagnani from comment #47)
> > Forgot to add my comment:
> > 
> > Ufraw works and let me modify the image, it crashes when I click on Save
> > button (but image is saved)
> 
> I press saved and [Inferior 1 (process 11370) exited normally]
> wrote IMGP3168.ppm , if is what you mean ... 
> 
> (In reply to antonio montagnani from comment #50)
> > https://bugzilla.redhat.com/show_bug.cgi?id=1015796
> > 
> > I have found it, please check if it was solved. Have a look at comment #15.
> > 
> > But now Ufraw crashes also after saving as jpeg file.
> 
> how you save as a jpeg file ?  I used "export as" .jpeg in gimp and no
> problem.
> 
> In ufraw after load img, I press cancel and no problem. 
> 
> my configuration: 
> <?xml version="1.0" encoding="utf-8"?>
> <UFRaw Version='7'>
>   <WB>Camera WB</WB>
>   <WBFineTuning>0</WBFineTuning>
>   <Temperature>4768</Temperature>
>   <Green>1.060</Green>
>   <ChannelMultipliers>1.818182 1.000000 1.450758
> 1.000000</ChannelMultipliers>
>   <Lensfun>
>     <LensModel>Pentax, smc Pentax-DA 50-200mm f/4-5.6 DA ED</LensModel>
>     <Vignetting Index='6th order polynomial'>
>       <Model Label='6th order polynomial'>
>         <k1>-0.03124</k1>
>         <k2>-0.15160</k2>
>         <k3>0.02787</k3>
>       </Model>
>     </Vignetting>
>     <Distortion Index='3rd order polynomial'>
>       <Model Label='3rd order polynomial'>
>         <k1>0.007685</k1>
>       </Model>
>     </Distortion>
>     <LensGeometry>Rectilinear</LensGeometry>
>   </Lensfun>
> <Shrink>5</Shrink>
> <BaseLinearCurve Current='yes'>
> </BaseLinearCurve>
> <LinearCurve Current='yes'>
> </LinearCurve>
> <MatrixInputProfile Current='yes'>Color matrix
> </MatrixInputProfile>
> <sRGBOutputProfile Current='yes'>sRGB
> </sRGBOutputProfile>
> <SystemDisplayProfile Current='yes'>System default
> </SystemDisplayProfile>
> <Make>Pentax</Make>
> <Model>K-x</Model>
> </UFRaw>
> 
> have you a custom configuration ? just a guess .

I have a pretty standard configuration.

I repeat once again my standard workflow.

When I click on a raw file I should get the opening of the Ufraw-gimp, I work on the curve, color, saturation and whatever I need. Then I click on OK on the right bottom of the ufraw plugin, I Gimp starts....in Gimp if I click on Save I get a xcf image, If I use export as I get a jpeg image or some other extension.

I am surprised that you can work on a PEF file, as I could reproduce this behaviour (I mean the crash) on three different machines, as in the old bug ...I assume that from ufraw-0.22-2. to -3 only changes connected to lensfun have been included. But what surprises me more is that I cannot include the workaround of the other guy about the *magic line deletion.

so only to resume - only for PEF files
1) Ufraw (as standalone) works and save any extension of image, then closes (and I get also the horrible message Oops it seems that ufraw crashed- and  a report has been sent - I do not where, but it is not a my problem-
2) UFraw-plugin try to open Gimp but I get the message already reported in my comment #40

I note that the other Italian guy that suggested the work-around was disappointed and left the bug alone (and I think that he left Fedora)

No idea how to help from hereon

Comment 54 antonio montagnani 2016-10-31 06:34:36 UTC
My situation now is similar to what reported in comment #18

And this is my setting file

<?xml version="1.0" encoding="utf-8"?>
<UFRaw Version='7'>
<LiveExpander>0</LiveExpander>
<WindowMaximized>1</WindowMaximized>
  <WB>Camera WB</WB>
  <WBFineTuning>0</WBFineTuning>
  <Temperature>5057</Temperature>
  <Green>0.950</Green>
  <ChannelMultipliers>2.000000 1.000000 1.465385 1.000000</ChannelMultipliers>
  <Lensfun>
    <LensModel>Pentax, smc Pentax-DA 50-200mm f/4-5.6 DA ED</LensModel>
    <Vignetting Index='6th order polynomial'>
      <Model Label='6th order polynomial'>
        <k1>-0.91939</k1>
        <k2>0.75398</k2>
        <k3>-0.30244</k3>
      </Model>
    </Vignetting>
    <Distortion Index='3rd order polynomial'>
      <Model Label='3rd order polynomial'>
        <k1>0.007685</k1>
      </Model>
    </Distortion>
    <LensGeometry>Rectilinear</LensGeometry>
  </Lensfun>
<Exposure>1.455811</Exposure>
<AutoExposure>1</AutoExposure>
<Saturation>1.310000</Saturation>
<Size>857</Size>
<BaseLinearCurve Current='yes'>
</BaseLinearCurve>
<ManualCurve Current='yes'>
	<AnchorXY>0.020233 0.000000</AnchorXY>
	<AnchorXY>0.403922 0.549738</AnchorXY>
	<AnchorXY>1.000000 1.000000</AnchorXY>
</ManualCurve>
<MatrixInputProfile Current='yes'>Color matrix
</MatrixInputProfile>
<sRGBOutputProfile Current='yes'>sRGB
</sRGBOutputProfile>
<SystemDisplayProfile Current='yes'>System default
</SystemDisplayProfile>
<Make>Pentax</Make>
<Model>K-x</Model>
</UFRaw>


On my side I do not see any improvement since last July

Comment 55 Sergio Basto 2016-10-31 17:43:26 UTC
Hi, 
Thanks for all details , my tests was on F23 sorry , now I can reproduce the problem on my F25 test machine , like you said every time we close ufraw , pop-ups one error message. 
I will see, if I can fix the problem and I will report back give me some days please.

Thanks.

Comment 56 antonio montagnani 2016-10-31 20:14:28 UTC
May I help with additional tests??

Comment 57 Sergio Basto 2016-12-13 01:10:06 UTC
Hi, 
(In reply to antonio montagnani from comment #56)
> May I help with additional tests??

No , the samples that I have are enough. 
I'm writing just to add one update, by accident lensfun was also be updated in f23 from 0.3.1 to 0.3.2 . we are rebuilding package that depend on it and I had test it ufraw-0.22 and in F23 these crashes doesn't happened, in F24 with last update of lensfun still crash ... .

I don't understand, same version of lensfun, ufraw and gimp and works in F23 and does not work in F24+ (also crash in F25) .

Comment 58 Franco Comida 2016-12-17 08:26:41 UTC
ufraw-batch crashes here in f24. 
ufraw-0.22-3.f24.x86_64, lensfun-0.32-5.f24.x86_64

My fix:

--- ufraw_ufraw.c   2015-06-16 05:58:38.000000000 +0200
+++ ufraw_ufraw.c.new   2016-12-17 09:16:41.242035579 +0100
@@ -767,8 +767,10 @@
     g_free(uf->displayProfile);
     g_free(uf->RawHistogram);
 #ifdef HAVE_LENSFUN
-    lf_modifier_destroy(uf->TCAmodifier);
-    lf_modifier_destroy(uf->modifier);
+    if (uf->TCAmodifier != NULL)
+        lf_modifier_destroy(uf->TCAmodifier);
+    if (uf->modifier != NULL)
+        lf_modifier_destroy(uf->modifier);
 #endif
     ufobject_delete(uf->conf->ufobject);
     g_free(uf->conf);

Comment 59 Fedora Update System 2016-12-18 03:32:05 UTC
ufraw-0.22-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b2ef7d32a8

Comment 60 Fedora Update System 2016-12-18 03:34:04 UTC
ufraw-0.22-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-90fa445d23

Comment 61 Sergio Basto 2016-12-18 03:54:58 UTC
(In reply to Franco Comida from comment #58)
> ufraw-batch crashes here in f24. 
> ufraw-0.22-3.f24.x86_64, lensfun-0.32-5.f24.x86_64
> 
> My fix:
> 
> --- ufraw_ufraw.c   2015-06-16 05:58:38.000000000 +0200
> +++ ufraw_ufraw.c.new   2016-12-17 09:16:41.242035579 +0100
> @@ -767,8 +767,10 @@
>      g_free(uf->displayProfile);
>      g_free(uf->RawHistogram);
>  #ifdef HAVE_LENSFUN
> -    lf_modifier_destroy(uf->TCAmodifier);
> -    lf_modifier_destroy(uf->modifier);
> +    if (uf->TCAmodifier != NULL)
> +        lf_modifier_destroy(uf->TCAmodifier);
> +    if (uf->modifier != NULL)
> +        lf_modifier_destroy(uf->modifier);
>  #endif
>      ufobject_delete(uf->conf->ufobject);
>      g_free(uf->conf);

Good catch Franco Comida. Now I had review comment 28 where Nils Philippsen already had suggest a similar solution, at the time I didn't catch it but TIL read a little better one gdb backtrace . 
Meanwhile I will report the fix to upstream .

Thanks

Comment 62 Fedora Update System 2016-12-19 02:32:22 UTC
ufraw-0.22-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b2ef7d32a8

Comment 63 Fedora Update System 2016-12-20 00:59:18 UTC
ufraw-0.22-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-90fa445d23

Comment 64 Fedora Update System 2016-12-28 20:20:36 UTC
ufraw-0.22-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 65 Fedora Update System 2016-12-31 08:23:05 UTC
ufraw-0.22-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.