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

Lines in first write of combat log file are ignored #455

Closed
aza547 opened this issue Nov 22, 2023 · 4 comments
Closed

Lines in first write of combat log file are ignored #455

aza547 opened this issue Nov 22, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@aza547
Copy link
Owner

aza547 commented Nov 22, 2023

Theory is this:

  • We currently poll for new files by listing the directory.
  • When we spot new files we start tailing them for new writes.
  • That means that the first write to a file is never processed.
  • If that write contains a CHALLENGE_MODE_START event for example, we fail to record an entire key.

Surely the fix is to read any existing content in a newly spotted combat log file before we start tailing.

@aza547
Copy link
Owner Author

aza547 commented Nov 22, 2023

Reproduced by dropping this bit from the test scripts:

# If ARENA_MATCH_START is the first line we don't start recording 
# but this never happens in reality so just write a line. 
logFile.write("This is a test line to create the file\n")
time.sleep(2)

@aza547
Copy link
Owner Author

aza547 commented Nov 22, 2023

A user reported this, here's some logs (see the final DHT):

WarcraftRecorder-2023-11-19 (3).log

The top of the combat log file:

11/19 13:35:47.818 COMBAT_LOG_VERSION,20,ADVANCED_LOG_ENABLED,1,BUILD_VERSION,10.2.0,PROJECT_ID,1
11/19 13:35:47.819 CHALLENGE_MODE_END,1466,0,0,0,0.000000,0.000000
11/19 13:35:47.818 ZONE_CHANGE,1466,"Darkheart Thicket",8
11/19 13:35:47.818 MAP_CHANGE,733,"Darkheart Thicket",3354.169922,2604.169922,2241.669922,1116.670044
11/19 13:35:47.820 SPELL_AURA_REMOVED,Player-55-0995A773,"Royalkush-Whisperwind",0x511,0x1,Pet-0-4229-1220-24146-165189-0104463697,"Sul'raka",0x1112,0x0,465,"Devotion Aura",0x2,BUFF
11/19 13:35:47.821 SPELL_AURA_REMOVED,Player-55-0995A773,"Royalkush-Whisperwind",0x511,0x1,Pet-0-4218-1466-25986-165189-0103D9517B,"Fenyr",0x1112,0x0,465,"Devotion Aura",0x2,BUFF
11/19 13:35:47.821 SPELL_AURA_REMOVED,Player-55-0995A773,"Royalkush-Whisperwind",0x511,0x1,Pet-0-4218-1466-25986-165189-0103F0B185,"Terrorpene",0x1112,0x0,465,"Devotion Aura",0x2,BUFF
11/19 13:35:47.821 SPELL_AURA_REMOVED,Player-55-0995A773,"Royalkush-Whisperwind",0x511,0x1,Pet-0-4229-1220-24146-165189-0104463544,"Sul'raka",0x1112,0x0,465,"Devotion Aura",0x2,BUFF
11/19 13:35:47.907 CHALLENGE_MODE_START,"Darkheart Thicket",1466,198,18,[10,136,8]

@aza547
Copy link
Owner Author

aza547 commented Nov 22, 2023

image

@aza547 aza547 added the bug Something isn't working label Nov 22, 2023
@aza547
Copy link
Owner Author

aza547 commented Dec 1, 2023

This is merged to main now under 4a7f6a8. I've done some testing and seems OK so far. We've lost the locking of a combat log, but I think that's fine. Bit nervous about multi-box confusion but I'm going to state that's not supported.

@aza547 aza547 closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant