SICGames / TBChestTracker

Automatic chest counter program for the game Total Battle
GNU General Public License v3.0
17 stars 5 forks source link

Chests\Points are lost #63

Open dgrdragon opened 4 days ago

dgrdragon commented 4 days ago

I'm using "v2.0 Preview 4 - HotFix 1" Between multiple runs points and chests seem to be randomly lost. For example I have a player that yesterday made 5 common crypts and 3 epic crypts for a total of 50 points. I reprocess chests today, and they now show as 3 epic crypts only, for a total of 30 points. The common disappeared entirely. Verify chest data integrity doesn't seem to help.

When looking at the clanchests db file, the old common crypts are nowhere to be found. However when looking at the backup of the clanchests db file from yesterday, the crypts are there.

What would cause the loss? This isn't a rare occasion, it's happening quite consistently when comparing data across multiple days. It's very noticeable because some players go down in points across days.

SICGames commented 4 days ago

Did you run automation few minutes before midnight?

SICGames commented 4 days ago

If so, there's a issue with that and that's why you may not seeing it in clanchest.db file

dgrdragon commented 4 days ago

No the last automation of the day is around 5pm and the next one would be around 9am. I sometimes run several between 9am and 5pm.

I can clearly see from the backup db files that the 5pm file has those chests, and the 9am doesn’t anymore.

I believe so far I’ve only noticed losses across different days (however 5pm-9am is when the majority of chests are generated). It’s also quite consistent, I can witness this almost every morning.

SICGames commented 4 days ago

Does it crash or no? Also what are your automation settings like? 1250 ms on screen shots duration after clicks?

On Tue, Sep 17, 2024, 1:41 PM dgrdragon @.***> wrote:

No the last automation of the day is around 5pm and the next one would be around 9am. I sometimes run several between 9am and 5pm.

I can clearly see from the backup db files that the 5pm file has those chests, and the 9am doesn’t anymore.

I believe so far I’ve only noticed losses across different days (however 5pm-9am is when the majority of chests are generated). It’s also quite consistent, I can witness this almost every morning.

— Reply to this email directly, view it on GitHub https://github.com/SICGames/TBChestTracker/issues/63#issuecomment-2356538737, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAZ6JRCOFXA5ALWFSKNRPTZXBSUNAVCNFSM6AAAAABOLYZ3HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJWGUZTQNZTG4 . You are receiving this because you commented.Message ID: @.***>

dgrdragon commented 4 days ago

No, it never crashed.

If I had to report an odd behavior, the first time I start the automation it always does 4 chests only and then it stops. Console simply says automation stopped (twice). I then start it again, and it does all the remaining ones. This happens every time I start the automation for the first time.

Regarding settings, I have everything with default values, so 4 automation clicks, 100ms click delay, and 1250ms screenshot delay.

SICGames commented 4 days ago

That's some odd behavior alright. Will look into it.

On Tue, Sep 17, 2024, 2:34 PM dgrdragon @.***> wrote:

No, it never crashed.

If I had to report an odd behavior, the first time I start the automation it always does 4 chests only and then it stops. Console simply says automation stopped (twice). I then start it again, and it does all the remaining ones. This happens every time I start the automation for the first time.

Regarding settings, I have everything with default values, so 4 automation clicks, 100ms click delay, and 1250ms screenshot delay.

— Reply to this email directly, view it on GitHub https://github.com/SICGames/TBChestTracker/issues/63#issuecomment-2356631269, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAZ6JWUQJGIPMUJERV5W3TZXBY3FAVCNFSM6AAAAABOLYZ3HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJWGYZTCMRWHE . You are receiving this because you commented.Message ID: @.***>

dgrdragon commented 3 days ago

Example from this morning automation run.

At 5pm yesterday

Clanmate,Common,Rare,Epic,Citadel,Total,Points Player,17,26,38,24,111,2289

After the 9am run

Clanmate,Common,Rare,Epic,Citadel,Total,Points Player,13,8,19,10,67,1111

All numbers have dropped. Export is set at Month, but I see the same data regardless. The same values also show from Clan Insights.

Also looking at the db files, it's worth noting that the last one from yesterday afternoon was 904kb. I started the automation this morning and it had the same behavior mentioned in the previous comment: 4 chests scanned and it stopped. At this point I can see a backup file for 491kb. It seems like half the content from the previous file just disappeared. I then start the automation again and it scans all the remaining chests. Backup file at this point is 833kb. I scan bank chests, and it goes up to 864kb. It would appear that something very strange happens the first time the automation is started, when it stops automatically after 4 chests.

SICGames commented 3 days ago

Will look into it

ErikTheAweful commented 3 days ago

I'm also losing chests / scores on a regular basis I have one known example of a player that should have 4300 points and has half that

SICGames commented 3 days ago

How are you losing chests while my test account hasn't so far? Show me backup chest and clanchest.db. shouldn't be happening. Definitely won't be happening with the new chest automation in preview 5

On Wed, Sep 18, 2024, 6:45 PM ErikTheAweful @.***> wrote:

I'm also losing chests / scores on a regular basis

— Reply to this email directly, view it on GitHub https://github.com/SICGames/TBChestTracker/issues/63#issuecomment-2359582544, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAZ6JSDIJZIJDTW5D5SOI3ZXH7CPAVCNFSM6AAAAABOLYZ3HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGU4DENJUGQ . You are receiving this because you commented.Message ID: @.***>

ErikTheAweful commented 3 days ago

