Compiling Winboard - Master Settings File Question

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Compiling Winboard - Master Settings File Question

Postby Charles Browne » 15 Aug 2011, 05:14

It has been a while since I compiled a Winboard executable.

When compiling the latest source code from H.G. Muller's source repository no problems were encountered while compiling, and the source code was from the following link on the repository page.

2 days ago H.G. Muller Fix generic-popup failure after empty engine-settings...


The help about box for the compiled executable had this listed.

Winboard master-20110618


When clicking the executable and choosing "Just view or edit games" and clicking OK, Winboard crashed and kicked up one of those send to Micosoft boxes.

The problem was narrowed down to a missing Winboard master settings file. Is this normal behavior for Winboard to crash when the master settings file is missing? And is Winboard suppose to generate a master settings file if it is not present?
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Compiling Winboard - Master Settings File Question

Postby H.G.Muller » 15 Aug 2011, 08:28

WinBoard does not treat master settings files different from any other settings file. They become master settings files because they contain options at the end they redirect loading and saving settings to somehwere else, that way protecting themselves from being overwritten.

At startup the WinBoard settings-file name is set to winboard.ini inits own installation folder, by its internal initialization code, like it has always been. This means WinBoard will try to read winboard.ini, (and should just not read anything when that does not exist, leaving the compiled-in default settings in force), and will save ists (user) settings there. Only if it finds a settings file there that instructs it to do otherwise, it will be saving the user settings in another place, effectively promoting the winboard.ini in its installation folder to a 'master' settings file.

It is more likely that there is something intrinsically wrong with that version, and that by coincidence it is not fatal for some settings, and fatal for others. The latest versions in my on-line repository have only been tested for XBoard, I did not even try to compile it for WinBoard. Unfortunately the help->about box from versions directly taken from the repository does not give meaningful information, because we don't update the message for every change we make. It gets only updated when we do an official 'developer release'. (When I make a WinBoard binary for upload, I have to change the version numbers in the config.h file by hand, before I compile, to make sure the about box contains a useful ID.) So the only way to identify it is if I would know the name of the commit you took the 'snapshot' from.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Compiling Winboard - Master Settings File Question

Postby Charles Browne » 15 Aug 2011, 08:49

H.G.Muller wrote:So the only way to identify it is if I would know the name of the commit you took the 'snapshot' from.


I got it from the snapshot link at the link with the wording I mentioned above.

2 days ago H.G. Muller Fix generic-popup failure after empty engine-settings...

I had only tried the compiled executable in XP home, I just tried it in Windows ME and when the master settings file is present and the executable is clicked on and ultimately OK is clicked on in the Winboard startup dialog box, Windows ME kicks up a message box that reads.

Winboard has caused an error in MSVCRT.DLL
Winboard will now close.



In Windows ME when the master settings file is not present and the executable is clicked on and then the OK button is ultimately clicked on, a box pops up about Winboard causing an error in Winboard.exe, or something to that affect.

I am using an older version of Cygwin/gcc that is compatible with Windows ME and Windows XP, so I am not going to spend any more time on looking at this since it might well be an older gcc compiler version issue.
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Compiling Winboard - Master Settings File Question

Postby H.G.Muller » 16 Aug 2011, 22:23

OK, I fixed it. The problem was in the routine that makes the title of the evaluation-graph window (which I added to display score/depth there). On a 'cold' start it tried to use the score of an invalid move (move number "-1") there. The latest version in hgmaster should have this fixed.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Compiling Winboard - Master Settings File Question

Postby Charles Browne » 17 Aug 2011, 05:55

Compiling the snapshot from the below link, which at the time was the last entry in the repository, the compiled executable did not crash and did create a winboard.ini file when the Winboard GUI was exited.

7 hours ago H.G. Muller Finish position-search user interface WB

And adding the below to the end of the newly created winboard.ini file would cause the created winboard.ini file to become a master settings file which would redirect saved settings to a another created winboard.ini file in another directory. If the below is not entered into the end of the newly created winboard.ini file, then that newly created winboard.ini file becomes the only winboard.ini file that the Winboard GUI will use. I got it.

Code: Select all
;
; Here we redirect the saving to another file (specific for the user)
;
/saveSettingsFile=%APPDATA%\winboard.ini
/settingsFile=%APPDATA%\winboard.ini
;
; Any setting after this will make the option overrule the saved one
;



Should it be of any interest this is what was displayed in the Cygwin console while the source was compiling.

Code: Select all
cwb@homexp /cygdrive/e/xboard/winboard
$ make -f makefile.gcc
 ../backend.c
