16 March 2021, 22:24 | #1 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,648
|
Software Failure/Guru "8000 0020" on program exit
I'm getting this error on program exit and I am not completely sure what it is or how it happened.
I am taking a wild guess here that it has something to do with me not doing what I supposedly should do on exit: "cleaning" the memory. If I hit "suspend" on the error, the memory I used is visibly gone from the system. I have loaded one bank of info into memory, and after I started doing that, this error began to occur, hence my suspicion. I tried to do FreeBank #BANK before "End", it says it cannot free memory. I tried to do FreeMem Bank(#BANK), BankSize(#BANK), also fail. Is this error related to this and if so, how exactly am I supposed to cleanly exit the program? Is there even any functions in Blitz to see how much RAM I have free? While we're talking this stuff, can you see the size of a file before you load it? |
17 March 2021, 11:17 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,377
|
Is the program actually exiting? Or crashing just prior to exiting? Try using NPrints before and after any commands at the end of the program to see what might be snagging it. If it's just the End statement, it's possible that something's buggy with the Bank library, but I've used Bank before and left it to be freed by the End statement with no issues.
There are some commands for checking free RAM in some 3rd party libraries - ChipFree, FastFree and LargestFree will return the size of the largest free block in the relevant categories, and that's a library that's included with most Blitz setups (RISystemLib). But it's also possible to check whether a bank has been successfully allocated or not before using it - if there's not enough RAM, it will have the address set to 0 so using the Bank() function to check it before you will tell you if it's been allocated successfully or not. You can get the filesize using the LOF function (Length of File) after you've opened a file with ReadFile. There are 3rd party libraries that also contain file size commands, but IIRC they're used to examine a file as part of a directory listing so you'd need to traverse the directory to get the filesize that way. It's doable, but opening the file, getting the size and closing it is probably the most straightforward method without using the dos.library Examine calls directly. |
17 March 2021, 16:27 | #3 | ||||
Registered User
Join Date: May 2001
Location: ?
Posts: 19,648
|
I have my program in a While loop waiting for mouse button input. So as soon as I press the button, that loop exits and goes straight to End, there's nothing else. So yeah I believe it does it on crash. And it wasn't doing it until I started to use the Bank mechanism. But it could be something else. At this point, who knows? I cannot even debug it, because it crashes blitz if I run this from SuperTED
Quote:
I have that UBB2.1 Plus pack from http://ubb.plus , if that helps Quote:
Quote:
Quote:
Thanks for your help, as usual, Daedalus! |
||||
17 March 2021, 22:10 | #4 | |||||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,377
|
Quote:
Quote:
Quote:
Quote:
Quote:
You probably don't really need to worry about adding libraries - the Ultimate Blitz setup should already include all the standard ones. Adding custom libraries is fiddly and can result in your source being unreadable by another installation of Blitz so it's best not to do that unless you need to. It was different back in the day when you started off with the core libs and added as new ones were released... |
|||||
18 March 2021, 14:58 | #5 | |||
Registered User
Join Date: May 2001
Location: ?
Posts: 19,648
|
Quote:
this is weird though, now, it is not giving me the error when I run it from Blitz, the Debugger just seems to "end" but the CLI window remains open and it never returns to SuperTED, no error, machine locked there It definitely has to do with the file loaded, because if I skip the file loading, I get no errors. Also is there a way for the debugger not to autoquit? Quote:
Quote:
I'm gonna try to see if I have those libraries because I'd like to display how much free RAM I have. But I am still clueless as to why I am getting the 8000 0020 error. Is there really nothing I should do before end to exit cleanly? |
|||
15 March 2022, 16:35 | #6 |
Registered User
Join Date: Feb 2019
Location: uk
Posts: 106
|
I get EXACTLY the same issue after creating an exe in AmiBlitz 3 - runs fine through Blitz but as soon as I hit an end command to end the software while running independantly - instant Guru
|
15 March 2022, 17:19 | #7 |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 933
|
Do you ever get stack related issues in blitz?
|
15 March 2022, 20:03 | #8 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi!
I don't know Blitz Basic but you could try using StackAttack or StackWatch or similar programs to see if the stack is really involved in these problems? Good luck! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Playing "Legend of Faerghail", suddenly "Software error - Task Held"? | arto | support.WinUAE | 12 | 05 January 2016 18:07 |
"Software Failure" on bootup sequence | Thomas Korte | support.WinUAE | 2 | 16 March 2015 18:40 |
CF card - "no disk in drive" format failure | Zapotek | support.Hardware | 15 | 04 September 2014 00:20 |
WTH is software failure 8000 0025 07402210 ??? | keropi | support.Hardware | 14 | 02 August 2006 10:03 |
"Software failure" | Melvein | support.WinUAE | 3 | 25 June 2004 21:23 |
|
|