Page MenuHome

Open system console causes Blender to freeze
Closed, ArchivedPublic

Description

System Information
Operating system: Windows 10
Graphics card: GTX 1060

Blender Version
Broken: (2.8+) (tried 2.81 and 2.82)

Short description of error
After running a script with the system console open blender will freeze on the next input (Note that the freeze is AFTER the program finishes executing).
This does not happen when the system console is not open.

Exact steps for others to reproduce the error

  • make sure the system console is open (window > toggle system console)
  • Open a new text document
  • Write some basic code
  • run the script
  • try do anything else (save, add an object, run the script again)
  • Sometimes I can run the script 2-3 times.

The code I was using:

import bpy
import csv

for i in range(0, 100):
  print(i)

Event Timeline

Robert Guetzkow (rjg) changed the task status from Needs Triage to Needs Information from User.EditedMay 4 2020, 5:42 PM

The code you've provided is syntactically wrong, Python doesn't use curly braces. Could it be that you accidentally clicked into the console? If that is the case you've activated the QuickEdit-Mode (see T75431), which will halt the execution of the program on the next print to stdout.

Robert Guetzkow (rjg) renamed this task from Having system console open in windows causes CRASH to Open system console causes Blender to freeze.May 4 2020, 5:45 PM

Sorry, I've edited the comment. I rewrote my code (as opposed to copy paste into the window) and make it semi cpp and semi python.
It was syntactically correct in blender.
I did at some points click on the system console, I don't see why this should have caused blender to freeze tho.

Ankit Meel (ankitm) closed this task as Resolved.May 5 2020, 9:50 AM
Ankit Meel (ankitm) claimed this task.

This is not a bug; Windows blocks stdout when selecting something in the console, and since Blender logs something to the console on loading it has to wait.

T73588#868983
and as @Robert Guetzkow (rjg) explained, this isn't a bug in Blender.

Ankit Meel (ankitm) changed the task status from Resolved to Archived.May 5 2020, 9:50 AM
hyyou (hyyou) added a subscriber: hyyou (hyyou).EditedJul 16 2020, 4:06 AM

I know the solution was already stated in another issue.
This is the top link of google for this issue for me, so I think it is useful to also post the solution here.

Right click top-left of the title bar of the Blender's console ==> properties (or "Default" if you want to make it such by default) ==> "Options" tab ==> Uncheck "Quick Edit Mode"

Reference : https://superuser.com/questions/1442941/windows-10-console-stops-running-if-i-click-in-the-console-window