rchastain / eschecs

UCI chess GUI
GNU Lesser General Public License v2.1
37 stars 9 forks source link

Fixed some memory leaks. #15

Closed fredvs closed 6 years ago

fredvs commented 6 years ago

Hello Roland.

Fixed some memory leaks. For challenging, there is the last one to find/fix. One clue: it is not uos-related. (I give you that challenge!)

Please note that there are still conflicts with eschecs.eng and eschecs.ini. If those 2 files are not in root directory of Eschecs (not only in /config) the app crash.

Could you add also the sound-files that you did choose?

Fre;D

fredvs commented 6 years ago

In last commit, updated uos files with last commit uos d355732..88aec9e. This commit disable debug mode for no-Unix applications. If you are using Windows, -dDEBUG will have no effect on uos.

Fre;D

rchastain commented 6 years ago

Thank you Fred. I will look at all that tonight. For now I am at work. Regards. Roland

rchastain commented 6 years ago

Hello Fred! About the ENG and INI files, I decided to keep the INI file in the main directory, and to move all other files to config/ folder. My idea was to allow the user to edit the INI file. We still can discuss about that, but it isn't a bug. I also had in mind to move the content of the ENG file to the INI file. Please tell if you are OK with that.

rchastain commented 6 years ago

The application could crash if you delete the INI file and keep the FEN file. The two files must be deleted together. For the ENG file, if it doesn't exist, the program uses the JSON file.

rchastain commented 6 years ago

Challenge solved (I believe). See the latest commits. ;)

rchastain commented 6 years ago

There is still a bug!

rchastain commented 6 years ago

OK, I see. I made the same mistake everywhere. Just let me some minutes.

Thank you for the tip about the -ghl option. Without that I would never have seen all these errors. 👍

rchastain commented 6 years ago

Done. I believe all memory leaks are fixed now.

rchastain commented 6 years ago

I cannot compile uos with -dDEBUG.

uos.pas(8316,1) Fatal: Syntax error, "identifier" expected but "BEGIN" found

rchastain commented 6 years ago

Fixed the last of last memory leaks. :)

It's incredible how many errors there were in that program, and I see them only today, with your help. Thank you Fred!

fredvs commented 6 years ago

Hello Roland.

I cannot compile uos with -dDEBUG.

Huh, here on Windows I cannot compile Eschecs with -dDEBUG and without -dOPT_SOUND too.

Fre;D

fredvs commented 6 years ago

Hello.

IMHO, -dOPT_DEBUG for Eschecs code should be a better solution, it seems that there are problems with -dDEBUG and fpGUI too.

fredvs commented 6 years ago

Hello Fred! About the ENG and INI files, I decided to keep the INI file in the main directory, and to move all other files to config/ folder. My idea was to allow the user to edit the INI file. We still can discuss about that, but it isn't a bug. I also had in mind to move the content of the ENG file to the INI file. Please tell if you are OK with that.

I find it complicated and would prefer all in /config directory.

fredvs commented 6 years ago

I wait for your feu vert to try your commits.

And to say bravo if I do not find any memory leak.

Fre;D

rchastain commented 6 years ago

Hello Fred! Maybe we didn't understand each other yesterday. I had answered to you in the other discussion. Have a nice day! Regards. Roland