Lockup after entering commands via console or script editor

After executing some code in the python console or script editor, I will often see the applicaiton lock up. This will be unrelated to the code being executed. It’s almost always when there’s an error of some sort, though not always. It can be as simple as a one-line syntax error in the python console. The UI will go gray and I’ll get the spinning wheel. If I do a break (ctrl+c) in the app console, the lockup resolves. Usually if I enter the exact same code again, it won’t lock up. Has anyone else seen this? It’s hard to report because it can’t be reproduced reliably.

@LazyDodo the ‘Blender Development’ cetegory is described as " Code questions and discussions between current or aspiring Blender developers." and this topic is about coding in Blender, so it belongs there.

At least under Windows a text selection in the console window can cause what you describe, eg if you want to quit blender and a selection is present. But a click on the escape key in ther console window should solve that. Maybe thats what you are experiencing.

Nope, that isn’t it.

This topic is riding the fine line between bug report which ought to go on developer.blender.org and a python based question for which the python section of the forum is aimed, blender development is aimed at questions regarding the blender core codebase, not necessarily coding questions while using blender.

I agree though, the forum descriptions could be changed a little to better communicate this.

I’ll move this to the python section for now.

1 Like

@LazyDodo sorry for the confusion on my part, on all of my topics. Noted category for the future, as I won’t be getting into the core development any time soon.

On this one, I’d make a bug report, but because it’s so inconsistent to repro, I thought I’d ping the forum a bit first to see if maybe it’s a normal part of the process, or I am missing something obvious,.

Yeah inconsistent repro’s are the worst, how inconsistent are we talking about? try 10 times, it may do it once or twice, or hey do this all day long and you’ll see it once or twice? if it’s inconsistent but still can be repro’d within a few minutes i’d say it’s ok to report.

Unfortunately I haven’t narrowed it down that far. If it happens once and then doesn’t happen again, it might not happen for fifty times, or 100. But I’ve also had it happen repeatedly. I might start recording my sessions.

When this happens, do you have a debugger handy to attach to the hanging/looping/out-to-lunch Blender process (a debug image, with full symbols)? Or have you been there, done that, and your backtraces are all over the map?

Alas, without a reproducible trigger sequence, a bug report isn’t worth a brass razoo.

1 Like

Have not been there done that. Not sure how to configure such a setup. Is there a guide somewhere?

Building Blender starts you down the road to the La Brea Tar Pits that is Blender debugging. After you get to the point where you’ve got any kind of image running, go through the Build options page to set the CMake symbols for a debug image. I do Linux/Gentoo and am hazy about the particular Windows magickal incantations; I bow to @LazyDodo in that area. There is also a Building Blender here at DevTalk that has the usual horror stories.

Above all, have fun. I find being able to debug on the C\C++ side gives some insight on what the H-E-Double-Tooth-Picks is happening underneath Python. The two are like an old married couple, once you learn how to decode the bickering and all that…

1 Like

That sounds…painful. Lol. I might just rely on the only handy dandy ctrl+c in the console for the time being.

thanks!

It’s not everyone’s cup of joe. May be worth your while to run Blender with the various --debug-* options. I find --debug-depsgraph particularly useful. Perturb an object, and it falls to the dependency graph to evaluate the consequences of that to the object’s own appearance and also the appearance of other, dependent objects. This particular debug option induces a print out of various milestones reached during dependency graph evaluation. Could be insightful if an intermittent hang happens before, after or during dependency graph evaluation.