These are chat archives for ikkentim/SampSharp

26th
May 2016
Florian van Dillen
@fvandillen
May 26 2016 06:40
That comes up twice and leads to: http://i.imgur.com/qmnmUde.jpg
Tim Potze
@ikkentim
May 26 2016 06:42
Is it just my phone or can't I read the text there
Florian van Dillen
@fvandillen
May 26 2016 06:42
Click the imgur link for a larger pic
Tim Potze
@ikkentim
May 26 2016 06:42
Of the first one
I tried to read the stacktrace
Tim Potze
@ikkentim
May 26 2016 06:55
ah it was just my phone
what’s the top method on the stacktrace?
above cryptrandomgen
Tim Potze
@ikkentim
May 26 2016 07:29
It seems to be related to the Random class
Do you provide your own seeds in Random?
Florian van Dillen
@fvandillen
May 26 2016 07:31
Nope
Tim Potze
@ikkentim
May 26 2016 07:36
:(
Do you use Random at all?
Florian van Dillen
@fvandillen
May 26 2016 07:36
Not really either
Tim Potze
@ikkentim
May 26 2016 07:37
We’ll thats interesting…
Florian van Dillen
@fvandillen
May 26 2016 12:56
The debugger says it occured after 251 minutes, which is roughly the time I found it hanging too
During my last visit IG and the occurance, no one has joined the server aka. running idle.
The ONLY thing happening in the background of the server is a timer.
System.Timers.Timer timer = new System.Timers.Timer(2500);
Function handling the ElapsedEvent doesn't use any crypto stuff.
Just forwards the time a minute and sets the time for each online player.
Tim Potze
@ikkentim
May 26 2016 13:00
It seems to be crashing during the execution of cryptgenrandom and it violates access of memory… I’ve been searching the mono source for a while but haven’t found any call that I think it might have been
Florian van Dillen
@fvandillen
May 26 2016 13:00
Hmm, weird.
Have you tried running the server for a prolonged amount of time with a different gamemode?
Tim Potze
@ikkentim
May 26 2016 13:01
Not yet
Florian van Dillen
@fvandillen
May 26 2016 13:01
Because that part of my gamemode hasn't changed since you updated the framework.
Tim Potze
@ikkentim
May 26 2016 13:02
If it will crash in 251, a little over 4 hours, I should be able to do some debugging this evening
Florian van Dillen
@fvandillen
May 26 2016 13:02
I'll restart the debugger and see if another crash occurs in roughly the same time.
Tim Potze
@ikkentim
May 26 2016 13:02
Ty
Florian van Dillen
@fvandillen
May 26 2016 13:04
Allright, it loaded up in the debugger again
Will get back to you after dinner probably xD
Tim Potze
@ikkentim
May 26 2016 13:04
:)
Florian van Dillen
@fvandillen
May 26 2016 13:05
Mono 4.2.1 does include some changes regarding crypto, btw
Not sure if that's related in any way.
Tim Potze
@ikkentim
May 26 2016 13:15
If you have a bunch of time on your hands...
You can compile mono from source :s
Then you got more useful debugging info… But thats a lot of work
oh and a simple other thing
Could you put a writeline at the start and end of your timer code? Then we can see where about it happens
Florian van Dillen
@fvandillen
May 26 2016 13:19
Would it help? Shall I include the values of _hours and _minutes in it?
Tim Potze
@ikkentim
May 26 2016 13:20
whatever helps. and writeline at start and end of your timer code can let us know if it’s one of the function calls in there
otherwise we got to look if it’s anywhere else in the framework
Florian van Dillen
@fvandillen
May 26 2016 13:20
Visual studio did load a lot more symbol files this time
Maybe we get lucky
Will add writelines once home
Tim Potze
@ikkentim
May 26 2016 13:21
All right
It just won’t be able to load symbols files for mono :(
Florian van Dillen
@fvandillen
May 26 2016 13:21
Lol yh
It was able to run for a few days before all the updates happened though
So I doubt the timer is an issue
Tim Potze
@ikkentim
May 26 2016 13:23
if it’s a mono issue it might be.. I’m just thinking our loud :smile:
Tim Potze
@ikkentim
May 26 2016 13:29
I think I’ve found the symbol files for the mono dll
maybe if you put it in your server folder next to mono-2.0.dll it might give some additional info the next time you run it
Tim Potze
@ikkentim
May 26 2016 17:16
I've started my server, lets see what happens
Florian van Dillen
@fvandillen
May 26 2016 17:28
Profit!!!
Server just crashed
Tim Potze
@ikkentim
May 26 2016 17:28
Caught something good?
Florian van Dillen
@fvandillen
May 26 2016 17:28
Was able to load symbols post mortem
Tim Potze
@ikkentim
May 26 2016 17:29
Sweeet
Florian van Dillen
@fvandillen
May 26 2016 17:29
This causes it
Runtime T+258 minutes
So this isn't random
Tim Potze
@ikkentim
May 26 2016 17:30
Interesting... So it's possibly the Xth starting thread... I'm looking into it
Florian van Dillen
@fvandillen
May 26 2016 17:31
Cool :)
Florian van Dillen
@fvandillen
May 26 2016 17:38
Passing the exception back to the program gives the following call stack:
Tim Potze
@ikkentim
May 26 2016 17:41
Oh man this is hard to debug... I don't see how rand() would crash
So even the logger crashes? What the heck
Oh wait is just aborts there due to assert failure, no crash
Florian van Dillen
@fvandillen
May 26 2016 17:46
worker_park( ) looks like the offender
Tim Potze
@ikkentim
May 26 2016 17:47
Nah, I think the worker_park() cratches the crash/exception/error somehow and then trhows the assertion failure
Tracing it back to this line
i think
Florian van Dillen
@fvandillen
May 26 2016 17:49
That does use rand_next
Tim Potze
@ikkentim
May 26 2016 17:49
ye
which is defined above
above it*
don't trush the stack trace too much, the compiler inlines some methods for performance reasons
trust*
assertion thrown here
I'm guessing the gpointer* handle has an invalid value
Florian van Dillen
@fvandillen
May 26 2016 17:51
// FIXME handle error :D
Tim Potze
@ikkentim
May 26 2016 17:52
Yea :P
the provider will probably an invalid value
Florian van Dillen
@fvandillen
May 26 2016 17:54
Question remains: why?
Tim Potze
@ikkentim
May 26 2016 17:54
I think i may pop into the mono/mono gitter
just gonna write our observations down first
Tim Potze
@ikkentim
May 26 2016 18:03
Allright.. Posted it in mono/mono... Let's see if there are any bright minds in there
Florian van Dillen
@fvandillen
May 26 2016 18:04
Probably might be :)
Florian van Dillen
@fvandillen
May 26 2016 18:09
At least there's 300+ people in there :P
Tim Potze
@ikkentim
May 26 2016 20:37
You'd be surprised
questions just dont lead anywhere
Tim Potze
@ikkentim
May 26 2016 20:50
ugh... Just messed my build script up... Had some of the build files in the /build folder which was in gitignore... I removed /build from gitignore and committed the stuff... thought I'd better just rename the build folder so I reset back to the previous commit>boom gone are my build files ugh...
Tim Potze
@ikkentim
May 26 2016 21:07
by the way, my server has been running for 4 hours, got nothing so far...
ill leave it on for another 30 mins
Florian van Dillen
@fvandillen
May 26 2016 21:08
I am starting to think this is the timer. Could it be that even my single timer is creating some sort of overflow by leaving it on repeat?
I do not recall this being an issue before and the code hasn't changed at ALL.
Tim Potze
@ikkentim
May 26 2016 21:08
Maybe... It's an issue in a spawned thread after all
It's probably better either way to use sa-mps timers
Florian van Dillen
@fvandillen
May 26 2016 21:08
No lol, those are horrible
Tim Potze
@ikkentim
May 26 2016 21:09
SampSharp.Gamemode.SAMP.Timer if i recall correctly
Well its not actually samps
its sampgdks
Florian van Dillen
@fvandillen
May 26 2016 21:09
mm, i'll look into it further
Tim Potze
@ikkentim
May 26 2016 21:09
it has its own implementation, it's pretty good, and runs on the main thread ( so it won't have to await calls to natives)
In half an our we know... i think.. Then my server has run for 300 mins as well
Florian van Dillen
@fvandillen
May 26 2016 21:14
I have taken out the timer
Let's see if that is the issue after all
Although I don't have a clue why a simple (native .net) timer would mess with mono.