index outside matrix boundaries

index outside matrix boundaries - cannot open file - Messages

#1 Posted: 11/17/2014 1:16:10 PM
csb531

csb531

0 likes in 24 posts.

Group: User

Hello,
I have made a large (23 pages) calculation sheet in Smath studio, and it worked fine. I have saved it, and tried to open it later, but could not open it. I got the message: "The index lies outside the matrix boundaries" ( <- translated from Dutch). It seems I cannot open the file anymore and lost a few days work! Can anybody help me??? Please!!

I must admit that the file was based on an original Mathcad (xmcd)file. Help is much appreciated!

Thanks in advance!
#2 Posted: 11/17/2014 4:00:17 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Here you have the file fixed

Remember to make some backup copy when you work with big files.

I'll open a new issue in the BTS to show where is the bug (5 digits background color saved: "#fffff" instead of something else - I've changed it to white "#ffffff")

Do you remember if you have choosen a different background color for the strings attached (if yes, what color)?


best regards,

Davide
2014-11-17 20_17_34-SMath Studio Desktop - [test_kopie_FIXED.sm_].png
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
Вячеслав Мезенцев 11/18/2014 1:04:00 AM
#3 Posted: 11/17/2014 4:30:08 PM
csb531

csb531

0 likes in 24 posts.

Group: User

Hello Davide!
Thank you very very much for your fix! This will save me many hours of retyping the calculation!

The used color was probably a sort of pink or lila. Is not important, it should just be highlighted.

For the future: how can you fix such a problem? In notepad? And how do you find the line and item what is causing the problem?

Thanks again for your fast solution!

Best Regards, csb
#4 Posted: 11/17/2014 8:19:02 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

You're welcome csb

Yep, I've used notepad++ (encoding: utf-8; language: xml)

As first step you have to check the XML structure. You should see something like in the first picture attached.
The most common issue is that the file saving crashes and produces a broken code. In this case you have to remove/restore the last region and close all the tags from the inner to the outer (that must be </regions>. This is not the case of your file.

When the first step is not resolutive, as second step you have to find the source of the pain... The simplest way is a "binary search". Collapse all and then delete some regions, then try to open the cleaned file, until you have a working file. Then restore the file and remove less region until you have few candidates. Because I don't know what was the work that you have done in your last session, I've started my research from the bottom of the worksheet, removing 1,10,50,100,200,300... regions. Making the long story short, I've found that the problem was in more than one region, where the first was the 20th. The first idea was for some invalid character, so I've replaced your text with a simple test. Because nothing changes I've checked again and I've found the bug in the bgColor attribute.
In this case I've searched all the occurrences of "#fffff" and I've found all the issues (just my luck), the 2nd way would be a search with regular expressions or again the 2nd step for another different bug.

Even if you fix the issues yourself, I reccomend to share them here or in the BTS (also with simplified examples, when possible), to have further versions more stable


Best regards,

Davide


P.S. Bug registered as SS-1247
2014-11-17 19_56_09-_C__Users_Davide_Desktop_test_kopie.sm - Notepad++.png
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
Вячеслав Мезенцев 11/18/2014 1:06:00 AM
  • New Posts New Posts
  • No New Posts No New Posts