clanchests .txt

backups.zip

ErikTheAweful commented 3 days ago

I know how much work an app like this is. Your time is valued :)

I started over this week with a new database clean so as to not bring any issues forward from last session / week.

SICGames commented 3 days ago

i see what's happening, the points are not adding up. Right?

ErikTheAweful commented 3 days ago

correct :)

SICGames commented 3 days ago

i'll look through it and get it fixed in Preview 5

dgrdragon commented 3 days ago

In my example, when I ran the automation this morning 9/18, it scanned the first 4 chests and it stopped. The database file at that point had all data from 9/17 removed; all players were there but had 0 chests and 0 points, with only the 4 new chests present for that day. The previous backup file had hundreds of chests on 9/17. So basically it deleted everything that was there from that day.

I can load the db files tomorrow if useful. Thanks a lot for all the work and the support!

ErikTheAweful commented 3 days ago

Perhaps the Verify database function should reference the last backup as part of the process?

SICGames commented 3 days ago

what is your chest points configured like? it's failing to pick up a chest type or chest name or level. Let me see your chest point settings

dgrdragon commented 2 days ago

Same behavior today, seems consistent every day with the first run and the first 4 chests. See my chest points attached. Thanks Capture

I've also tried running the fix chest data after every run (e.g., when it stops after the first 4 chests) but that also didn't help. At that point the DB has already dropped the previous chests, so I guess it's too late for that anyway.

SICGames commented 2 days ago

Show me clanchest.db and backups like Erik did

On Thu, Sep 19, 2024, 5:05 AM dgrdragon @.***> wrote:

Same behavior today, seems consistent every day with the first run and the first 4 chests. See my chest points attached. Thanks Capture.PNG (view on web) https://github.com/user-attachments/assets/9088c908-4a54-4e76-b79c-009499676abe

— Reply to this email directly, view it on GitHub https://github.com/SICGames/TBChestTracker/issues/63#issuecomment-2360432903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAZ6JRI65LRBSKY6RBLACLZXKHW7AVCNFSM6AAAAABOLYZ3HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQGQZTEOJQGM . You are receiving this because you commented.Message ID: @.***>

dgrdragon commented 2 days ago

clanchest_backup_1726598229.txt clanchest_backup_1726650954.txt clanchests.txt

Please see attached, including last backup the day before, and backup in the morning

SICGames commented 2 days ago

The chest points not adding up been fixed today

SICGames commented 2 days ago

i think i know what you're talking about. Earlier on 9/17/2024 Anfir had chests done but maybe few hours later, his chests are gone. Am I right on this assumption?

dgrdragon commented 2 days ago

that's right - if you look at file clanchest_backup_1726598229.txt (backup from 9/17) and go to the "9/17/2024": [] array, you can see many people have plenty of chests, points, etc.

if you then compare with file clanchest_backup_1726650954.txt (from the morning run of 9/18) and go again to the "9/17/2024": [] array, the same people now are listed with no chests and no points. All previous chests for that day are gone, and you will find only the 4 chests scanned during the new run. The same 4 chests are somehow also reported in the next 9/18/2024 array.

SICGames commented 2 days ago

Upon starting up and the splash screen, did it crash unexpectedly?

ErikTheAweful commented 2 days ago

chestpoint.txt

Seeing similar results here

dgrdragon commented 2 days ago

No, the application has never crashed for me. It always runs fine. I generally always keep the app open, however I've also tried closing and starting it fresh every morning, but I can see the same.

However it always has that behavior I explained, where the first run scans only 4 chests and it automatically stops. The console just reports "automation stopped", and 2 backups are created with exactly the same content and previous data wiped out.

SICGames commented 2 days ago

I'm still trying to fix the counting 4 chests then stopping issue. I'll possibly add a restore in the tool's menu item. Or a restore history incase something like this happens. And you haven't had this happen before?

dgrdragon commented 2 days ago

This has always happened, so basically every day the only thing that works is to delete all database and start fresh because otherwise everything gets corrupted. I briefly also tried v1.5 and I believe I had the same issue also there. Happy to try anything else if it helps with debugging.

ErikTheAweful commented 2 days ago

Mine does not have the startup issue, it seems to corrupt after combining Player names... 1.5 was always solid for me

SICGames commented 2 days ago

Preview 5 could have it fixed. I just fixed where it stops twice. It was calling the StopAutomation function twice and that's why you were getting "Stopped Automation" in the terminal.

It only happens when you start a new automation? But deleting clanchest.db file corrects it? Let me back up Bravehearts and see if I encounter the issue after a few days after a wiping braveheart's database.

dgrdragon commented 2 days ago

Yes the stop after 4 chests only happens once when I start the automation for the first time (or after I haven’t started one for some time, in case the app remained open). Do you think the stop is correlated to the db data being removed?

SICGames commented 2 days ago

It could be possible

On Thu, Sep 19, 2024, 3:02 PM dgrdragon @.***> wrote:

Yes the stop after 4 chests only happens once when I start the automation for the first time (or after I haven’t started one for some time, in case the app remained open). Do you think the stop is correlated to the db data being removed?

— Reply to this email directly, view it on GitHub https://github.com/SICGames/TBChestTracker/issues/63#issuecomment-2361952983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAZ6JV5LDLSY6VSWBJEQSDZXMNUPAVCNFSM6AAAAABOLYZ3HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRRHE2TEOJYGM . You are receiving this because you commented.Message ID: @.***>