Bug 151578 - popup window says: "Cannot run properly 'convert' program from 'ImageMagick' package" but it seems fine
Summary: popup window says: "Cannot run properly 'convert' program from 'ImageMagick' ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-Convert (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 20:39 UTC by David Bremner
Modified: 2018-03-23 12:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.1.0


Attachments
Fixes bug #151578 (2.12 KB, patch)
2007-11-13 13:34 UTC, Paweł Marciniak
Details
Fixes bug #151578 (2.28 KB, patch)
2007-11-13 17:17 UTC, Paweł Marciniak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Bremner 2007-10-30 20:39:48 UTC
Version:           0.1.5 svn (using KDE KDE 3.5.8)
Installed from:    Debian testing/unstable Packages

I am running digikam and kipiplugins from svn (of a few days ago).  When I try to batch 
convert from png to jpeg, I get the message in the subject as a popup window for each picture in the batch.

In the terminal I get 

digikam: WARNING: Convert exit (0)

The pictures seem to convert fine.  I have Imagemagick 6.2.4 installed from debian unstable
Comment 1 Paweł Marciniak 2007-11-12 18:16:13 UTC
I confirm the problem. Quick look at the code and perhaps there's a race condition in BatchProcessImagesDialog::startProcess(void), when the "if (!m_ProcessusProc->normalExit())" check is done immediately after starting the KProcess, while the documentation says that normalExit() returns true only if the process is already finished.
But that's just a quick guess, I didn't study the code thoroughly.
Comment 2 Paweł Marciniak 2007-11-13 13:34:04 UTC
Created attachment 22044 [details]
Fixes bug #151578

I'm attaching a patch that solves the issue for me.
Comment 3 Paweł Marciniak 2007-11-13 17:17:04 UTC
Created attachment 22047 [details]
Fixes bug #151578

Adds an additional check to the previous patch
Comment 4 David Bremner 2007-11-17 17:36:59 UTC
This patch fixes the problem for me.  Could it maybe be committed for the 0.9.3 release?
Comment 5 Paweł Marciniak 2007-11-18 15:51:04 UTC
David, I think you shouldn't mark the bug as resolved until it is fixed in svn. This way it won't get attention from the maintainers anymore.
Comment 6 David Bremner 2007-11-18 18:06:31 UTC
Reopen according to Pawel's advice
Comment 7 caulier.gilles 2007-11-19 16:59:29 UTC
SVN commit 738759 by cgilles:

Do not test is KProcess is out imediatly.
BUG: 151578


 M  +3 -3      Makefile.am  
 M  +207 -230  batchprocessimagesdialog.cpp  
 M  +3 -1      batchprocessimagesdialog.h  
 M  +71 -27    convertimagesdialog.cpp  
 M  +2 -0      convertimagesdialog.h  
 M  +0 -6      imagepreview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=738759
Comment 8 caulier.gilles 2007-11-19 22:09:21 UTC
SVN commit 738848 by cgilles:

missing to apply a part of Pawel patch here...

CCBUGS: 151578


 M  +35 -3     batchprocessimagesdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=738848
Comment 9 Paweł Marciniak 2007-11-19 23:02:15 UTC
Gilles,

From kipi-plugins I only use batch conversion and that one is now working well. Hard to say about others, but I think the same should be done for "preview" KProcess additionally. For now it's still old way (immediate call to normalExit()).

An irrelevant detail is that even if convert program is killed from outside and the user doesn't want to continue, the result message (added in processAborted()) says that it has been stopped by the user.

Pawel
Comment 10 krienke 2008-01-04 10:28:57 UTC
I still have this problem running digikam 0.9.3 and kipiplugins 0.1.5-rc1. 
It happens when klicking on the preview button for a filter. The filter works but this message box is annoying. 

Should this be already fixed in 0.9.3?
Comment 11 Angelo Naselli 2008-01-04 12:12:39 UTC
> Should this be already fixed in 0.9.3?

Please remember that *digikam* is a project and *kipi-plugins* is another one.
Batchprocess is a plugin belonging to kipi-plugins and it used by digikam.
So they have different release time, even if they try to be near for major changes.

Regards,
	Angelo
Comment 12 Angelo Naselli 2008-01-04 12:59:07 UTC
According to comment #10 bug reopen.
Please to help us to find a solution take care to provide how to 
reproduce it.

Here a way to:
1) Select one or more photos from album/directory - it depends on the host application
2) choose a  batch process plugin that contains a preview button (color etc)
3) click on preview button, despite of the preview window is opened you'll get an error message that says: "Cannot run properly 'convert' program from 'ImageMagick' package"

Angelo
Comment 13 krienke 2008-01-04 13:34:29 UTC
Yes I am aware about the difference between both projects but I was uncertain who is responsible in this case... 

To reproduce this bug I simply select one photo and select the kipi plugin called in German "Bildfilterung" (perhaps: filter photo) and then select to sharpen the photo. If I click on the preview button (no matter if small or big one) I get the error message. As far as I can see, this happens with each filter plugin that has a preview if you simply click to show this preview.

Thanks
Rainer
Comment 14 caulier.gilles 2008-01-04 13:45:42 UTC
SVN commit 757195 by cgilles:

check if ImageMagick command line is exit normally when process is done, not just fater to startup it.

BUG: 151578


 M  +8 -8      batchprocessimagesdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=757195