Hello,

For the celebration of this New Year's Eve, my friends and I would have wanted to use the fireworks from VNC.

They actually look really really great :D
Thanks again, Voxpire, for that wonderful framework Vita-Nex Core.

But I don't know why, from time to time I am getting a random crash when using one of the rockets.

Here is what the crash log says :
Code:
Exception:
System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
Parameter name: value
  at System.DateTime.AddTicks(Int64 value)
  at Server.Timer.get_Next()
  at VitaNex.Items.BaseFirework.GetProperties(StringBuilder props) in c:\(...)\Vita-Nex\Items\Fireworks\BaseFirework.cs:line 194

Line 194 of BaseFirework.cs is :
Code:
if (_FuseTimer.Next < now)

So my guess is the problem comes from '_FuseTimer.Next' ... especially the '.Next' part, as it seems to be trying to add Ticks to the timer to see if it is smaller than 'now'.

Okay, I get the logic, but why is it crashing ? Is it trying to go beyond 12/31/9999 ?

Would something like this help ?
Code:
if(tobechecked >DateTime.MinValue&& tobechecked <DateTime.MaxValue)
            {
                // Do Something
            }
            else
            {
                // Do Something
            }

Thank you for any help !

I have also noticed that the crashes tend to happen when the Shard has been up for a long time. After a crash and auto-restart, it seems to be more stable (I've just tried to launch 30 rockets with no crash ... it was fun though ^^)

If we don't find the solution before the end of this year, no problem ! Adding a few crashes to the fun of celebrating Christmas and New Year's Eve can only make it more spicey ! lol

Thx anyway !

-Rek-
 
Last edited:
Hi @Voxpire !

Thanks for guiding me in the right direction. :)

I have updated the Timer.cs file in the core ServUO files, recompiled and restarted ServUO.

Still, since then, I have had two crashes linked to fireworks with the crash logs above.

As it is kinda the moment of using fireworks, I expect my shard to crash a bit more ... mainly tomorrow... lol ;-)

I will try something else and hope it fixes it.

Thx anyway. Always great to have your help ^^
 
Back