Author Topic: Program freezing at the end  (Read 5065 times)

0 Members and 2 Guests are viewing this topic.

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Program freezing at the end
« 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?

Ashbad

  • Guest
Re: Program freezing at the end
« Reply #1 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 ;)

Offline ralphdspam

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 841
  • Rating: +38/-1
  • My name is actually Matt.
    • View Profile
Re: Program freezing at the end
« Reply #2 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. ;)
« Last Edit: April 03, 2011, 09:45:26 pm by ralphdspam »
ld a, 0
ld a, a

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Program freezing at the end
« Reply #3 on: April 03, 2011, 10:14:28 pm »
are you using interrupts?  or MOS?
« Last Edit: April 03, 2011, 10:14:49 pm by Happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Re: Program freezing at the end
« Reply #4 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
« Last Edit: April 03, 2011, 10:40:35 pm by Eniripsa96 »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Program freezing at the end
« Reply #5 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.
« Last Edit: April 03, 2011, 10:58:50 pm by Runer112 »

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Re: Program freezing at the end
« Reply #6 on: April 03, 2011, 10:44:24 pm »
alright, thanks

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Program freezing at the end
« Reply #7 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.
« Last Edit: April 03, 2011, 10:59:51 pm by Runer112 »

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Re: Program freezing at the end
« Reply #8 on: April 03, 2011, 11:09:09 pm »
ah, thanks for the help, i will definately try that

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Program freezing at the end
« Reply #9 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

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Re: Program freezing at the end
« Reply #10 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