Trying to export an .sci database fails with message:
0
(func) exportGames
(file) db_database.cpp:1383
(what) precondition violation: illegalRejected || !format::isScidFormat(destination.format())
(type) mstl::precondition_violation_exception
=== Backtrace ============================================
db::Database::exportGames<db::Consumer> [db_database.cpp:1383]
app::View::exportGames [app_view.cpp:667]
app::View::exportGames(mstl::string const&, mstl::string const&, mstl::string const&, unsigned int, db::type::ID, unsigned int, mstl::bitfield<unsigned __int128=""> const&, bool, mstl::vector<mstl::string> const, unsigned int, unsigned int, db::Log&, util::Progress&, app::View::FileMode [app_view.cpp:772]
cmdExport [tcl_view.cpp:695]
safeCall [tcl_base.cpp:764]
main [tkscidb.cpp:109]
==========================================================
while executing
"::util::catchException $cmd count "
(procedure "DoExport" line 262)
invoked from within
"DoExport .application.nb.database.main.switcher.content .application.nb.database.main.switcher.content.export /home/stefan/privat/schach/export/TestEx..."
(in namespace inscope "::export" script line 1)
invoked from within
"{*}$Vars(okcommand) $files"
(procedure "Activate" line 134)
invoked from within
"Activate .application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox yes"
(in namespace inscope "::fsbox" script line 1)
invoked from within
"::namespace inscope ::fsbox {Activate .application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox yes}"
invoked from within
".application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox.buttons.ok invoke "
invoked from within
".application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox.buttons.ok instate !disabled { .application.nb.database.main.switcher...."
invoked from within
".application.nb.database.main.switcher.content.export.top.nb.__filedialog.fsbox.buttons.ok instate pressed { .application.nb.database.main.switcher.co..."
(command bound to event)
I use revision 1089 on debian lenny
Steps to reproduce:
1) Create new sci database
2) Save one game (nothing special only starting position)
3) Choose export in database view
4) Choose SCID as export format in left "frame"
=> Export fails
Thanks for your error report. In fact it was an error in debugging code, fixed in rev. 1090.
Thanks for the fast fix.
Some of my databases now create the following error, when trying to export:
0
(func) adjustListSize
(file) si3/si3_name_list.cpp:245
(what) assertion failed: m_list.size() == size()
(type) mstl::assertion_failure_exception
=== Backtrace ============================================
db::si3::NameList::adjustListSize [si3/si3_name_list.cpp:245]
db::si3::NameList::update [si3/si3_name_list.cpp:151]
db::si3::Codec::writeNamebases [si3/si3_codec.cpp:2063]
db::si3::Codec::writeNamebases [si3/si3_codec.cpp:2037]
db::si3::Codec::save [si3/si3_codec.cpp:776]
db::si3::Codec::save [si3/si3_codec.cpp:784]
db::DatabaseCodec::save [db_database_codec.ipp:62]
db::Database::save [db_database.cpp:458]
app::View::exportGames(mstl::string const&, mstl::string const&, mstl::string const&, unsigned int, db::type::ID, unsigned int, mstl::bitfield<unsigned __int128=""> const&, bool, mstl::vector<mstl::string> const, unsigned int, unsigned int, db::Log&, util::Progress&, app::View::FileMode [app_view.cpp:777]
cmdExport [tcl_view.cpp:695]
safeCall [tcl_base.cpp:764]
main [tkscidb.cpp:109]
==========================================================
"::util::catchException $cmd count "
(procedure "DoExport" line 262)
invoked from within
"DoExport .application.nb.database.main.switcher.content .application.nb.database.main.switcher.content.export {/home/stefan/privat/schach/export/Aljec..."
(in namespace inscope "::export" script line 1)
invoked from within
"{*}$Vars(okcommand) $files"
(procedure "Activate" line 134)
invoked from within
"Activate .application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox yes"
(in namespace inscope "::fsbox" script line 1)
invoked from within
"::namespace inscope ::fsbox {Activate .application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox yes}"
invoked from within
".application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox.buttons.ok invoke "
invoked from within
".application.nb.database.main.switcher.content.export.top.nb.filedialog.fsbox.buttons.ok instate !disabled { .application.nb.database.main.switcher...."
invoked from within
".application.nb.database.main.switcher.content.export.top.nb.__filedialog.fsbox.buttons.ok instate pressed { .application.nb.database.main.switcher.co..."
(command bound to event)
Please let me know, if you need an exanple database
I've sent an email to your users.sf.net account for upload request of an example database.
I 've uploaded an scidb archive.
Thanks for the database "Aljechin Alarm", unfortunately the export to .si4 is working properly. What I have done:
No error at all, and opening the .si4 file works properly. Probably you have send me the wrong database?
No, still reproducable for me.
I tried the same steps and uploaded the Aljechin Alarm.scv and the partly genrated Aljechin Alarm.si4.
How can I help you?
Still the same, I have no problems with export. Probably your built failed, please try the follwing:
and try again to export. And if this does not help, then please try another step:
If this succeeds, then something in the configuration file is wrong, please send me your configuration file ~/.scidb-beta/config/options.dat in this case.
I tried both, no change, still the same error.
Many thanks for your help. This is really mysterious. The only idea I have is to test your executable on my machine. But this is possible only if the dependencies will be fulfilled. Please paste the output of
in the next post. About my machine: Ubuntu 14.04.1 LTS (trusty), 32 bit processor.
I will try it tomorrow on another machine with ubuntu 15.10 32 bit.
I guess it works on your 32 bit machine. Now I think I know the problem, it only occurs on 64 bit machines, for any reason this part is not 64 bit safe. Unluckily I don't have a 64 bit machine, so I have to think about how I find the hole, with your help.
I think a first test with valgrind is the best solution. Please install valgrind:
and start Scidb in the following way:
and attach the log file to the post. Valgrind will detect memory problems, if any.
Done.
Hier die Ausgabe:
After closing the valgrind session the following summary is shown:
I made a new run ----leak-check=full ...
Output is attached
Many thanks, unfortunately valgrind is not reporting anything relevant. But after I've studied the code again I guessed that the bitset implementation can be the reason. So I tried a 64 bit emulation of the bitset, and now I can reproduce the problem! Soon I will release a fix.
I've released v1091, this version works (with your example database). It was indeed a 64 bit problem, in one 64 bit wide variable onle the lower 32 bit were set. Thanks for your patience!
Works perfect, thanks for the quick bugfix!