Menu

#79 Opening of a cbh aborted due an internal error

None
closed-fixed
None
1
2018-08-28
2014-03-13
Cecchino
No

Hello, I am with r1000, Ubuntu 12.04.

This errors is thrown while I am trying to open a game in cbh. The game is from Dvoretsky Endgame Manual. I mean, the error happens whatever game I try to open from that database.

I tried also to export the database in .sci format, but it fails.

I remember for sure that some time ago, with a previous version of scidb, this database works fine (even the exporting function).

P.S. I tried a different cbh and it works fine.

Bye

(func) setup
(file) cbh/cbh_decoder_position.cpp:324
(what) precondition violation: strm.bitsLeft() >= 224
(type) mstl::precondition_violation_exception

=== Backtrace ============================================
db::cbh::decoder::Position::setup(util::BitStream&) [cbh_decoder_position.cpp:324]
db::cbh::Decoder::startDecoding(db::TagSet) [cbh_decoder.cpp:1185]
db::cbh::Decoder::doDecoding(db::GameData&) [cbh_decoder.cpp:1204]
db::cbh::Codec::doDecoding(db::GameData&, db::GameInfo&, unsigned int, mstl::string
) [cbh_codec.cpp:2622]
db::DatabaseCodec::decodeGame(db::GameData&, db::GameInfo&, unsigned int, mstl::string) [db_database_codec.cpp:855]
db::Database::loadGame(unsigned int, db::Game&, mstl::string
, mstl::string const) [db_database.cpp:839]
db::Database::loadGame(unsigned int, db::Game&, mstl::string&, mstl::string const
) [db_database.ipp:245]
app::Application::loadGame(unsigned int, app::Cursor&, unsigned int, mstl::string const*) [app_application.cpp:1348]
cmdLoad [tcl_game.cpp:1432]
safeCall [tcl_base.cpp:764]
==========================================================

while executing

"::scidb::game::load $position $base $variant $opts(-number) $opts(-fen) {*}$options "
(func) setup
(file) cbh/cbh_decoder_position.cpp:324
(what) precondition violation: strm.bitsLeft() >= 224
(type) mstl::precondition_violation_exception

=== Backtrace ============================================
db::cbh::decoder::Position::setup(util::BitStream&) [cbh_decoder_position.cpp:324]
db::cbh::Decoder::startDecoding(db::TagSet) [cbh_decoder.cpp:1185]
db::cbh::Decoder::doDecoding(db::GameData&) [cbh_decoder.cpp:1204]
db::cbh::Codec::doDecoding(db::GameData&, db::GameInfo&, unsigned int, mstl::string
) [cbh_codec.cpp:2622]
db::DatabaseCodec::decodeGame(db::GameData&, db::GameInfo&, unsigned int, mstl::string) [db_database_codec.cpp:855]
db::Database::loadGame(unsigned int, db::Game&, mstl::string
, mstl::string const) [db_database.cpp:839]
db::Database::loadGame(unsigned int, db::Game&, mstl::string&, mstl::string const
) [db_database.ipp:245]
app::Application::loadGame(unsigned int, app::Cursor&, unsigned int, mstl::string const*) [app_application.cpp:1348]
cmdLoad [tcl_game.cpp:1432]
safeCall [tcl_base.cpp:764]
==========================================================

while executing

"::scidb::game::load $position $base $variant $opts(-number) $opts(-fen) {*}$options "