../backend.c: In function `HandleMachineMove':
../backend.c:8615: warning: unsigned int format, different type arg (arg 7)
../backend.c:8744: warning: unsigned int format, different type arg (arg 4)
../backend.c:8807: warning: unsigned int format, different type arg (arg 7)
../backend.c: At top level:
../backend.c:11296: warning: return type defaults to `int'
../backend.c: In function `QuickCompare':
../backend.c:11246: warning: control reaches end of non-void function
../backend.c: In function `InitSearch':
../backend.c:11313: warning: control reaches end of non-void function
../backend.c: In function `GameContainsPosition':
../backend.c:11321: warning: 'promoChar' might be used uninitialized in this fun
ction
 ../book.c
 ../gamelist.c
../gamelist.c: In function `GameListBuild':
../gamelist.c:223: warning: implicit declaration of function `GetTimeMark'
../gamelist.c:245: warning: implicit declaration of function `CopyBoard'
../gamelist.c:245: warning: implicit declaration of function `PackGame'
../gamelist.c:299: warning: implicit declaration of function `ParseFEN'
../gamelist.c:344: warning: implicit declaration of function `ApplyMove'
../gamelist.c:345: warning: implicit declaration of function `PackMove'
../gamelist.c:382: warning: implicit declaration of function `SubtractTimeMarks'

 ../lists.c
 ../moves.c
 ../pgntags.c
 ../uci.c
 ../zippy.c
 ../parser.c
windres -D_WIN32_IE=0x0300 -DWIN32 --use-temp-file --include-dir .. winboard.rc
-O coff -o wbres.o
 wclipbrd.c
 wedittags.c
 wengineoutput.c
 wevalgraph.c
 wgamelist.c
wgamelist.c: In function `GameListToListBox':
wgamelist.c:89: warning: implicit declaration of function `InitSearch'
wgamelist.c:107: warning: implicit declaration of function `GameContainsPosition
'
wgamelist.c: In function `GameListDialog':
wgamelist.c:282: warning: implicit declaration of function `LoadOptionsPopup'
 whistory.c
 ../history.c
 winboard.c
winboard.c: In function `HistorySet':
winboard.c:9830: warning: implicit declaration of function `MakeEngineOutputTitl
e'
 wlayout.c
 woptions.c
 wsnap.c
 wsockerr.c
 help.c
 wsettings.c
 wchat.c
 ../engineoutput.c
../engineoutput.c: In function `UpdateControls':
../engineoutput.c:481: warning: unsigned int format, different type arg (arg 4)
 ../evalgraph.c
"C:/Program Files/Help Workshop/hcrtf" -xn winboard.hpj
Microsoft (R) Help Compiler
HCRTF 4.03.0002
Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved.
winboard.hpj
    HC3096: Warning: topic #1 of e:\xboard\winboard\winboard.rtf :
        The font name "Franklin Gothic Medium Cond Greek" is longer than 31 char
acters.
    HC3096: Warning: topic #1 of e:\xboard\winboard\winboard.rtf :
        The font name "Franklin Gothic Medium Cond Baltic" is longer than 31 cha
racters.
    HC3096: Warning: topic #1 of e:\xboard\winboard\winboard.rtf :
        The font name "Franklin Gothic Demi Cond Baltic" is longer than 31 chara
cters.
541     Topics
204     Jumps
548     Keywords
0       Bitmaps


Created e:\xboard\winboard\winboard.hlp, 244,553 bytes
Compile time: 0 minutes, 0 seconds
0 notes, 3 warnings
gcc  backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o parser.
o wbres.o wclipbrd.o wedittags.o wengineoutput.o wevalgraph.o wgamelist.o whisto
ry.o history.o winboard.o wlayout.o woptions.o wsnap.o wsockerr.o help.o wsettin
gs.o wchat.o engineoutput.o evalgraph.o -mno-cygwin -lmsvcrt -DNDEBUG -fpic -s -
mwindows -lwsock32 -lwinmm -lcomctl32 -o winboard.exe

cwb@homexp /cygdrive/e/xboard/winboard
$



A question, when adding engines to Winboard thru the GUI itself and not editing the ini file manually, are engines ever added to the /secondChessProgramNames= section in the ini file, or are they only added to the /firstChessProgramNames= section?
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Compiling Winboard - Master Settings File Question

Postby matematiko » 17 Aug 2011, 23:37

I get this error:

The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler

I will try something different.

Regards,

Edit: Well, I was able to compile by changing USE_MINGW=1 to USE_MINGW=0 which makes winboard.exe dependent on cygwin1.dll but I can live with this. Thanks
One that does not live to serve, does not deserve to live.
matematiko
 
Posts: 219
Joined: 07 Dec 2008, 17:11
Location: Texas


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 7 guests