View Issue Details

IDProjectCategoryView StatusLast Update
0000209QElectroTechwebsitepublic2021-02-15 18:35
ReporterBisku Assigned Toblack_sun  
PrioritylowSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
PlatformDELL XPS 15OSWindows 10OS Version20H2 (19042.630)
Summary0000209: Possibility to delete restore file
DescriptionIf some restore files exist, a dialog pops up on startup giving information about the filenames they belong to and offering to open those restore files. Clicking on cancel will just open this dialog again and again on every start of the programm.

I'd like to have an additional third button to delete those files if not needed.

TagsNo tags attached.

Activities

scorpio810_mantis

2020-11-15 13:49

administrator   ~0000465

Or delete files in C:\Users\ your_username\AppData\Local\stalefiles\QElectroTech if you have installer version on Windows.

Bisku

2020-11-16 13:52

reporter   ~0000466

I know this manual solution. But I would like to implement it into the code. I think many people will come across this issue one day or another - and not everyone will be willing to dig into the hidden appdata directories.

P.S.:
On Windows you may use %localappdata%\stalefiles\QElectroTech to get there directly without having to know the username.

black_sun

2020-11-25 19:47

developer   ~0000467

When you click on cancel the backup file is deleted (it is the normal behavior).
I can't reproduce your bug on my windows 10 vm.
Can you test :
-when you click on cancel if the file on the folder C:\Users\ your_username\AppData\Local\stalefiles\QElectroTech is still here or not.
-Install the last QElectrotech build
-Test on another pc

Bisku

2020-11-25 20:57

reporter   ~0000469

Mmh,i doesn't delete the files on my PC and it is 100% reproducable. I'd be more than happy if clicking cancel would delete these files. And I am on the current nighty (23-Nov-2020).

I have two files in %localappdata\stalefiles\QElectrotech. Both have almoste the same filename. Only difference is an additional .lock at the end of the second file.

Starting QElectrocad brings up the message as expected.

When I click OK then QElectroCad closes itself. The files still exist in %localappdata\stalefiles\QElectrotech.

A click on cancel and I can use QElectrocad without a file being loaded (as expected). But these two files still exist in %localappdata\stalefiles\QElectrotech.

Manual deleting these files in %localappdata\stalefiles\QElectrotech and QElectrocad starts without any message about restore files. So, I'm pretty sure the directory is correct.

However, I will try it on a different computer once I have chance.

Bisku

2020-11-25 21:37

reporter   ~0000470

OK, I think I know what the issue is: It is the filename created by QElectrocad.

If I understand it correctly, the generated file name constis of the original filename with some changes (like %20 instead of a tab or %C3%B6 instead of German "รถ" - URL encoding is used I guess) - and it is adding the full path information (again URL encoded) as well as some more chars.

Because of the url encoding, for a German file- and pathname the result can be a very long string. And that may be the reason QElectrocad either shuts down unexpectedly when trying to open the file or is unable to delete it when I click on cancel. The filename is simply longer than the amaount of characters the string can handle.

How I came to this conclusion:
I copied those files to an SDcard and renamed it to test.qet and test.qet.lock. Now I can open those files by clicking OK and they get deleted when I click on cancel. So, it definitly has something to do with the filename.

Then I checked the original filename of any non ascii-characters, but the filename was just fine.
Next I checked the length of the filename created by QElectrocad it had exactly 250 chars.
Then I decoded the filename using URL encoded format and I found out that the path information at the end of the string is incomplete. So maybe QElectroCad won't handle more than 250 chars?

Maybe that's also the reason why these files appeared in the first place`? I have these restore files appearing on my PC from time to time without knowing a reason why (no crashes of the programm appeared). Until now, I manually deleted them but that got quite annoying. That's why I opened this topic in Mantis.

If my assumption are correct, you may either define a different way to store the path to file rather than adding it to the filename - or you should ensure to cut the filename to the maximum number of chars QElectroCad can handle.

scorpio810_mantis

2020-12-11 16:27

administrator   ~0000472

https://github.com/KDE/kcoreaddons/commit/46e464d85767603b5f2e53d95d40113de1b2fd42#diff-bf9a2ceb0fc5832a716ddd9dca0e80682fdd619834361bffec4a3e81121c1425

Bisku

2021-02-06 21:00

reporter   ~0000483

Problem solved. Thanks.

user245

2021-02-15 00:43

  ~0000486

Have submitted these issues to https://github.com/qelectrotech/qelectrotech-source-mirror/issues so they can be found alongside pull requests

Issue History

Date Modified Username Field Change
2020-11-14 08:27 Bisku New Issue
2020-11-14 08:58 Bisku Summary Translation of restore file dialog / Possibility to delete restore file => Possibility to delete restore file
2020-11-14 08:58 Bisku Description Updated
2020-11-14 09:08 Bisku OS => Windows 10
2020-11-14 09:08 Bisku OS Version => 20H2 (19042.630)
2020-11-14 09:08 Bisku Platform => DELL XPS 15
2020-11-14 09:08 Bisku Description Updated
2020-11-15 13:49 scorpio810_mantis Note Added: 0000465
2020-11-16 13:52 Bisku Note Added: 0000466
2020-11-25 19:47 black_sun Note Added: 0000467
2020-11-25 20:57 Bisku Note Added: 0000469
2020-11-25 21:37 Bisku Note Added: 0000470
2020-12-11 16:27 scorpio810_mantis Note Added: 0000472
2021-02-06 21:00 Bisku Note Added: 0000483
2021-02-15 00:43 user245 Note Added: 0000486
2021-02-15 00:44 user245 Product Version => 0.8
2021-02-15 00:45 user245 Fixed in Version => SVN/trunk
2021-02-15 00:47 user245 Product Version 0.8 => SVN/trunk
2021-02-15 00:53 user245 Category other => website
2021-02-15 00:54 user245 Severity feature => block
2021-02-15 18:35 black_sun Assigned To => black_sun
2021-02-15 18:35 black_sun Status new => resolved
2021-02-15 18:35 black_sun Resolution open => fixed