rijalati / raptor-chess-interface

Automatically exported from code.google.com/p/raptor-chess-interface
0 stars 0 forks source link

Automatic Engine analysis crashed #692

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. i ahve a pgn file saved
2. started analysing the game using automatic engine analysis
3. then it crashed

What is the expected output? What do you see instead?
should have continued with analysis. but it threw an error and crashed

What version of the product are you using? On what operating system and
what environment?

mac book pro. 
raptor .98u3f5
Operating system : Mac OS X Lion 10.7.4 (11E2617)

Please provide any additional information below.

Original issue reported on code.google.com by naveenti...@gmail.com on 19 Nov 2012 at 12:56

GoogleCodeExporter commented 9 years ago
Could provide the PGN file and the error text please?

Original comment by bvk...@gmail.com on 20 Nov 2012 at 6:22

GoogleCodeExporter commented 9 years ago
Here is the error text and the pgn file attached. 

Error occured! We are trying to make Raptor bug free and we need your help! 
Please take a moment to report this issue by selecting the menu:
  Help -> Report Issue 

Error in ThreadService Runnable.
SWTException: Failed to execute runnable (java.lang.NullPointerException)
org.eclipse.swt.SWTException: Failed to execute runnable 
(java.lang.NullPointerException)
    at org.eclipse.swt.SWT.error(Unknown Source)
    at org.eclipse.swt.SWT.error(Unknown Source)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Unknown Source)
    at org.eclipse.swt.widgets.Display.syncExec(Unknown Source)
    at raptor.swt.chess.controller.AutomaticAnalysisController$1.run(Unknown Source)
    at raptor.service.ThreadService$RunnableExceptionDecorator.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
    at raptor.swt.chess.controller.AutomaticAnalysisController$1$3.run(Unknown Source)
    at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at raptor.Raptor.main(Unknown Source)

Original comment by naveenti...@gmail.com on 20 Nov 2012 at 7:53

Attachments:

GoogleCodeExporter commented 9 years ago
I can't reproduce the error with Stockfish on linux, what engine are you using? 
It would be very helpful if you could try to analyze the game with Stockfish 
(it's free http://stockfishchess.org/) on mac.

Original comment by bvk...@gmail.com on 21 Nov 2012 at 6:15

GoogleCodeExporter commented 9 years ago
I am using freechess.org . Should it matter what chess engine I am using, as it 
is a saved game analysis ?

Original comment by naveenti...@gmail.com on 22 Nov 2012 at 7:58

GoogleCodeExporter commented 9 years ago
For me this problem was solved after choosing a chess engine (Stockfish, you 
have to download it first) under Preferences/Chess Engine/UCI Engine (Raptor 
.98u3f5 on Mac OSX). 

Original comment by lucky.te...@gmail.com on 7 Apr 2013 at 7:54

GoogleCodeExporter commented 9 years ago
Hi there,

I got the crash as well.

Raptor version: .98u3f5
Java 1.7.0 u17
OS: MacOS Mountain Lion

1. Set only the Preferences > Chess Engines > XBoardEngine (i.e. no UCI Engine)
    I set crafty-23.4
2. Open a pgn game
3. Click on the analysis button
=> Crash.

When I repeat the scenario on a debug version run from the svn revision r2446, 
I get the following stack trace:
==========
Error in ThreadService Runnable.
SWTException: Failed to execute runnable (java.lang.NullPointerException)
org.eclipse.swt.SWTException: Failed to execute runnable 
(java.lang.NullPointerException)
    at org.eclipse.swt.SWT.error(SWT.java:4361)
    at org.eclipse.swt.SWT.error(SWT.java:4276)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:196)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4607)
    at raptor.swt.chess.controller.AutomaticAnalysisController$1.run(AutomaticAnalysisController.java:95)
    at raptor.service.ThreadService$RunnableExceptionDecorator.run(ThreadService.java:48)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
    at raptor.swt.chess.controller.AutomaticAnalysisController$1$3.run(AutomaticAnalysisController.java:99)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3946)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3623)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at raptor.Raptor.main(Raptor.java:214)
=============

a. Looking at AutomaticAnalysisController.java:99 ("if 
(thisPosScore.getMateInMoves() != 0)"), I could see that 
AutomaticAnalysisController#thisPosScore is null.
b. 'AutomaticAnalysisController#thisPosScore' is set in 
'AutomaticAnalysisController#engineSentInfo'
c. which is only called by 'UciAnalysisWidget$UCIInfoListener#engineSentInfo'. 
d. But I would suppose that no UCI info listener correctly works as only a 
xchessboard engine is set.

Besides, I could notice that 'ChessBoard#createEngineAnalysisWidget' creates a 
'UciAnalysisWidget' instead of a  'XboardAnalysisWidget' (the preferences are 
not used in the method to determine the analysis widget that should be used).

I definitely look forward to the fix as I enjoy using Raptor GUI and would like 
to connect my own chess engine to it! (and I do not trust UCI connector at this 
point…)

Many thanks in advance,

Kind regards,

Marc-Olivier

Original comment by mo.and...@gmail.com on 30 May 2013 at 10:07