|
Post by larrybtoys on Jan 27, 2024 16:44:33 GMT 1
I have a problem with GB32 that I would like to see if anyone else has had and hopefully find a solution. While I am developing a new program I often need to use the CTRL + PAUSE buttons to stop the program from running. After a hand full of uses like maybe 7-8 times, GB32 will no longer run. Whenever I use the RUN option at this point the program acts like there is a STOP in the code that is clearly not there. Closing out GB32 and rerunning it does NOT solve the issue. The only thing I have found thus far to correct the issue is a RESTART of the PC. I am however able to SAVE the program and rerun it after the RESTART with no issues.
|
|
|
Post by (X) on Jan 27, 2024 17:06:59 GMT 1
So far, ~30 years, I have not needed to restart my PC very often. If I had to take a wild guess, your experience seems like a memory leak issue.
I suspect calling a Ctrl-Pause / Ctrl-Break is not the same as a regular program shutdown and it leaves unreleased resources.
In the IDE there is a Ctrl-L "Cleanup Resources" button / menu item. I wonder what good that might do after a Ctrl-Pause.
As I am sure you are well aware, you can see how much memory is allocated to GFA-BASIC in the Task Manager.
A "mem leak" might be spotted there.
|
|
|
Post by larrybtoys on Jan 27, 2024 18:13:23 GMT 1
It does seem like a memory leak issue. I tried CLEANUP RESOURCES along with many other things however once this happens nothing but a RESTART of the PC will work.
|
|
|
Post by Roger Cabo on Jan 27, 2024 19:00:59 GMT 1
Interesting.. that was totally new to me to use CTRL + PAUSE to make a Stop.
I use "Stop" at any Line code, or use the system tray to stop a program "> PAUSE "
|
|
|
Post by larrybtoys on Jan 27, 2024 20:19:34 GMT 1
Perhaps I am causing the issue using the CTRL + the pause key. If I know to stop it I use the STOP command however often I do not know in advance to do that and need to stop the program.
|
|
|
Post by Roger Cabo on Jan 28, 2024 12:59:49 GMT 1
Could be possible if you use any resources that are not released at Stop and then you restart again? Place simple button on the screen with "stop" then click and run through a proc it's releasing all possible data.
|
|
|
Post by larrybtoys on Jan 28, 2024 16:41:57 GMT 1
I already have that button however often I simply need to manually stop the program using the CTRL and PAUSE buttons. After several times of doing this problem occurs.
|
|
|
Post by dragonjim on Jan 29, 2024 10:20:58 GMT 1
I've used the Ctrl-Break/Pause button combination for years and never experienced this problem.
Does this happen with all your programs or just the one you are working on at the moment?
|
|
|
Post by larrybtoys on Jan 29, 2024 14:28:48 GMT 1
I am not sure. It has happened many times over the last 4 years. I try very hard not to use the BREAK function due to this. I will try and put together a small simple demo program and see if it happens and post it. I store several small images and sounds in most of my programs which could also help cause the memory issue. It is possible that using the BREAK function does not release the memory allocated by these images and sounds so that when I run the program a second time the available memory for GB32 is the original amount minus the memory used by GB32 to run the program previously. Eventually the system will run out of memory available for GB32.
|
|
|
Post by larrybtoys on Jan 29, 2024 16:26:48 GMT 1
OK I wrote this sample program and after running it and pressing the CTRL + BREAK keys to stop the program at the main menu screen about 7 or 8 times the program would no longer run without rebooting the computer. Attachments:CTRL-BREAK DEMO.G32 (11.24 KB)
|
|
|
Post by larrybtoys on Jan 29, 2024 16:36:23 GMT 1
Not sure how important this is but I am using a Dell Optiplex machine running version 22H2 of Win 10 Pro, 16 GIG of RAM, and IDE/Compiler version 2.6.2.2626 of GB32.
|
|
|
Post by (X) on Jan 29, 2024 23:09:35 GMT 1
For me, it crashed just after I pressed the Play button. There might be an infinite loop somewhere???
|
|
|
Post by larrybtoys on Jan 30, 2024 0:21:55 GMT 1
I left out a statement however after I rebooted the PC it did not fail for me any more. When I wrote it I had been working on a game for a couple of hours which may have contributed to it failing. This further supports the memory leak possibility...
|
|