Eschecs FreeBASIC (UCI chess GUI)
Re: Eschecs 1.0 (UCI chess GUI)
it hangs off on my system =(
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.0 (UCI chess GUI)
Thank you for testing. Sorry that the program doesn't work on your system. Could you make a description of what happens?ur_naz wrote:it hangs off on my system =(
What I see here from time to time is that while the computer piece is moving, the piece stops and the application crashes. I do not know where it comes from. Is that the problem you found?
Has anyone else tried the program?
Re: Eschecs 1.0 (UCI chess GUI)
Hi Roland!
The program works, but after a few moves hangs. OS: windows XP sp3
The program works, but after a few moves hangs. OS: windows XP sp3
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.0 (UCI chess GUI)
Hello VANYA! Thank you.
I don't know what to do. My apologies to people who downloaded the program yesterday. Any suggestion welcome.
I found something.VANYA wrote:The program works, but after a few moves hangs. OS: windows XP sp3
In build.cmd, I had replaced "%fbc% -s gui -w all" by "%fbc% -s console -exx -w all".Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.
C:\Atelier\Basic\chess\eschecs>build
Deleting eschecs.exe
Current directory: C:\Atelier\Basic\chess\eschecs
C:\Atelier\Basic\chess\eschecs>eschecs
Aborting due to runtime error 12 ("segmentation violation" signal) in C:\Atelier\Basic\chess\eschecs\source\sgui\sGUI_SystemEvents.bas::GETSYSEVENTS()
C:\Atelier\Basic\chess\eschecs>
I don't know what to do. My apologies to people who downloaded the program yesterday. Any suggestion welcome.
Last edited by Roland Chastain on Apr 30, 2018 12:54, edited 1 time in total.
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.0 (UCI chess GUI)
I went through the file sGUI_SystemEvents.bas: I did not notice anything particular. This is the part of the library that detects events related to the mouse and keyboard. If anyone had an idea ...
By the way, why the compiler doesn't give the line number where the error occurs?
The application closes when the piece arrives at its destination.
By the way, why the compiler doesn't give the line number where the error occurs?
The application closes when the piece arrives at its destination.
Re: Eschecs 1.0 (UCI chess GUI)
In another thread I published a link to Dr. Memory, a tool that can be useful in such scenarios.Roland Chastain wrote:I went through the file sGUI_SystemEvents.bas: I did not notice anything particular. This is the part of the library that detects events related to the mouse and keyboard. If anyone had an idea ...
To use it, compile your program with debug information (if you're using GCC, the command line parameter is -gen gcc -Wc -ggdb), and execute it in Dr. Memory like this:
If you're using a 64-bit system:
drmemory -ignore_kernel -- yourprogram.exe (because it's 32-bit for now, you have to 'fudge' it to work in 64-bit mode)
If not, simply remove the -ignore_kernel parameter and invoke it normally:
drmemory -- yourprogram.exe
Or you can use gdb (included with FB)...
Re: Eschecs 1.0 (UCI chess GUI)
it just freezes after some moves and application is not responding (win7 x64)Roland Chastain wrote:Thank you for testing. Sorry that the program doesn't work on your system. Could you make a description of what happens?ur_naz wrote:it hangs off on my system =(
What I see here from time to time is that while the computer piece is moving, the piece stops and the application crashes. I do not know where it comes from. Is that the problem you found?
Has anyone else tried the program?
And even if i close aplication after crash basic.exe (why not eschess.exe?) is still in process explorer
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Eschecs 1.2.1 (UCI chess GUI)
I repaired one bug. Actually it had no relation to sGUI.
Here (Windows 10) the application seems to work. Please test it.
freebasic-eschecs-20180430.zip
@ur_naz
Thank you for report. I also had problems with basic.exe, so it isn't included in the latest release.
@paul doe
Thank you for the link. I downloaded the tool.
Here (Windows 10) the application seems to work. Please test it.
freebasic-eschecs-20180430.zip
@ur_naz
Thank you for report. I also had problems with basic.exe, so it isn't included in the latest release.
@paul doe
Thank you for the link. I downloaded the tool.
Re: Eschecs 1.2.1 (UCI chess GUI)
still freezes but less. this version is French? previous was Deutsch... maybe add menu for select language
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
@ur_naz
Thank you for testing the French version. :)
Yes, a language menu is a good idea, but for now I would prefer to understand why the application freezes.
To build the English version, open a command prompt, change directory to Eschecs main directory, and enter "build english". (Before that you will have to modify the compiler path in build.cmd.)
Thank you for testing the French version. :)
Yes, a language menu is a good idea, but for now I would prefer to understand why the application freezes.
To build the English version, open a command prompt, change directory to Eschecs main directory, and enter "build english". (Before that you will have to modify the compiler path in build.cmd.)
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: Eschecs 1.2.1 (UCI chess GUI)
Eschecs seems to freeze when a piece moves to the lower border of the board (row 1).
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
Found and corrected a bug (which was an unforeseen effect of a previous fix): in case of promotion, the chessboard was not redrawn correctly.
You can download the new files.
But concerning the freezing, I did not advance. In fact, I do not know where to look.
@grindstone
Thank you for your observation but unfortunately I did not find anything.
You can download the new files.
But concerning the freezing, I did not advance. In fact, I do not know where to look.
@grindstone
Thank you for your observation but unfortunately I did not find anything.
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
Hello!
It's sad to let this project in such a state, but unfortunately I don't have time to work on it, and furthermore I have no idea why the application freezes. If ever someone would be interested to search the bug and even continue this project alone, he would be welcome.
More than 10000 downloads on FB Portal!
Here is the download page.
Best regards.
Roland
It's sad to let this project in such a state, but unfortunately I don't have time to work on it, and furthermore I have no idea why the application freezes. If ever someone would be interested to search the bug and even continue this project alone, he would be welcome.
More than 10000 downloads on FB Portal!
Here is the download page.
Best regards.
Roland
Re: Eschecs 1.2.1 (UCI chess GUI)
Hi, Roland!Roland Chastain wrote:Hello!
It's sad to let this project in such a state, but unfortunately I don't have time to work on it, and furthermore I have no idea why the application freezes. If ever someone would be interested to search the bug and even continue this project alone, he would be welcome.
Your problem, basically, lies in the mouse polling that sGUI does. Look at this snippet:
Code: Select all
#include once "fbgfx.bi"
type threadedSub as sub( byval as any ptr )
type Thread
public:
declare constructor( _
byval as threadedSub, _
byval as any ptr )
declare destructor()
declare sub start()
declare sub finish()
private:
declare constructor()
declare static sub run( _
byval as Thread ptr )
m_threadID as any ptr
m_running as boolean
m_callback as threadedSub
m_param as any ptr
end type
constructor Thread()
end constructor
constructor Thread( _
byval aCallback as threadedSub, _
byval aParameter as any ptr )
m_callback = aCallback
m_param = aParameter
m_threadID = threadCreate( _
cptr( sub( byval as any ptr ), @run ), @this )
end constructor
destructor Thread()
finish()
threadWait( m_threadID )
end destructor
sub Thread.run( _
byval anInstance as Thread ptr )
do while( anInstance->m_running )
anInstance->m_callBack( anInstance->m_param )
sleep( 1, 1 )
loop
end sub
sub Thread.start()
m_running = true
end sub
sub Thread.finish()
m_running = false
end sub
type MouseInfo
x as integer
y as integer
button as integer
end type
sub HangingPollMouse( byval info as MouseInfo ptr )
getMouse( info->x, info->y, , info->button )
end sub
sub PollMouse( byval info as MouseInfo ptr )
dim as fb.event e
if( screenEvent( @e ) <> 0 ) then
select case as const e.type
case fb.EVENT_MOUSE_MOVE
info->x = e.x
info->y = e.y
end select
end if
end sub
screenRes( 800, 600, 32 )
dim as MouseInfo myInfo
'' This works OK
dim as threadedSub myCallback = _
cptr( sub( byval as any ptr ), @PollMouse )
'' Try this one instead, it hangs the process
'dim as threadedSub myCallback = _
' cptr( sub( byval as any ptr ), @HangingPollMouse )
var aThread = Thread( myCallback, @myInfo )
aThread.start()
do
screenLock()
cls()
line( myInfo.x - 50, myInfo.y - 50 ) - _
( myInfo.x + 50, myInfo.y + 50 ), _
rgba( 255, 0, 0, 255 ), bf
screenUnlock()
sleep( 1, 1 )
loop until( inkey() <> "" )
aThread.finish()
The solution is easy but, unfortunately, it requires patching of the sGUI library, but you'll have to untangle it to do so. I hope that this helps you, or at least give you a hint where to look =D
Congratulations for reaching this milestone! =DRoland Chastain wrote:More than 10000 downloads on FB Portal!
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs 1.2.1 (UCI chess GUI)
@paul doe
Hi! Thank you for your kind and instructive answer. I know where to look now. :)
Hi! Thank you for your kind and instructive answer. I know where to look now. :)