Discussion

  • Gregor Cramer

    Gregor Cramer - 2014-03-13
    • status: open --> accepted
    • assigned_to: Gregor Cramer
    • Priority: 5 --> 1
     
  • Gregor Cramer

    Gregor Cramer - 2014-03-13

    Please wait for revision #1001 and test try it again. Version r1001 will also read MegaBase 2014, is already testet. But the release of r1001 takes a while, I've changed and overworked a lot, this is not yet finished and requires testing.

     
  • Cecchino

    Cecchino - 2014-03-13

    Ok I will do it.

    Does it read the entire MegaDB2014 ? And in how much time? I did neither hazard with the 2013 !

    Bye

     
  • Gregor Cramer

    Gregor Cramer - 2014-03-14

    Does it read the entire MegaDB2014 ?

    Except 11 games. In some games the decoding format is unknown for me.

    And in how much time?

    Less than 1 hour with an optimized Scidb version. If I remember right the debug version needs less than 3 hours.

    I'm optimistic that the MegaBase 2013 will also work with r1001.

     
  • Valeriy Huz

    Valeriy Huz - 2014-05-25

    What are that 11 games? :) I'm trying to convert MegaDB2014 to si4 format, but with no luck. It segfault somewhere. r1002, Arch.

     
  • Gregor Cramer

    Gregor Cramer - 2014-05-25

    Sorry, I've released r1001 and r1002 because of urgent bug-fixes, but it is not yet the planned release which works with MegaDB2014, I'm developing on a different branch because it will be a release with huge changes. It still takes a while until this version will be ripe. The current status:

    1. MegaDB2014 is working, but the position search (opening tree) is too slow with such a huge database, so I've developed a new algorithm for the acceleration of the position search.

    2. This algorithm is not yet finished, because it depends on a ECO base which is clean and algebraically closed. I'm working since more than two months on this ECO base, it's an enormous effort, this base contains more than 70.000 lines (variants). But I'm about to finish the ECO base.

    3. Hopefully the algorithm will work as expected, no practical experience yet, because it is still unfinished.

    4. As a side effect Scidb can provide an opening classification for all games in database.

     
  • antoyo

    antoyo - 2015-03-19

    Hello.
    Any news on this issue?
    I am unable to open some some PGN or CBH databases due to a segfault (in revision 1051).
    Can I help you fix this issue?
    Where can I see your different branch to test it?
    Thanks for your work.

     
  • Gregor Cramer

    Gregor Cramer - 2015-03-19

    Any news on this issue?

    Revision 1051 is importing MegaBase 2014 without any problem.

    I am unable to open some some PGN or CBH databases due to a segfault (in revision 1051).

    The segfault is due to a problem with stack backtracing related to newer compilers. It should help if you install the debugger, on Ubuntu use "sudo apt-get install gdb".

    Can I help you fix this issue?

    I need an effected ChessBase database or an affected PGN archive to replicate this problem. Is it possible to provide a database? I can send you a link to dropbox for uloading.

     
  • antoyo

    antoyo - 2015-03-19

    You are right. It now opens MegaDatabase 2014. I don't know why it did not work last time.
    Here is one PGN that cause scidb to crash:
    http://www.theweekinchess.com/zips/twic943g.zip
    It is a false assertion (not a segfault as I thought).
    It seems to be due to a result tag in the wrong format.
    It would be nice if the application just ignore those kinds of errors.

    By the way, I offered my help because I know C++ (though I don't know Tcl and I don't have much free time now). If you need help, I may spend some time from time to time.

    Here is the error log:

    (func) process
    (file) db_pgn_reader.cpp:995
    (what) assertion failed: token == kResult
    (type) mstl::assertion_failure_exception

    === Backtrace ============================================
    db::PgnReader::process [db_pgn_reader.cpp:995]
    db::MultiBase::importGames [db_multi_base.cpp:417]
    app::MultiCursor::MultiCursor [app_multi_cursor.cpp:153]
    app::Application::create [app_application.cpp:744]
    cmdOpen [tcl_database.cpp:1187]
    safeCall [tcl_base.cpp:764]
    main [tkscidb.cpp:109]
    ==========================================================

    (func) process
    (file) db_pgn_reader.cpp:995
    (what) assertion failed: token == kResult
    (type) mstl::assertion_failure_exception

    === Backtrace ============================================
    db::PgnReader::process [db_pgn_reader.cpp:995]
    db::MultiBase::importGames [db_multi_base.cpp:417]
    app::MultiCursor::MultiCursor [app_multi_cursor.cpp:153]
    app::Application::create [app_application.cpp:744]
    cmdOpen [tcl_database.cpp:1187]
    safeCall [tcl_base.cpp:764]
    main [tkscidb.cpp:109]
    ==========================================================

    while executing
    

    "::util::catchException $cmd"
    (procedure "::application::database::openBase" line 82)
    invoked from within
    "::application::database::openBase $parent $file yes -encoding $encoding"
    (procedure "::menu::dbOpen" line 14)
    invoked from within
    "{}$cmd"
    (procedure "::application:ℹ️:Mouse1Down" line 15)
    invoked from within
    "{
    }$script $nodeList "
    (procedure "GenerateEvent" line 16)
    invoked from within
    "GenerateEvent $w onmousedown${k} [array names ActiveNodes$k]"
    (procedure "ButtonPress" line 17)
    invoked from within
    "ButtonPress [winfo parent $w] $x $y {*}$args"
    (procedure "WrapButtonPress" line 4)
    invoked from within
    "WrapButtonPress .application.nb.information.inf.html.sub.html.document 99 329 1 16 "
    (in namespace inscope "::html" script line 1)
    invoked from within
    "::namespace inscope ::html { WrapButtonPress .application.nb.information.inf.html.sub.html.document 99 329 1 16 }"
    (command bound to event)

     
  • Gregor Cramer

    Gregor Cramer - 2015-03-19
    • status: accepted --> closed-fixed
     
  • Gregor Cramer

    Gregor Cramer - 2015-03-19

    It is a false assertion (not a segfault as I thought).
    It seems to be due to a result tag in the wrong format.

    Thanks for the PGN file. The bug is fixed now in revision 1052.

    It would be nice if the application just ignore those kinds of errors.

    No, this wouldn't be nice. Scidb is still a beta version, and requires testing. The assertions are indispensable for testing. In this case the assertion happened because in one certain case I have overseen to handle an unexpected error. Later the alpha version - after the test phase - will be optimized, and without assertions.

    By the way, I offered my help because I know C++ (though I don't know Tcl and I don't have much free time now). If you need help, I may spend some time from time to time.

    Many thanks, help is very appreciated. But here is not the right place to talk about this, I will send you a mail.

     
  • Gregor Cramer

    Gregor Cramer - 2015-03-29

    Hi Antoni, how can I send an email? You've disabled the direct sending of emails.

     

Log in to post a comment.