Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed in namebase.h #194

Open
hasnul opened this issue Nov 20, 2024 · 0 comments
Open

Assertion failed in namebase.h #194

hasnul opened this issue Nov 20, 2024 · 0 comments

Comments

@hasnul
Copy link

hasnul commented Nov 20, 2024

SCID crashed today when trying to open a database from the File>Open menu. I decide to run from command line and got:

flatpak run io.github.benini.scid

scid: /run/build/scid/src/namebase.h:172: const char* NameBase::GetName(nameT, idNumberT) const:
Assertion `IsValidNameType(nt) && id < GetNumNames(nt)' failed.

SCID version 5.0.2.
OS: Ubuntu 24.04.1
DE: GNOME

I'm not a software developer but I was amazed at the combined assertion. Code smell?

After banging my head against the wall for a couple of hours, and discovering a bunch of things that troubled me, I found issue #140. A single execution of the cure did not work. I had to run

printf "0??????0??????1??????2??????3??????" >> recover.sn5

several times to recover the database -- surprising that this worked. I guess the id < GetNumNames(nt) was False because GetNumNames() returned a number that was too small; I peeked inside the file with xxd and there did not appear to be any player names according to the SCID5 format and several event names. When saving the database yesterday, I did not enter anything into the player names and only created event names. Looking at the recovered data, it seems that the event names for the last three 'games' were lost. I don't recall a system crash yesterday; I might have shutdown in a rush though.

Edit 1: Removed emotional rant after reading thread #140 from July 2023.

Edit 2: Having recovered and going back to work on my opening analysis, I'm now wary and keeping an eye on the .sn5 file and I've noticed that it seems to be updated only when I close SCID and not when I click (or use the hotkey) 'Game>Save: Replace game...' menu or complete the dialog on 'Game>Save: Add New Game...'. This doesn't seem like safe behaviour to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant