I’m currently developing an addon for Blender. The addon (simply put) is just a cool material, but I’m creating some custom UI elements for changing the material nodes, in the sidebar (n-panel). I’ve already spent about 1 month on this (part time) and am close to releasing it. Though I’ve just found some big problems with it and am not sure what the reason is.
When changing some node settings with the UI elements, and then using ctrl+Z, blender crashes. Sometimes 1 undo works and it crashes on the second one, sometimes on the third one. But nearly always it crashes. It just closes. I tried to look for some crash reports to find out the reason. Even though, in the temp folder, there is a blender folder with the correct creation time the crash occurred, the folder is empty. I tried to narrow it down myself, by activating the system memory and video memory statistics, by right clicking in the bottom right, where the version number is. Even on the crash, it uses just about 30% of the memory. Another thing I tried was to have the task manager run on the side. Also here, everything stayed below 30% except the GPU. 1 second after the crash, it spiked for a few milliseconds to 100% I’m not sure if that is the reason of the crash, or just a reaction to the crash. Nevertheless, I tried updating my GTX 1070 Drivers, though I could not install the latest version. It just says an error occurred, and to try again. Another thing I tried was to do the same thing I did before (changing the same nodes and undoing), but in the shader editor, without loading the script for the UI elements. This did not crash Blender, and everything worked fine.
So the Problem seems to come from the script I’m developing. But since there is no Error message or crash report, I have no Idea what is causing it. Like I said, I’ve already spent quite some time on the script, and am quite proud of it. Question: How can I find the cause of the problem?
draw
method. Don't modify things in another property if you're using theupdate
callback. etc $\endgroup$