1 Pages (8 items)
Crash on saving - Improper saving when opening files from forum - Messages
#1 Posted: 2/20/2018 5:33:48 AM
Hello to Everybody,
I just noted a strange behaviour of Smath, I am using release 99.6622 but I believe it is the same in other versions.
If you open a file on the fly (without downloading) from an external source (i.e.: Smath Forum) and then you make any change to it, when you close the file you are prompted with a request to save the file.
If you (improperly) answer "Yes", Smath crashes.
I think Smath is right in the sense that you shouldn't save to a read-only location, but for the sake of completeness, you might want to protect against improper use from inexperienced users...
Thanks for the attention
Marco
I just noted a strange behaviour of Smath, I am using release 99.6622 but I believe it is the same in other versions.
If you open a file on the fly (without downloading) from an external source (i.e.: Smath Forum) and then you make any change to it, when you close the file you are prompted with a request to save the file.
If you (improperly) answer "Yes", Smath crashes.
I think Smath is right in the sense that you shouldn't save to a read-only location, but for the sake of completeness, you might want to protect against improper use from inexperienced users...

Thanks for the attention
Marco
#2 Posted: 2/20/2018 6:30:46 AM
Grazie Marco 
Bug confirmed (unhandled System.UnauthorizedAccessException).
Guess the right way is:
1) check for permissions
2) If permissions are denied, prompt the "save as" dialog;

Bug confirmed (unhandled System.UnauthorizedAccessException).
Guess the right way is:
1) check for permissions
2) If permissions are denied, prompt the "save as" dialog;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 2/21/2018 3:51:39 AM
Hello, Davide.
I've made some improvements to saving logic. Please could you check the same scenario with latest sources?
Unfortunately I'm unable to reproduce this issue.
Thanks in advance!
I've made some improvements to saving logic. Please could you check the same scenario with latest sources?
Unfortunately I'm unable to reproduce this issue.
Thanks in advance!
#4 Posted: 2/21/2018 4:50:57 AM
Hello Andrey,
Not fixed with your improvements. To reproduce simply mark a file as readonly from the system file properties before opening it with SS.
In my sandbox folder there is a possible solution
Not fixed with your improvements. To reproduce simply mark a file as readonly from the system file properties before opening it with SS.
In my sandbox folder there is a possible solution

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Andrey Ivashov 2/21/2018 4:29:00 PM
#5 Posted: 2/21/2018 12:01:26 PM
WroteHello to Everybody,
I just noted a strange behaviour of Smath, I am using release 99.6622 but I believe it is the same in other versions.
If you open a file on the fly (without downloading) from an external source (i.e.: Smath Forum) and then you make any change to it, when you close the file you are prompted with a request to save the file.
If you (improperly) answer "Yes", Smath crashes.
I think Smath is right in the sense that you shouldn't save to a read-only location, but for the sake of completeness, you might want to protect against improper use from inexperienced users...
Thanks for the attention
Marco
Hello Marco,
Superb description, the missing link is that if you save from open on the fly,
good thing Smath crashes ... What ! Yes What, how Smath knows where to save ?
Back to originator ... no way. Why not Save as ...
Have you tried copy/paste on new sheet => Save as in some addressed location ?
Jean
#6 Posted: 2/21/2018 3:15:13 PM
WroteYes What, how Smath knows where to save ?
Back to originator ... no way. Why not Save as ...
This is not a big deal, the file downloaded for reading is stored in a temporary path and flushed when you close the browser, Smath knows the path and since is a temp folder can write in it

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#7 Posted: 2/21/2018 3:31:34 PM
Thank you very much Davide!
I've taken your fix as a basis and extended it to support all possible places where saving to file may be called (i.e. desktop UI, silent mode, etc.). So, this is done now.
Best regards.
I've taken your fix as a basis and extended it to support all possible places where saving to file may be called (i.e. desktop UI, silent mode, etc.). So, this is done now.
Best regards.
1 users liked this post
Davide Carpi 2/21/2018 3:33:00 PM
#8 Posted: 2/21/2018 4:29:06 PM
FYI: Fix is a part of just released nightly build: https://en.smath.info/forum/yaf_postst12549_SMath-Studio-0-99-6626--21-February-2018.aspx
1 users liked this post
Davide Carpi 2/22/2018 8:39:00 PM
1 Pages (8 items)
-
New Posts
-
No New Posts