Bug 240051 - first screenshot cannot be opened in applications
Summary: first screenshot cannot be opened in applications
Status: RESOLVED DUPLICATE of bug 258431
Alias: None
Product: ksnapshot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Richard Moore
URL:
Keywords:
: 241526 244587 251855 252111 264714 280863 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-30 09:11 UTC by Manuel Mommertz
Modified: 2013-05-07 17:50 UTC (History)
26 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The same here (153.93 KB, image/png)
2011-06-23 13:56 UTC, Victor Varvaryuk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Mommertz 2010-05-30 09:11:47 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Ksnapshot takes the first screenshot as soon as the program starts. But in KDE SC 4.4.81 if I click 'open with' and select a program from the list, the applications starts and informs me that the file it should show cannot be opened.

The file that is given to the application is in /home/<user>/<lastname>.png. If I take a second screenshot the external application gets the file correctly at /tmp/kde-<user>/<lastname>.png

Reproducible: Always
Comment 1 Alexey Shildyakov 2010-05-30 11:32:47 UTC
Cannot confirm this. Use Gwenview to 'open with'.
KDE 4.4.3
Comment 2 Burkhard Lück 2010-05-30 12:46:37 UTC
(In reply to comment #1)
> Cannot confirm this. Use Gwenview to 'open with'.
> KDE 4.4.3

This is not about 4.4.3 but a BR for 4.4.81 (trunk, soon 4.5)

I can confirm this bug with recent trunk compiled from sources.
trunk r1109164-1 does not have this bug.
So it looks to me like a regression introduced with the fix r1109164 for http://bugs.kde.org/show_bug.cgi?id=204628, therefore cc'ing the committer
Comment 3 Christoph Feck 2010-06-12 20:11:23 UTC
*** Bug 241526 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2010-09-02 15:43:57 UTC
*** Bug 249820 has been marked as a duplicate of this bug. ***
Comment 5 Felix Geyer 2010-09-08 14:14:35 UTC
*** Bug 244587 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2010-09-23 14:07:39 UTC
*** Bug 252111 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2010-09-23 14:08:00 UTC
*** Bug 251855 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2011-01-29 15:51:12 UTC
*** Bug 264714 has been marked as a duplicate of this bug. ***
Comment 9 Terrible Monster 2011-02-14 15:54:48 UTC
Same here. Just cannot open any screenshot directly in any application. All I can do is save it to disk and then open it manually. It has been this way since the beginning of my adventure with Kubuntu (10.04).
Comment 10 Jencek 2011-03-10 09:30:29 UTC
I can confirm this, it doesn't work for quite some time for me, it's beggining to annoy me.
Comment 11 Kai Uwe Broulik 2011-03-10 16:54:01 UTC
Can anybody test if this bug also affects Kipi plugins, especially Kopete plug in? So, does it work to send the first screenshot taken directly to a Kopete contact using its kipi plugin? I think not?
Comment 12 Jencek 2011-03-11 08:30:52 UTC
Surely someone can, but I'm not using kopete.

2011/3/10 <KaiUweBroulik2@hotmail.com>

> https://bugs.kde.org/show_bug.cgi?id=240051
>
>
>
>
>
> --- Comment #11 from  <KaiUweBroulik2 hotmail com>  2011-03-10 16:54:01 ---
> Can anybody test if this bug also affects Kipi plugins, especially Kopete
> plug
> in? So, does it work to send the first screenshot taken directly to a
> Kopete
> contact using its kipi plugin? I think not?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 13 Kane 2011-03-11 09:27:06 UTC
I confirm this on Kubuntu 10.10 KDE 4.6.1

When I choose "Sent to" -> GIMP, gimp says:

GIMP Message
Opening '/home/kane/Obrazy/tmp/qq2.png' failed: Could not open '/home/kane/Obrazy/tmp/qq2.png' for reading: Nie ma takiego pliku ani katalogu
Comment 14 Kai Uwe Broulik 2011-03-11 10:04:14 UTC
Did you set this weird path to tmp files or is this generated by ksnapshot? Since ~/Documents(?)/tmp is a bit unusual?
Comment 15 Jencek 2011-03-11 12:22:15 UTC
Well, I didn't set anything about tmp files. I would expect ksnapshot to
save printscreen to /tmp/snapshot.png or to /tmp/ksnapshot/snapshot.png,
from where it can be passed to gimp or whatever else. Instead of this
~/downloads/snapshot.png is passed to gimp, but nothing is saved there, so
gimp can't open it.

2011/3/11 <KaiUweBroulik2@hotmail.com>

> https://bugs.kde.org/show_bug.cgi?id=240051
>
>
>
>
>
> --- Comment #14 from  <KaiUweBroulik2 hotmail com>  2011-03-11 10:04:14 ---
> Did you set this weird path to tmp files or is this generated by ksnapshot?
> Since ~/Documents(?)/tmp is a bit unusual?
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 16 Eugen Albrecht 2011-04-06 23:37:30 UTC
Same here, on opensuse11.4 (kde4.6). I had same on opensuse11.3 (kde 4.4)
Comment 17 Maarten Bezemer 2011-04-23 15:41:44 UTC
I confirm this on Kubuntu 10.10 KDE 4.5.1

Bug is also on LP #730691: https://bugs.launchpad.net/ubuntu/+source/kdegraphics/+bug/730691
Comment 18 Xing 2011-05-08 17:52:54 UTC
(In reply to comment #17)
> I confirm this on Kubuntu 10.10 KDE 4.5.1
> 
> Bug is also on LP #730691:
> https://bugs.launchpad.net/ubuntu/+source/kdegraphics/+bug/730691
I confirm this on openSUSE 11.3/11.4 since KDE 4.5. This is really annoying.
Comment 19 Nadav Kavalerchik 2011-05-12 12:57:20 UTC
I can confirm this bug on Kubuntu (11.04) with KDE 4.6.2
Comment 20 San 2011-05-20 10:23:35 UTC
I confirm too, on kubuntu 11.04 with a fresh ksnapshotrc

What annoys me is that I'm sure it is very easy to solve !

it made me smile too:

first I press "Print Screen" and then click on "send to gimp", it tells me
"screenshot1.png" not found.

So I click on "save" -> it saves "screenshot1.png"

and now I click again on "send to gimp", and it tells me
"screenshot2.png" non found !

nice isn't it ?  ;)
Comment 21 Kai Uwe Broulik 2011-05-30 15:25:25 UTC
Seems fixed on 4.7. I press the PrintScreen key, KSnapshot pops up, I choose “Open with” Gimp or Kolourpaint or Gwenview and it works just fine.
Comment 22 Manuel Mommertz 2011-06-14 12:36:45 UTC
Jea, open the first snapshot works if you NOT save it. If you save it, it won't work until you take a new one (as long as you not save this too). So the case switched from 'first screenshot only opens if it was saved' to 'all screenshots only open if they were not saved'.
Comment 23 hyper_ch 2011-06-14 12:41:13 UTC
Comment #22

Unfortunately it does not work like this. Using:

KSnapshot
Version 0.8.2
Using KDE Development Platform 4.6.4 (4.6.4)

-

GIMP Message
Opening '/home/hyper/Desktop/Screenshot1.png' failed: Could not open '/home/hyper/Desktop/Screenshot.png' for reading: No such file or directory

-

(1) I did press the screenshot button
(2) I chose from the KSnapshot menu to open with GIMP
(3) I did not switch programs while GIMP was loading
(4) I did get the above error
Comment 24 Manuel Mommertz 2011-06-14 12:53:43 UTC
(In reply to comment #23)

I was talking about 4.6.80 (4.7 beta 1).
Comment 25 Jaanus Ojangu 2011-06-17 18:26:44 UTC
Same problem in KSnapshot Version 0.8.2 in Mageia.
Comment 26 Victor Varvaryuk 2011-06-23 13:56:47 UTC
Created attachment 61267 [details]
The same here

I didn't notice that it doesn't open just the first screenshot.
Sometimes it opens even first screenshot successfully. 
I tried to run the ksnapshot from konsole to see any error messages - not there. But the KolourPaint has the right file name - but blank file. Looks like knapshot is trying to call external program to open the screenshot, but it's not saved yet to the disk...
Comment 27 Mickaël 2011-07-05 10:40:59 UTC
I have the same bug, excepting that the second (or third...) snapshot does not work better. I try to send the picture to Facebook (album Wall Photos).

The first snapshot, the name is the same as the last saved file and the thumbnail cannot be displayed.
The second (third..) still displays the old name but can show the thumbnail of the snapshot.

Should I open a new bug ?
Comment 28 Christoph Feck 2011-08-28 19:41:27 UTC
*** Bug 280863 has been marked as a duplicate of this bug. ***
Comment 29 H.H. 2011-10-06 08:38:32 UTC
I have a similar problem:

1) press print-screen to take snapshot with ksnapshot
2) press "save.." to save file as "myfilename.png"
3) press "send to.." gimp:

