Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Eniripsa96 on April 03, 2011, 09:25:12 pm

Title: Program freezing at the end
Post by: Eniripsa96 on April 03, 2011, 09:25:12 pm
I am making a maze game. It makes the maze and lets you move through the maze, but hitting the clear button to exit the game or beating it results in the calculator freezing and I'm not sure why. I used Full mode but set it back to normal before running the navigation part. All it has to do from where it is working and the end of the program is exit its loop through an "End". I backed it up before trying to run it so it isn't too big of a problem, but I don't get why it freezes. Can anyone help?
Title: Re: Program freezing at the end
Post by: Ashbad on April 03, 2011, 09:34:39 pm
Is it possible you could post the code here?  Its probably just a simple mistake, but its hard to find that mistake without knowing the code ;)
Title: Re: Program freezing at the end
Post by: ralphdspam on April 03, 2011, 09:44:54 pm
Make once you exit, the program hits a Return instead of trying to run through all of the sub programs. 

That's pretty much all we can do without the source code. ;)
Title: Re: Program freezing at the end
Post by: Happybobjr on April 03, 2011, 10:14:28 pm
are you using interrupts?  or MOS?
Title: Re: Program freezing at the end
Post by: Eniripsa96 on April 03, 2011, 10:35:57 pm
Well, i don't have any subroutines, so that won't be a problem.

EDIT: and no, i am not using any interrupts.

Note: I used Axe Parser v5.1 to compile this
Title: Re: Program freezing at the end
Post by: Runer112 on April 03, 2011, 10:40:12 pm
Perhaps it's not frozen at all. An odd thing that occurs sometimes is that, when a program exits, the OS doesn't return to the home screen. Have you just tried pressing 2nd + MODE to quit to the home screen?

EDIT: Nope, it's definitely crashing. Looking into it now.
Title: Re: Program freezing at the end
Post by: Eniripsa96 on April 03, 2011, 10:44:24 pm
alright, thanks
Title: Re: Program freezing at the end
Post by: Runer112 on April 03, 2011, 10:58:57 pm
Found the problem. You're using what appears to be almost 900 bytes of memory starting at L2, although only 531 bytes are free at that location. Overwriting about 350 bytes of values used by the OS is definitely a no no. I haven't thoroughly examined your program enough to suggest an appropriate solution, but I would try to find a way to use less RAM. If you can't, you can always create an appvar large enough to hold your data and store your data there.
Title: Re: Program freezing at the end
Post by: Eniripsa96 on April 03, 2011, 11:09:09 pm
ah, thanks for the help, i will definately try that
Title: Re: Program freezing at the end
Post by: squidgetx on April 04, 2011, 07:26:17 am
Or you can, at the cost of 900 bytes in the size of your program, store your data inside instead :)
Code: [Select]
.header
Zeroes(900)->theta
....
Now use theta instead of L2
Title: Re: Program freezing at the end
Post by: Eniripsa96 on April 04, 2011, 08:55:30 am
i changed it so that it only stores the coordinates of spots that have multiple paths that it could take, and it overwrites previous spots if they're adjacent, so now it works with L2, but doesn't clear as many points as before, ill try the zeroes thing to try to get it to use the whole graph again. Thanks everyone