-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
threaded with router and map my owner handler run crash when open url. #55
Comments
I can confirm this issue. I tried exactly the same, integrating the custom handler Mainhandler from the request-dumper example into the threads-with-router-example.
Reducing to 1 worker thread ("server.run(1, 8080...") did not help. Unfortunately this is a showstopper. Is there something wrong with this approach? |
Qt 5.5.1 on Mac OS X (deployment will be on Linux though). |
Tested on linux, and the same problem, crashing as soon as a Url is requested which matches the QRegularExpression - unlike on Mac, where the first request still works. There is some debug output on linux, when it crashes:
Valgrind does not give more output than that. In QtCreator, run in debug mode, this is where it stands after crashing:
I hope that gives enough info to fix it. Otherwise please ask. |
It inherits
This is a malformed combination of two different examples. I don't claim an abstraction here being thread-safe when it's not. Examples are learning material to speedup your understanding. Not sure what to fix here. |
Yes, see first code sample above.
What would be a better example to combine the threads-with-router-example and handlers? I think such a combination is needed for any server doing more than just serving a few more or less static files or bytes of html. Especially also when handling file uploads.
There might be nothing to fix in the server code, but just to show the correct way of doing it, an example for this not so uncommon use case. Also I think that you laid the foundation to a beautiful server. I've played around with some handlers for our main use cases, and it's fun and easy. |
That's a starting point. Thanks. |
Just to make sure that the issue reported here is not misunderstood as a general problem with Tufao: a multithreaded server application with router and many handlers, based on the code as I posted it above, is currently in production test and so far no issues at all, rock solid, without a single change or issue in the Tufao code, and faaaast! |
You're welcome |
code below, MainHandler just copy from your other example.
The text was updated successfully, but these errors were encountered: