Menu

#83 Application Crashes when .sci Database Opens

None
closed-fixed
None
1
2018-08-28
2015-04-04
antoyo
No

Hello.
When I open a .sci database in Scidb (revision 1056), the application crashes.
The database consists of the Million Base 2.2 (http://www.top-5000.nl/pgn.htm) plus all the PGNs from TWIC up to 1063.
It crashes on "Loading namebase data" message.
Do you need more details?

Here is the log:

(func) insertPlayer
(file) db_namebase.cpp:570
(what) assertion failed: !(playerAt(i) == playerAt(i - 1))
(type) mstl::assertion_failure_exception

=== Backtrace ============================================
db::Namebase::insertPlayer [db_namebase.cpp:570]
db::Namebase::appendPlayer [./db_namebase.ipp:467]
db::sci::Codec::readPlayerbase [sci/sci_codec.cpp:2008]
db::sci::Codec::readNamebases [sci/sci_codec.cpp:1641]
db::sci::Codec::doOpen [sci/sci_codec.cpp:948]
db::DatabaseCodec::open [db_database_codec.cpp:779]
db::Database::Database [db_database.cpp:271]
db::MultiBase::MultiBase [db_multi_base.cpp:154]
app::Application::open [app_application.cpp:708]
cmdLoad [tcl_database.cpp:942]
safeCall [tcl_base.cpp:764]
main [tkscidb.cpp:109]
==========================================================

(func) insertPlayer
(file) db_namebase.cpp:570
(what) assertion failed: !(playerAt(i) == playerAt(i - 1))
(type) mstl::assertion_failure_exception

=== Backtrace ============================================
db::Namebase::insertPlayer [db_namebase.cpp:570]
db::Namebase::appendPlayer [./db_namebase.ipp:467]
db::sci::Codec::readPlayerbase [sci/sci_codec.cpp:2008]
db::sci::Codec::readNamebases [sci/sci_codec.cpp:1641]
db::sci::Codec::doOpen [sci/sci_codec.cpp:948]
db::DatabaseCodec::open [db_database_codec.cpp:779]
db::Database::Database [db_database.cpp:271]
db::MultiBase::MultiBase [db_multi_base.cpp:154]
app::Application::open [app_application.cpp:708]
cmdLoad [tcl_database.cpp:942]
safeCall [tcl_base.cpp:764]
main [tkscidb.cpp:109]
==========================================================

while executing

"::util::catchException { ::progress::start $parent $cmd $args $options }"
(procedure "::application::database::openBase" line 73)
invoked from within
"::application::database::openBase $parent $file yes -encoding $encoding"
(procedure "::menu::dbOpen" line 14)
invoked from within
"{}$cmd"
(procedure "::application::information::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 141 532 1 16 "
(in namespace inscope "::html" script line 1)
invoked from within
"::namespace inscope ::html { WrapButtonPress .application.nb.information.inf.html.sub.html.document 141 532 1 16 }"
(command bound to event)

Discussion

  • Gregor Cramer

    Gregor Cramer - 2015-04-04

    Thanks for the database files.

    I've found a little problem in my key generation, but I'm not sure that this has caused the problem. Do you remember how you've created the database. At first importing the millionbase-2.2.pgn, and then?

     
  • Gregor Cramer

    Gregor Cramer - 2015-04-04
    • status: open --> accepted
    • assigned_to: Gregor Cramer
    • Priority: 5 --> 1
     
  • antoyo

    antoyo - 2015-04-04

    I created the database this way:

    1. Open millionbase-2.2.pgn.
    2. Convert it to .sci.
    3. Download all TWIC games up to 1061.
    4. Concat them in one .pgn file.
    5. Import it via the PGN import feature.
    6. Import the TWIC pgn file for 1062 and then 1063.

    After importing 1063, I was unable to open the database.

     
  • Gregor Cramer

    Gregor Cramer - 2015-04-04
    • status: accepted --> closed-fixed
     
  • Gregor Cramer

    Gregor Cramer - 2015-04-04

    I've found the problem, It's an errornous entry in my player base - only one player is affected - and the namebase bug is a side effect. I've corrected the errornous entry, but this is not repairing the namebase. If you check out revision 1059 you can re-create the database without any problem. But probably the effort of the re-build is high, or you don't have the PGN files anymore, than I will try to fix the namebase by hand, and I will send you the corrected file.

     
  • antoyo

    antoyo - 2015-04-04

    I am able to create again the database since I still have the PGN files.
    However, the application (r1059) still crashes when I import the TWIC 1062 file.

     
  • Gregor Cramer

    Gregor Cramer - 2015-04-05

    It's impossible for me to reproduce the problem. What I've done:

    Creating a database from millionbase-2.22.pgn, and importing PGN files twic920g.zip...twic1064g.zip, exactly in ascending order. Closing the database and re-open, no error.

    1. Did you properly make and install revision 1059?

    2. When it is crashing? After importing twic1062, or while importing this file?

    3. What's the error log reporting?

     
  • antoyo

    antoyo - 2015-04-05

    I compiled and installed the application again to make sure I am using the revision 1059.
    If I import all PGN files from 920 to 1064 from one file (concatenation of every PGN files), everything works fine.
    However, if I import the PGN files from 920 to 1061 and then import 1062 alone (so two imports instead of one), the application will crash the next time I open the database.
    The log is the same (except the line numbers).

    I made another test that triggers the bug:

    I imported again twic1062 in my correct database containing the millionbase-2.2 and all TWIC files from 920 to 1064 and the next time I opened it, the application crashed.
    I believe this bug happens when doing multiple import of PGN files.

     
  • Gregor Cramer

    Gregor Cramer - 2015-04-08

    This bug, which has caused the same side effects as the previous one, was difficult to find. I had a bug while parsing the player data file. Now revision r1061 should not crash, due to my test. Thanks for your testing!

     
  • antoyo

    antoyo - 2015-04-10

    Hi.
    I still get the same issue with the latest revision.
    The log is the same as the one provided in my first post (with the same line numbers).
    The instructions to get the bug are the same as in my previous post.

     
  • Gregor Cramer

    Gregor Cramer - 2015-04-10

    You're right, anything in my previous test was wrong. I've fixed a parsing error at another place (while parsing the FIDE file) in r1063.

    Luckely I've overworked the whole thing with the player base (in next big release). Currently I'm parsing the Scid, FIDE, DWZ, ... files, very complicated. In my overworked version I don't use these files anymore inside the player base, I have my own data, very simpe format. The new player base is clean, no more bugs of this kind.

     
  • antoyo

    antoyo - 2015-04-10

    Thanks.
    Everything seems to work fine now.

     

Log in to post a comment.