Open quantumcore opened 5 years ago
I just played a bit with it and didn't manage to trigger a crash, so I really don't know. But I remember having such a problem and felt I should warn about it.
The main problem, however, not connected to crashing, is that every new client is assigned a new thread which might cause issues when a really large group of clients were to connect. But I made this as a personal learning project, not a professional solution in any way.
If you have any suggestions or will find any bugs, feel free to share them and/or contribute :smiley:
I left the server running for some time (and forgot about it, to be honest) and after that, I visited localhost
one more time only for it to crash with the following error in the console:
terminate called without an active exception
abnormal program termination
Quick googling suggests I messed up something with threads. I might look into this in free time.
I suspected it might be threads at first. This is for windows and the first thing that came into my mind was why aren't windows threads being used. Yes I want to contribute. I'll try fixing this and also try making a version with Windows threads.
I don't understand, why would you use Windows threads, if C++ offers an abstraction over them. Right now, porting to BSD socket API is trivial, after this change it won't be.
As you've stated, It sometimes crashes. Can I see why and where? What exception causes it to crash? And how does it crash?