error: gimp cannot open file "myfilename1.png"

so ksnapshot sends a name to gimp which does not exist yet
Comment 30 hyper_ch 2011-10-06 09:00:36 UTC
I'm running meanwhile

Qt: 4.7.4
KDE Development Platform: 4.7.1 (4.7.1)

and it works there now. I make a screenshot, and in ksnapshot tell it to open with gimp - works just fine.
Comment 31 Manuel Mommertz 2011-10-06 16:25:04 UTC
(In reply to comment #30)
> I'm running meanwhile
> 
> Qt: 4.7.4
> KDE Development Platform: 4.7.1 (4.7.1)
> 
> and it works there now. I make a screenshot, and in ksnapshot tell it to open
> with gimp - works just fine.

The original bug is fixed, yes. But what comment #29 describes is that he opens the snapshot AFTER saving it. And this does not work anymore.
Comment 32 H.H. 2011-10-06 16:50:47 UTC
right, and I have to add to my comment #29 that this problem still persists in kde-4.7.1
Comment 33 hyper_ch 2011-10-06 17:56:04 UTC
Yes, the problem in #29 still exists in KDE 4.7.1
Comment 34 Roger Pixley 2011-11-07 22:49:17 UTC
So I can confirm that saving the file initiates AutoIncrementing the name which makes the send to file less useful. 

To outline the steps. 

1) Take a screenshot with Ksnapshot and instantly use the sendto menu.

