I’m starting to have a real concern about the RAM on the machine.

I’ve been casually working on a rather large program. Periodically noticing that program components that were working fine ceased to work.
At first I attributed it to my error. For example changing something in a common subroutine to repair a calling section in one program. Then discovering that another program that called the same subroutine now had a problem. Believable.

But, just discovered something that defies any reasonable explanation.

I downloaded a program from TI website that I wanted to incorporate into my program.
One “major’ change I wanted to make.
It used Alpha Variables (A B C etc)) where I prefer to create a List Variable with 26 elements. (Makes results more easily available to other programs without accidental corruption). So, "A" becomes List(1)

So, problem pops up. When I compare original source code to my code, many of the List Index numbers no longer match!?

Ex. Original was “N”
I had substituted List(14) 24th letter in alphabet
I am looking at my code now and it shows List(16) ??
Others are also off and the change is not consistent. Some are +2 others -1 etc.

view below on full screen PC as wrapping makes it hard to see on iPhone

Original


Code:
    (14)    (18)          (14)       (15)      (24)
     |      |             |         |         |
(2   N   cos(R   ))²-(4(   N   ²   -  O  ²))→   X



Mine Now (List is ⌊TRI)

Code:
(2⌊TRI(16)cos(⌊TRI(17)))²-(4(⌊TRI(16)²-⌊TRI(14)²))→⌊TRI(24)
      |          |            |        |         |   
Diff  +2         -1           +2       -1         0


Here's an older copy of My Source from a week ago.
Verifies that there has been corruption.


(2⌊TRI(14)cos(⌊TRI(18)))²-(4(⌊TRI(14)²-⌊TRI(15)²))→⌊TRI(24)

((2⌊TRI(14)cos(⌊TRI(18)))+√(⌊TRI(24)))/2→⌊TRI(16)
((2⌊TRI(14)cos(⌊TRI(18)))-√(⌊TRI(24)))/2→⌊TRI(13)




There was another strange occurrence with memory.
Thought I was running out of space. Uh Oh.
But the size of collected program parts didn’t seem to indicate that. There is apparently no “compress” thingy.
(there is a "GarbageCollect") but that is only for Archive memory)
So I did a factory reset and reloaded all 100+ components ( sized from few bytes to 3000-4000 bytes). Now had 64k of free space. WTF?

Searching Google and Cemetech site turned up no references to similar memory corruption

Yes, single dimension array.

Just remembered, there was another odd Array issue. Always was able to DIM the Array one time and just use it. But was having a problem where if I referred to the Array in another program I was getting an error indicating that the Array didn’t have that element.
Ex.
Dim List to 50 elements in program AAAA
Try to get element 10 OK in program BBBB
Try to get element 47 NG in program BBBB
Put a Dim statement in program BBBB
Try to get element 47 OK in program BBBB
Never had to that before and why would number of elements be changing.

Just remembered. I recently updated the PC interface program.
At the same time it updated the OS on the calculator. That may be what’s going on.

PS. Noticed that you can’t use an Array Element as the target for Input Statement.
Must use a simple Variable then store that to Array. That makes no sense.
EDIT: Just fyi, excessive white space isn't conserved when posting. So your lines aren't where they're suppose to be, you'll want to try other characters such as underscores. You can also put the text in a code block. Smile

I don't quite understand what's going on, it sounds like you're misusing lists, or you're just running out of RAM.

Although I'm skeptical that you didn't just accidentally edit parts of your source code (the only corruption I've seen looks a lot worse and causes your program file to completely break), we can quickly check if it's actually an issue or not. Archive anything important then while on the home screen:
►Press [mode] then [alpha] then [S] (the ln key) If you're confused on any of this, I have a video tutorial that shows how to do this, and describes what each test does.
►Press [enter] three times to enter the diagnostics (don't worry only your RAM will be cleared)
►Press [7] to test the RAM integrity. You calculator should test it for a few second then turn off. If it does something other than that, then please share what it does and we'll try to help you.

You should also try one other test, go back to the diagnostics screen but instead of pressing [7], press [6]. This will test the FLASH integrity (which should be fine but it doesn't hurt to check). Press [enter] to get back to the diagnostics screen, the press [clear] to quit. If both your RAM and FLASH pass, then it's most likely user error.

A two things that may fix your issue, try RAM resetting or reinstalling the OS. Most software issues will be fixed by these solutions.

Since you said you recently updated your calculator, I assume you have OS 5.3.0 or newer. Have you tried storing all your programs in the Archive rather than the RAM? Have you tried Archiving the lists when you're not using them then unarchiving them when the program starts? (You can use SetUpEditor LNAME,LOTHER,... to accomplish this in-program).

Also, did you check what was eating up your RAM by going to the memory management menu? ([2nd]>[+]>[2]>[1]). It could be that you're adding new elements to lists rather than overwriting them which could cause your RAM to gradually decrease.

Quote:
Dim List to 50 elements in program AAAA
Try to get element 10 OK in program BBBB
Try to get element 47 NG in program BBBB
Put a Dim statement in program BBBB
Try to get element 47 OK in program BBBB

I don't understand what this does (what is OK/NG, when are the defined and how many elements are they each), could you provide a real code example? That would help debugging this whole issue a lot easier if you could provide the code/programs you're having issues with. Smile
As multiple spaces get truncated down to the length of one, I've wrapped your "tabulated" sections in [code] tags so that things might line up better. Use the "edit" button on your post if I made a mistake. (Sorry for being off-topic.)
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement