Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Allian76  
#1 Posted : 15 November 2020 14:53:34(UTC)
Allian76

Rank: Newbie

Groups: Registered
Joined: 15/11/2020(UTC)
Posts: 2
Italy
Location: Pisa

Dear all

thanks for you effort and the useful software.

I've downloaded the latest version, but unfortunately I'still got an error during opening a file created with the old one.

Follow the screenshot....

basically says the "dot" character with hexadecimal value 0x00 at the first row is not valid....

Please someone should help me!

Thank in advance

Andrea

error_smath.jpg

AZIONE_VENTO.sm (1,390kb) downloaded 16 time(s).

Edited by moderator 15 November 2020 15:35:37(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline uni  
#2 Posted : 15 November 2020 15:39:53(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
The file is completely filled with zero bytes. It is impossible to restore.

2020-11-15_17-38-43.png
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 15/11/2020(UTC)
Offline Allian76  
#3 Posted : 15 November 2020 16:55:02(UTC)
Allian76

Rank: Newbie

Groups: Registered
Joined: 15/11/2020(UTC)
Posts: 2
Italy
Location: Pisa

Tanks bro

I've worked on file for several days... I can't understand what going wrong, maybe during a save?

let'so go we will redo all the work.

Offline uni  
#4 Posted : 15 November 2020 17:17:30(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: Allian76 Go to Quoted Post
I've worked on file for several days... I can't understand what going wrong, maybe during a save?

Describe in steps what you did. The author will try to find out what the problem is. Also describe in what version this file was saved, what plugins you use. Try to repeat your actions with another similar file, making a copy of it first.


Russia ☭ forever
Viacheslav N. Mezentsev
Offline Davide Carpi  
#5 Posted : 15 November 2020 21:15:04(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
I've seen this before twice, here the one with more feedback.

Any information about what might have lead to this is very welcome.

Edited by user 15 November 2020 21:17:35(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#6 Posted : 16 November 2020 17:19:52(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
I've seen this before twice

I have seen this more than twice,
and it has nothing to do with my so called retarded SS 6179
I suspect it has to do with the transmission, either at the opening of Smath,
maybe simply in the transmission of the document itself.
Two days ago, the document from Overlord was empty.
The worst of that is that eventually, some documents turn empty.
That is a damned bad luck, whereas it may have saved empty from backup to backup.
Just yesterday, I had one document empty [incorrect format].
Presumably, there is nothing to do from the transmission or from silent virus.
Silent virus, for God sake what that could be ? Here is an example.
Long time ago, in the Mathsoft Collaboratory, we had a brain storm, solving Cadarache.
Things were fine for few days from the downloaded document.
Not knowing why/how, my document turned red on a data table.
Melanie send me that data table again, made new one from blank matrix.
The project ended fine, saved ... but dead again from same data table
that I created from blank matrix, typing numbers by numbers.
Conclusively, the numbers I typed by hand had an invisible virus of some kind.
Was it a time stamped silent code from Mathsoft or virus from transmission.
All those things about Artificial Intelligence make me laugh.
IMHO: not specific to Smath [tough more exposed], no doctoring in view.
The Mathcad story was XP.Home. My Smath is Win.7
Cheers ... Jean
Some may think: BS [Bull Shit] ... Facts are not BS
Offline Davide Carpi  
#7 Posted : 16 November 2020 22:32:32(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
I think I have a valid explanation for the null characters... Have you experienced a power loss while saving?


Jean, older SS versions are not retarded, simply they just cannot open some new files because some new features cannot be read or executed correctly, while the vice-versa is almost guaranteed (or at least we try to make it possible). Also, 6179 is one of the many versions that is affected by documented and fixed bugs on saving (see list of fixes in the post linked above). No need to heat up, anyone is free to use his favorite version (just be aware of possible issues) Good

Edited by user 17 November 2020 00:25:12(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Razonar  
#8 Posted : 17 November 2020 06:11:05(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. I have experienced the same issue, actually more times than I would recommend to anyone. But every time I remember it has been related to some kind of system saturation (windows 10), either because some other program crashed, or because automatic updates have made windows inoperable. I could not describe a series of concrete steps that caused that error, but rather due to a general saturation of resources in windows.

I do not know if it is related, but maybe sometime the problem that the file in use in SMath has been saved as a lot of zeros may have been due to the fact that when closing SMath with a file without saving SMath asks to save it and if you responds yes, SMath does not close, and need to close SMath again. This behavior isn't the usual or conventional one.

Best regards.
Alvaro.
Offline Davide Carpi  
#9 Posted : 17 November 2020 16:06:35(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi. I have experienced the same issue, actually more times than I would recommend to anyone. But every time I remember it has been related to some kind of system saturation (windows 10), either because some other program crashed, or because automatic updates have made windows inoperable. I could not describe a series of concrete steps that caused that error, but rather due to a general saturation of resources in windows.

I do not know if it is related, but maybe sometime the problem that the file in use in SMath has been saved as a lot of zeros may have been due to the fact that when closing SMath with a file without saving SMath asks to save it and if you responds yes, SMath does not close, and need to close SMath again. This behavior isn't the usual or conventional one.

Best regards.
Alvaro.


Interesting, I've seen these causes somewhere googling. Also here it explains that might happen when there is a power loss, basically because low-level file allocation before actual file writing (by extension a program hard crash might cause it too, I guess).

Edited by user 17 November 2020 16:11:10(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#10 Posted : 17 November 2020 16:44:19(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Alvaro, your observation(s) is true.
In fact, we are chasing for the "choupacabra": it kills and goes, nobody has seen it.
I have recollection some Mathcad document would cry to murder from saturation. The cure was like TI-58, TI-59 that sometimes needed NOP [No Operation] to clear the stack. Sometimes, we just can't close Smath. This happens if too many instances have been open and still in the Windows system. Like having the normal morning Smath session and opening many from the Forum. Windows gets saturated and no way to close Smath, just shut the PC. Oh ! GP Pops, not too good and that may cause some document to declare itself empty.
SS 6179 opened fine NDTMA, Alvaro documents in latest SS version, but empty Overlord.
Have a good day ... Jean.
Offline Andrey Ivashov  
#11 Posted : 17 November 2020 19:20:37(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
This code executes after actual save finished by plug-in:

Code:
                    // Manage temporary and result files
                    var file = new FileInfo(Context.SaveFileName);
                    // Check for an obvious data corruption
                    if (file.Length == 0)
                        Success = false; // Note: context changed

                    if (Success)
                    {
                        // Delete old file, if exists
                        File.Delete(Context.FileName);

                        try
                        {
                            // Rename the temporary file to its final name
                            File.Move(Context.SaveFileName, Context.FileName);
                        }
                        catch
                        {
                            // Something did not allow to do a rename (anti virus?)
                            if (!Context.SuppressUI)
                                AlertBox.Show(String.Format(GlobalProfile.FatalErrors[4], Context.SaveFileName));
                            else
                                Context.RaiseError(String.Format(GlobalProfile.FatalErrors[4], Context.SaveFileName));

                            Success = false; // Note: context changed
                        }
                    }
                    else
                    {
                        // Something went wrong, remove the temporary file
                        File.Delete(Context.SaveFileName);
                    }


Here you can see that initially SMath Studio creates a temporary file which is written next to the previous version of the file and only after that old file is replaced by a new one. That means that at this point we 100% sure that the file was saved without issues, otherwise old file will not be overridden and ruined. So this cannot happen because of power loss or similar.
Offline Davide Carpi  
#12 Posted : 17 November 2020 19:48:50(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
I know, I still miss something on the cause.

However if we assume that for whatever reason the file is allocated but not actually written by the framework, a further layer of protection would be to check the file content right after the File.Length check (rigorous way: background loading; bruteforce way: check for the infamous null character at the EOF).

Edited by user 17 November 2020 20:46:32(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#13 Posted : 17 November 2020 22:17:27(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
I'm agree.
The best we can do is to check if at least a first byte of the file is not zero, because we know - it cannot be zero. I can do it right after file is renamed.
thanks 1 user thanked Andrey Ivashov for this useful post.
on 18/11/2020(UTC)
Offline Davide Carpi  
#14 Posted : 18 November 2020 19:59:12(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Andrey Ivashov Go to Quoted Post
I'm agree.
The best we can do is to check if at least a first byte of the file is not zero, because we know - it cannot be zero. I can do it right after file is renamed.


Yep. The first character is ok too since in our case the file is always new. Good
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Razonar  
#15 Posted : 18 November 2020 20:47:59(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post

Interesting, I've seen these causes somewhere googling. Also here it explains that might happen when there is a power loss, basically because low-level file allocation before actual file writing (by extension a program hard crash might cause it too, I guess).


Hi. I see the zeros files only in a couple of laptops. I use also some others from my family or at work, and never happen it. But in my laptops I have a lot of programs installed, and they are not very efficient, and actually don't have too much memory. I relate the issue more with a windows problem than a SMath one, and it seems that some windows system functions collapse. About the power loss, I must to confess that I I hardly ever follow windows shutdown procedures, instead I simply unplug the pc or press the power button for 3 seconds. However, that did not cause the problem of files with zeros in any other program, nor in SMath.

Best regards.
Alvaro.
Offline Davide Carpi  
#16 Posted : 18 November 2020 21:39:50(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Smath files are usually quite small so you have to be very unlucky to hit a power loss in the milliseconds while actually the file is written on the disk; writing hundred of MB at once might catch it more easily. Memory issues might be the case, who knows what happens there, what things and how are suppressed or re-scheduled ... Crazy
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.