Results: Correctly sends the temporary image file to the resource.

2) Use the Save As to save the file as some unique name and then use the sendto menu to try open the file.

Results: Send to passes along the unique name with an incremented number at the end which has no temporary file or corresponding existing file which produces an error.

Workarounds: If opening an application that you can edit or save with then use sendto first then save from the application or save afterwards. Else just use sendto before saving. 

I don't have any good solutions to this problem since in all other cases you would like ksnapshot to autoincrement your file as soon as you've saved. A temporary code workaround might be (as suggested by richmoore) having a recent files menu that could use the sendto from older files though a much more stable workaround would be to allow programs to pass along resources instead of saved files. That has some issues as well but it's much more flexible and would at least work as intended (with the exception of final file name)
Comment 35 Maarten Bezemer 2011-12-05 20:30:27 UTC
It seems to be fixed in KDE 4.7.3
Comment 36 San 2011-12-05 21:03:34 UTC
(In reply to comment #35)
> It seems to be fixed in KDE 4.7.3

I agree, even in 4.7.2 it works for me now
Comment 37 Rafael 2012-12-13 09:34:39 UTC
I also think this is fixed, in my case, cheked in KDE 4.9.2.
Please, close this bug.
Comment 38 Jekyll Wu 2012-12-19 14:38:38 UTC
Can't reproduce using KDE SC 4.10, either.  Close it based upon recent comments.
Comment 39 Daniel Duris 2013-02-25 11:33:16 UTC
I confirm this on KDE 4.10.0

Version 0.8.2

try "send to..." and it crashes everytime.

Please, reopen.
Comment 40 Daniel Duris 2013-02-25 11:33:43 UTC
Application: KSnapshot (ksnapshot), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  QString::operator= (this=0x72006500730097, other=...) at tools/qstring.cpp:1411
#7  0x00007fdb506f3349 in KIPI::Plugin::setUiBaseName (this=0x17e20b0, name=<optimized out>) at ../../libkipi/plugin.cpp:309
#8  0x00007fdb50b84b49 in KIPIIpodExportPlugin::Plugin_iPodExport::Plugin_iPodExport (this=0x17e20b0, parent=0x1592aa0) at /build/buildd/digikam-3.0.0~rc/extra/kipi-plugins/ipodexport/plugin_ipodexport.cpp:66
#9  0x00007fdb50b85057 in KPluginFactory::createInstance<KIPIIpodExportPlugin::Plugin_iPodExport, QObject> (parentWidget=<optimized out>, parent=<optimized out>, args=...) at /usr/include/kpluginfactory.h:477
#10 0x00007fdb5ffb1251 in KPluginFactory::create (this=0x17b9720, iface=0x7fdb615b9440 "KIPI::Plugin", parentWidget=0x0, parent=0x1592aa0, args=..., keyword=...) at ../../kdecore/util/kpluginfactory.cpp:203
#11 0x00007fdb615b1897 in KIPI::PluginLoader::Info::plugin() const () from /usr/lib/libkipi.so.8
#12 0x0000000000417cc8 in _start ()
Comment 41 Jekyll Wu 2013-02-25 11:42:56 UTC
(In reply to comment #39)
> I confirm this on KDE 4.10.0
> 
> Version 0.8.2
> 
> try "send to..." and it crashes everytime.
> 
> Please, reopen.

You crash is due to mixing incompatible (kipi-plugin related ) binaries from different repos, which has nothing to do with this issue.
Comment 42 Maarten De Meyer 2013-05-07 17:50:02 UTC

*** This bug has been marked as a duplicate of bug 258431 ***