rampaa / JL

JL is a program for looking up Japanese words and expressions.
Apache License 2.0
198 stars 4 forks source link

Crash on startup #96

Closed alythesniper closed 3 months ago

alythesniper commented 3 months ago

JL keeps crashing at startup. I updated a few days prior and had no issue, but from today it just started crashing even after windows restart. here is the log file.

rampaa commented 3 months ago

Can you send the files under ..JL\Resources\Frequency Databases to rampaa.01@gmail.com? Also the ..\JL\Config\freqs.json file?

When JL is trying to get the max frequency value from one of your frequency dictionaries, instead of returning a valid value, it seems to return null, which indicates there's no valid frequency value in the database at all. I am baffled how that's possible, especially if it was working just fine till now.

Try deleting the files under ..JL\Resources\Frequency Databases and see if it solves the crash. When you delete those files, JL should recreate them at start-up and hopefully they will have valid values this time around.

rampaa commented 3 months ago

It appears that the VN (Nazeka).sqlite file you had didn't contain any records. I'm not sure how this happened, but if it occurs again, https://github.com/rampaa/JL/commit/03e93709a07e21f42b373339fc800eafec61a74f should remedy the situation. Essentially, JL will check whether a database file contains any records, and if it doesn't, it will delete the database file and recreate it if necessary.