Hi everyone!

I've been working on my project called RoboKIT and I'm having a problem when I call setmode(...).

I want the program to do is to finish in the same place where it was run. I mean, if I run the program from the home screen I want the program to show that screen when it finishes and if I run the program from Equation Writer I want it to show that program when it finishes.

So, to switch between these 2 applications I use:

Code:
getmode("Split 1 App")->var


at the beginning of the program, and at the end I use:

Code:
setmode("Split 1 App",var)


But this "trick" leads to the error "Protected Memory Violation" and almost every time this error appears the calculator crashes. The only way to restore it again is by reseting it. I've lost my files several times Sad

Does anybody know how to solve this problem?
Apparently, the problem goes away when I archive the program. I'm not completely sure.
Solved your own problem. Issue resolved.
Have you run any other ASM programs or are running any TSRs and such? These can interfere with normal operation if they have bugs or are not installed properly.
Travis wrote:
Have you run any other ASM programs or are running any TSRs and such? These can interfere with normal operation if they have bugs or are not installed properly.


I'm using flib, but it hasn't given me any errors so far.
Normally, the only place the 89 OS allows for running a program is from the Home Screen. The only way I know of that you could be launching it from somewhere else is by the use of some kind of extension ASM program or TSR. Or do you mean that the program is launched by another program from the Home Screen which has already changed the current app to something else with setMode?
Is "var" declared Local in your TI-BASIC program ?
I'm asking because a number of TI-BASIC functions hate local variables. But IIRC, the crash condition for e.g. "Local x; DelVar x" is more "Address Error", stemming from word accesses to HeapDeref(H_NULL) = 0xFFFFFFFF, than Protected Memory Violation.
Travis wrote:
Normally, the only place the 89 OS allows for running a program is from the Home Screen. The only way I know of that you could be launching it from somewhere else is by the use of some kind of extension ASM program or TSR. Or do you mean that the program is launched by another program from the Home Screen which has already changed the current app to something else with setMode?


This is the flash app from which I launch my program.

http://technicalc.org/packages/eqw/eqw.htm

My program goes to the graph screen, so I don't want the program to end showing this screen. I want it to show the home screen in the case the program has been launched from the home screen, or to show the Equation Writer in case the program has been launched from it.

Quote:
Is "var" declared Local in your TI-BASIC program ?
I'm asking because a number of TI-BASIC functions hate local variables. But IIRC, the crash condition for e.g. "Local x; DelVar x" is more "Address Error", stemming from word accesses to HeapDeref(H_NULL) = 0xFFFFFFFF, than Protected Memory Violation.


Yes, it is declared as local. But, apparently, the error goes away when I archive the program. I'm not really sure.
  
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