4D maze
#1
Hello !

I am renewing my older programs. What could be the problem ? I always make programs under QB64 1.2. I tried the refurbished one
"4D maze" program and does not start on newer versions. Sad It doesn't write an error message. windows7 says: "the program stops" ...and that's it. Does anyone know why?

It works perfectly under QB 1.2!


Attached Files
.zip   4d_maze_v9.zip (Size: 2.02 MB / Downloads: 40)
Reply
#2
Hi MasterGy,

Since QB64.exe v 2.0+ you have to be careful using the Function name as a variable in the calculations for the Function.

I rewrote this function to obey this new rule for Functions:
Code: (Select All)
Function kivul
    rtn = 0: For t = 0 To 3: rtn = rtn Or (ana(t) < 0 Or ana(t) > maze_s(t) - 1) Or (ana(t) < 0 Or ana(t) > maze_s(t) - 1): Next t
    kivul = rtn
End Function

And now the program does not bug out on me while loading screen up!!!

I simply replaced all kivul's with rtn in the Function definition. That is basic fix to most problems of incompatible programs that worked before v 2.0 but now don't.

Pretty cool stuff there MasterGy! way the heck over my head ;-))
   
b = b + ...
Reply
#3
(07-19-2022, 08:56 PM)bplus Wrote: Hi MasterGy,

Since QB64.exe v 2.0+ you have to be careful using the Function name as a variable in the calculations for the Function.

I rewrote this function to obey this new rule for Functions:
Code: (Select All)
Function kivul
    rtn = 0: For t = 0 To 3: rtn = rtn Or (ana(t) < 0 Or ana(t) > maze_s(t) - 1) Or (ana(t) < 0 Or ana(t) > maze_s(t) - 1): Next t
    kivul = rtn
End Function

And now the program does not bug out on me while loading screen up!!!

I simply replaced all kivul's with rtn in the Function definition. That is basic fix to most problems of incompatible programs that worked before v 2.0 but now don't.

Pretty cool stuff there MasterGy! way the heck over my head ;-))
You are great Bplus! Smile You are great for finding the error so quickly and thank you for taking care of it! the 2.0.2. I tried with version and it indicated errors of this kind at the bottom. After I rewrote the names in the functions, it no longer indicated an error. So he wrote "ok" and still this error remained. I tried it, it works fine. Thank you very much once again!
Reply
#4
@MasterGy. thank you for sharing this code which is very complex. interesting to study. the result is impressive. it gives an idea of the potential of qb64. that said, with my version of qb64 compiled in O3, the program disappears very quickly from the screen but the process remains in memory and is not released with a zero activity. note that i use linux and i had to force to kill the program. i also tested with the normal version of qb64. the program runs longer but ends up crashing while staying in memory. if you were using version 1.2 of qb64, the language must have evolved a lot since then. it will be hard to find the bug. in any case, excellent work.
Reply
#5
(07-22-2022, 08:29 AM)Coolman Wrote: @MasterGy. thank you for sharing this code which is very complex. interesting to study. the result is impressive. it gives an idea of the potential of qb64. that said, with my version of qb64 compiled in O3, the program disappears very quickly from the screen but the process remains in memory and is not released with a zero activity. note that i use linux and i had to force to kill the program. i also tested with the normal version of qb64. the program runs longer but ends up crashing while staying in memory. if you were using version 1.2 of qb64, the language must have evolved a lot since then. it will be hard to find the bug. in any case, excellent work.

Thanks for watching! Unfortunately, I still don't understand the reasons for the memory leak. He's taking it out on me. I pay attention to freeing the memory. (for example _freefont, _freeimage )

When running on two computers with the same operating system (win7), memory consumption increases on one, but not on the other. I do not understand .
Reply
#6
if it happens under windows and you free the memory correctly then the problem may be in qb64. it may be a bug. this kind of problem under linux has no serious consequences because the system detects memory overflow and stops the program automatically before it causes any damage but when I was testing qb64 under windows a long time ago, I often had this kind of crash followed irreparably by the instability of the whole system. that's why I had stopped using qb64 under windows 7.
Reply




Users browsing this thread: 1 Guest(s)