# \[Logs problem/bug\] Negative numbers in graph

**URL:** <https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076>\
**Category:** Warcraft Logs\
**Created:** [September 23, 2016, 10:05am UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076 "2016-09-23T10:05:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kawaii](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kawaii/32/203_2.png) [@Kawaii](https://forums.combatlogforums.com/u/Kawaii)\
**Post date:** [September 23, 2016, 10:05am UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/1 "2016-09-23T10:05:11Z")

</div>

Hey there.

Encountered a problem in our logs from yesterday:  
[https://www.warcraftlogs.com/reports/HyQd4VpqvNfX39Ca#type=damage-taken&fight=19](https://www.warcraftlogs.com/reports/HyQd4VpqvNfX39Ca#type=damage-taken&fight=19)

There are a lot of empty spots in the graph and they show negative numbers. Same goes for the “damage done” section. Checked a few logs from other guilds - they don’t have such problem.

What should we do? Any ideas, how to fix this?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [September 23, 2016, 3:26pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/2 "2016-09-23T15:26:04Z")

</div>

Your computer’s system clock is bugging out and stuttering, leading to events going backwards in time.

---

<div class="post-metadata">

**Author:** ![Kawaii](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kawaii/32/203_2.png) [@Kawaii](https://forums.combatlogforums.com/u/Kawaii)\
**Post date:** [September 23, 2016, 3:37pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/3 "2016-09-23T15:37:30Z")

</div>

Could it be a Mac specific problem? And what to do?

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [September 23, 2016, 5:04pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/4 "2016-09-23T17:04:13Z")

</div>

Not sure what to suggest. It’s the log file itself that is messed up.

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [September 30, 2016, 4:22pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/5 "2016-09-30T16:22:02Z")

</div>

I posted this issue in the WOW Mac Tech support forums, cause I’m having this issue as well

[http://us.battle.net/forums/en/wow/topic/20749306784](http://us.battle.net/forums/en/wow/topic/20749306784)

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [September 30, 2016, 4:37pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/6 "2016-09-30T16:37:14Z")

</div>

Did you verify that this is happening in the original log file and that it’s not a bug on my end? I would look at the raw log file and make sure it’s happening there so we know it’s Blizzard’s bug.

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [September 30, 2016, 4:55pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/7 "2016-09-30T16:55:32Z")

</div>

Yes I verified in the actual combat logs files the individual lines are out of order, usually within the same second. The milliseconds are out of order (could be NTP adjustment).

(My opinion)  
I don’t think it should be too terribly difficult to handle the out of order records as the time stamp is still correct, and within the same second, just needs to be sorted when imported.

I saw this happen with the live streaming Wednesday night and last week - as well with full upload after the fact (last night when the site was down)

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [September 30, 2016, 5:21pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/8 "2016-09-30T17:21:30Z")

</div>

Yeah I could probably add a special case as long as the second value is the same. Are the events still in order, or are they actually out of order? If they’re actually being written out of order that is a big problem and not easy to fix.

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [September 30, 2016, 5:25pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/9 "2016-09-30T17:25:18Z")

</div>

Can you make the buggy log file available? I want to send it to someone at Blizzard. Thanks.

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [September 30, 2016, 5:57pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/10 "2016-09-30T17:57:37Z")

</div>

I’m pretty sure the events are written to the log out of order. eg there was a delay in writing the log entries so they were written when the writing process was done writing the other lines. (Think node async processes)

here is the log file

[http://ge.tt/1zMoTCf2](http://ge.tt/1zMoTCf2)

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [September 30, 2016, 7:12pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/11 "2016-09-30T19:12:14Z")

</div>

Sorry, that site is weird and creepy and I don’t trust it. If you want me to download something, put it up in a legit place like Dropbox, Google Drive, MSFT etc.

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [September 30, 2016, 7:27pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/12 "2016-09-30T19:27:12Z")

</div>

no worries, I dont actually use that site, but pastebin and github gist couldnt hold that many lines

[https://drive.google.com/open?id=0Bx6Yyu-DLPCLeDJVbE1WOGNOdFk](https://drive.google.com/open?id=0Bx6Yyu-DLPCLeDJVbE1WOGNOdFk)

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [October 3, 2016, 4:22pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/13 "2016-10-03T16:22:39Z")

</div>

Following up - NTP disabled last fight and the milliseconds still skewed a bit ☹

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [October 3, 2016, 4:28pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/14 "2016-10-03T16:28:44Z")

</div>

What version of OS X are you running?

---

<div class="post-metadata">

**Author:** ![Kawaii](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kawaii/32/203_2.png) [@Kawaii](https://forums.combatlogforums.com/u/Kawaii)\
**Post date:** [October 3, 2016, 7:21pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/15 "2016-10-03T19:21:35Z")

</div>

Me the latest one, Sierra, 10.12

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [October 3, 2016, 7:24pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/16 "2016-10-03T19:24:13Z")

</div>

El Capitan for me 10.11.6

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [October 11, 2016, 8:05pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/17 "2016-10-11T20:05:44Z")

</div>

So here is a quick php script to fix the ordering of the events in the actual log files

> <https://gist.github.com/jwestbrook/d46790700642cbc258b1a7d6514f3247>

---

<div class="post-metadata">

**Author:** ![Kihra](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kihra/32/1116_2.png) [@Kihra](https://forums.combatlogforums.com/u/Kihra)\
**Post date:** [October 11, 2016, 8:11pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/18 "2016-10-11T20:11:24Z")

</div>

The part I need to understand before I can do a workaround is if the events are in the correct order but with incorrect timestamps, or if they are in the wrong order but with correct timestamps.

---

<div class="post-metadata">

**Author:** ![Kawaii](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/kawaii/32/203_2.png) [@Kawaii](https://forums.combatlogforums.com/u/Kawaii)\
**Post date:** [October 11, 2016, 8:18pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/19 "2016-10-11T20:18:20Z")

</div>

Have raid tomorrow - i’m gonna try this script and compare to log made by other guildmembers. I’ll post everything here

---

<div class="post-metadata">

**Author:** ![wash](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.combatlogforums.com/wash/32/219_2.png) [@wash](https://forums.combatlogforums.com/u/wash)\
**Post date:** [October 11, 2016, 8:23pm UTC](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076/20 "2016-10-11T20:23:51Z")

</div>

Totally understood

@Kawaii run the file like this

```
php fixskew.php WoWCombatLog.txt

```

It will create a `fixed.txt` file in the same directory. If you have multiple logs it always writes to a `fixed.txt` file so be careful

[Next page](https://forums.combatlogforums.com/t/logs-problem-bug-negative-numbers-in-graph/1076.md?page=2)
