Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program crashes hard with error messages
#6
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
    'update the flakes
    FOR f = 1 TO flakes
        _PUTIMAGE (flake.x(f), flake.y(f))-STEP(30 * flake.s(f), 30 * flake.s(f)), snows(flake.a(f))
        flake.y(f) = flake.y(f) + flake.ys(f) 'lower y position
        'if flake goes off screen below , make a new flake above
        IF flake.y(f) > _HEIGHT + (flake.s(f) * 8) THEN flake.y(f) = RND * _HEIGHT - _HEIGHT - (flake.s(f) * 8)
        'move all flakes left
        flake.x(f) = flake.x(f) - 1.5
        'if it goes off screen, make a new flake on right
        IF flake.x(f) < -(flake.s(f) * 8) THEN flake.x(f) = RND * _WIDTH + _HEIGHT + (flake.s(f) * 8)
        'drift flakes a little left or right sometimes...
        IF INT(RND * 3) = 1 THEN flake.x(f) = flake.x(f) - (flake.s(f) / 1.4)
        IF INT(RND * 3) = 2 THEN flake.x(f) = flake.x(f) + (flake.s(f) / 1.4)
    NEXT
    IF INKEY$ <> "" THEN END
LOOP

Find my programs here in Dav's QB64 Corner
Reply


Messages In This Thread
Program crashes hard with error messages - by Dav - 11-18-2022, 06:53 PM
RE: Program crashes hard with error messages - by Dav - 11-19-2022, 12:37 AM



Users browsing this thread: 4 Guest(s)