Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
New Project: Open Source Blender Renderfarm GSORF - Random Crashes!
Hello dear Qt-Community,
I'd like to introduce the Georg-Simon-Ohm Renderfarm, which is a project I developed at university during the past two semesters. If you don't know, a renderfarm allows you to take a 3D animation scene file and let it "render" (thats calculating and creating a final image of the 3D scene) over a computer network to reduce the overall rendertime.
Of course it uses the awesome Qt Framework alongside with some other libraries. The project semester is over now and I published the project online for everyone to try and learn from, about two days ago. It is licensed under GNU GPL v3.
!http://gsorf.lwtv.de/images/gsorf_quickstart_4_serversettings.jpg(Screenshot GSORF Server)!
Now, with so many different systems testing it in real scenarios, I am getting many reports about it crashing while rendering. While developing it I analyzed the Code with Valgrind trying to find memory leaks, but it didn't really show me anything bad. I have to admit, that I'd still consider myself quite a newbie, especially in developing professional software.
So, as you see I am in a little dilemma on how to handle those bug reports. Our team shrunk from five students to only two people, where I am the only one currently working on the farm. I have no waterproof plan on how to find those bugs reliably. That's the reason I'd like to ask you:
- What would you recommend me to find and eliminate those crashes?
- The crashes seem to be pretty easy to fix, but I just cannot find the reason for them. I cleanup my pointers every time after they've been used. Certainly, you professionals would find problematic code just by looking at it - for me debugging on Windows just tells me, that there is a problem with the "ntdll.dll", which could frankly be everything (afaik this library contains the main Windows function calls).
It would be great if you could take a look at the project and just tell me hints, recommendations and directions.
So, here are the user complaints: http://blenderartists.org/forum/showthread.php?353529-Open-Source-Blender-Renderfarm-GSORF
This is the project website: http://gsorf.lwtv.de/
And this is the github repository: https://github.com/GSORF/renderfarm
In my view the error could be either in this send function (client.cpp : 228):
or also in the code which is getting the status from Blender while rendering (blenderrenderengine.cpp : 391):
I won't post it since it is too large and wouldn't make sense without the other code, I assume.
Well, I am ready to get critiqued hard for doing this or that and I am okay with that! ;) Please consider to write a suggestion also, though.
Thank you for posting any helpful advice. If you need any further info, I'll be glad to provide it. Also feel free to use the code, as it is open sourced now! :) Since, I use Github collaborating should be easy. It would be fantastic if some of you also benefit from it.
Hi and welcome to devnet,
From a quick overlook of blenderrenderengine.cpp:
Why a pointer to QProcess ?
Also, in open, you don't check if blender already exist so if you call that function repeatedly you'll overwrite that pointer each time.
From a pure coding style view, you should:
- make all getters const
- use const references for parameters where it make sense e.g. for QString parameters
- Use a common style convention for your class/variable names, there's a mix of CamelCase/snake_case/Camel_Snake_Case
- same for filenames
Also, there's no need to disconnect before deleting, it will be done for you
Don't terminate a thread, just quit it, if quitting may fail, then only terminate after allowing some time to quit.
You will have a problem if you have several connections made since you overwrite TCPSocket for each
Hope it helps a bit to improve
And thank you for your welcoming words!
Also you really made some great suggestions. I will incorporate all of those into the code, once I will get to it.
Really helpful, thx!