Bug 207162 - I can`t save my project. App crash after open kde4 (not native, like in system settings!) save dialog
Summary: I can`t save my project. App crash after open kde4 (not native, like in syste...
Status: RESOLVED FIXED
Alias: None
Product: ktuberling
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Ilie Halip
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-12 11:10 UTC by Chernosov Denis
Modified: 2020-11-28 19:00 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Windows patch (830 bytes, patch)
2010-05-09 08:23 UTC, Ilie Halip
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chernosov Denis 2009-09-12 11:10:17 UTC
Version:           0.6.0 (using 4.3.00 (KDE 4.3.0), MS Visual Studio 2008 SP1)
Compiler:          cl.exe
OS:                Microsoft Windows (i686) release 5.1 (XP Home Edition)

Open potato guy, click save, see kde4 save dialog, 1-3 seconds, crash.

Russian Windows XP SP3
Comment 1 Frederik Schwarzer 2010-04-19 17:12:50 UTC
Is this still happening for you?
Comment 2 Chernosov Denis 2010-05-07 11:46:37 UTC
KDE 4.4.0

file saved... but without automatic extension adding. 

And before saving was warnign message "file with this name already exist. Replace|Cancel". Any filename generate such message. After selecting Replace, file was saved. Reopen was fine (except null-extension of file).


File dialog from Dolphin.
Comment 3 Frederik Schwarzer 2010-05-08 15:44:44 UTC
Confirmed with 4.4.1 but only under Windows. Linux (here 4.4.3) is fine.
Since there were no commits in the stable branch, it is likely windows-related.
Comment 4 Ilie Halip 2010-05-08 16:32:53 UTC
Hi. I'd like to do some further work on this bug if it's ok with you.
Comment 5 Ilie Halip 2010-05-09 08:23:42 UTC
Created attachment 43386 [details]
Windows patch

It seems that KFileDialog is a bit broken on Win - if I use KFileDialog::ConfirmOverwrite, it always asks me to overwrite the file (even though it doesn't exist), plus it doesn't add the extension, just like in the last comments.

What I did was check how other games do the saving. So in this patch, I'm using an empty KUrl on Windows which shows the native save dialog, saving the game correctly.
Comment 6 Justin Zobel 2020-11-13 03:08:45 UTC
(In reply to Ilie Halip from comment #5)
> Created attachment 43386 [details]
> Windows patch
> 
> It seems that KFileDialog is a bit broken on Win - if I use
> KFileDialog::ConfirmOverwrite, it always asks me to overwrite the file (even
> though it doesn't exist), plus it doesn't add the extension, just like in
> the last comments.
> 
> What I did was check how other games do the saving. So in this patch, I'm
> using an empty KUrl on Windows which shows the native save dialog, saving
> the game correctly.

Thanks for the patch, can you please submit it on https://invent.kde.org/games/ktuberling/-/merge_requests
Comment 7 Jazeix Johnny 2020-11-28 10:08:53 UTC
(In reply to Justin Zobel from comment #6)
> (In reply to Ilie Halip from comment #5)
> > Created attachment 43386 [details]
> > Windows patch
> > 
> > It seems that KFileDialog is a bit broken on Win - if I use
> > KFileDialog::ConfirmOverwrite, it always asks me to overwrite the file (even
> > though it doesn't exist), plus it doesn't add the extension, just like in
> > the last comments.
> > 
> > What I did was check how other games do the saving. So in this patch, I'm
> > using an empty KUrl on Windows which shows the native save dialog, saving
> > the game correctly.
> 
> Thanks for the patch, can you please submit it on
> https://invent.kde.org/games/ktuberling/-/merge_requests

The patch is 10 years old... It does not apply anymore as the code has moved to QFileDialog (https://invent.kde.org/games/ktuberling/-/blob/master/toplevel.cpp#L380).
I downloaded it from https://binary-factory.kde.org/job/KTuberling_Nightly_win64/ and when I try to save a file, I have the error: "Could not save file."
Comment 8 Jazeix Johnny 2020-11-28 18:59:56 UTC
Git commit 5c6bfedc3e8d55035dc25fdc1ea84b452fac71d2 by Johnny Jazeix.
Committed on 28/11/2020 at 15:48.
Pushed by aacid into branch 'master'.

Fix filename on saving on Windows. path() does not return a valid path.

M  +2    -2    toplevel.cpp

https://invent.kde.org/games/ktuberling/commit/5c6bfedc3e8d55035dc25fdc1ea84b452fac71d2
Comment 9 Albert Astals Cid 2020-11-28 19:00:32 UTC
Git commit af6d123514757649f355b8ecb81102728392f527 by Albert Astals Cid, on behalf of Johnny Jazeix.
Committed on 28/11/2020 at 19:00.
Pushed by aacid into branch 'release/20.12'.

Fix filename on saving on Windows. path() does not return a valid path.

(cherry picked from commit 5c6bfedc3e8d55035dc25fdc1ea84b452fac71d2)

M  +2    -2    toplevel.cpp

https://invent.kde.org/games/ktuberling/commit/af6d123514757649f355b8ecb81102728392f527