<https://hastebin.com/henakilopa.txt> how am i sup...
# announcements
l
https://hastebin.com/henakilopa.txt how am i supposed to debug something like this? the entire stacktrace is foreign code
s
image.png
😂 3
l
no but seriously, how?
s
Dunno how I learned to, but you kinda just do? Start from the top and follow down until you reach your code
b
Seems pretty obvious what happened to me
s
although in this case, it just looks like the connection was dropped
b
While an NIO socket was trying to read data the connection was closed
l
well yeah im working on a game sever and this exception occurs when a player unexpectedly disconnects. i just need to find out where this exception is thrown so i can catch it
b
That's really got nothing to do with coroutines anyway That's just how NIO stuff works
1
l
however the stacktrace doesnt tell me
i thought i already wrapped all the places where i read from the connection in a try/catch, but apparently not
why isnt the stack trace referencing any of my code? i'd expect it to show the line where i try to read from a closed connection
f
because it's an scheduler.
l
which brings me back to my initial question: how do i debug this? do i just randomly put try/catch blocks everywhere until i find the place by chance?
ok turns out i am already catching this exception, but for some reason it is still printed into the console. any way i can prevent that?
b
Most likely CoroutineExceptionHandler prints that exception, you can set your own in your context
l
i tried setting a custom exception handler, but it doesnt trigger. the stacktrace still shows up in the console
b
You probably set it to wrong context/place(it should be in context used in launch fun)🤷‍♂️ show us the code, it will be more helpful