Program crashes hard with error messages - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Program crashes hard with error messages (/showthread.php?tid=1150) |
Program crashes hard with error messages - Dav - 11-18-2022 I'm making an animated Christmas card to post next month, having serious crash-outs with it, so I guess I'll have to post it early to get help so I can continue working on the card. It compiles ok, but when the program finishes running, or when you press a key to quit, it hangs up. I have to use task manager to kill it, and it gives the following 2 Alert error messages boxes: "Alert" "list_add: failed to allocate new buffer, structure size:" ...and after closing that one, the next box pops up.... "Alert" "116" Here's the BAS code so you can try it. Merry Christmas early... - Dav DavXmas2022.bas (Size: 189.1 KB / Downloads: 126) RE: Program crashes hard with error messages - SMcNeill - 11-18-2022 Umm.... My apologies, @Dav. I don't think I'll be able to help debug this one for you! Not that I don't want to help, but the problem is: It's running just fine and closing without a single glitch on my PC! O_o! How the heck can I debug what's running and playing perfectly??? RE: Program crashes hard with error messages - Pete - 11-18-2022 You guys might want to open task manager and compare memory usage. Sometimes an over use of memory on a lower memory system can cause these types of problems. Just a guess. Pete RE: Program crashes hard with error messages - SMcNeill - 11-18-2022 (11-18-2022, 09:54 PM)Pete Wrote: You guys might want to open task manager and compare memory usage. Sometimes an over use of memory on a lower memory system can cause these types of problems. Just a guess. Doubt it's that. Dav's program here has one of the nicest QB64 footprints that I've seen for a while. The hardware images help keep mem usage down. RE: Program crashes hard with error messages - Pete - 11-19-2022 Dav did mention in another post "Windows 7 is still my main OS on my Laptop..." There are Win 7 32-bit OS's, so if Dav is running it on a 32-bit system, maybe that's the difference. If he has a 64-bit Win 7, I would doubt there would be any difference. Pete RE: Program crashes hard with error messages - Dav - 11-19-2022 Thanks for testing it. I went away on a gig, came back home, turned the PC back on, it ran fine. Thought it must have been just some Windows gremlins. So I started playing with it again and the error came back after I added below - I wanted the snow to keep falling after exiting the main DO/LOOP. I noticed the error messages will go away if you add a _DISPLAY in that loop, like there should be, but without it the program cannot terminate regularly. - Dav EDIT: Pete, that's correct - I'm running Win7 32-bit. Try adding this on line#148 before the SYSTEM call and see what happens when you try to exit: Code: (Select All) DO RE: Program crashes hard with error messages - SMcNeill - 11-19-2022 Seems to me that the glitch would be right here: Code: (Select All) _PutImage (flake.x(f), flake.y(f))-Step(30 * flake.s(f), 30 * flake.s(f)), snows(flake.a(f)) Code: (Select All) snows(I) = _CopyImage(flake&, 33) Snows are hardware images. Hardware images need _DISPLAY before they can be rendered and cleared out of the GPU. The FOR loop that you have there at the end is pumping the GPU buffers full of images, and it never empties out those buffers. After a zillion images are stacked in that buffer, something just glitches out somewhere and the program locks up waiting for those to be cleared before exiting completely. Seems to me that QB64 should do some clean up here (if it possibly can), before attempting to close and freezing up. Fix, for now, is to make certain that you have a nice _DISPLAY in place before that SYSTEM statement. RE: Program crashes hard with error messages - Dav - 11-19-2022 That must be it, Steve. Thanks. I'll be careful with that in the future. - Dav |