Python output not showing consistently in console.app on OS X #18033

Closed
opened 2008-11-26 08:38:42 +01:00 by Simon Nielsen · 9 comments

Group: V 2.48a release
Category: Python

%%%I am having problems getting Python messages and general Blender messages to show in console.app on Mac OS X 10.5.5.

A workaround is to deliberately generate some Python errors. It seems to me that Blender is being conservative with dumping output to the log file. This probably helps performance, but makes it very difficult to debug scripts, both regular Blender scripts and from the game engine.

I'm not sure if there's a setting somewhere in Blender or the console, or an alternative IO stream to log to, but I've been unable to find it after extensive searching.

The attached .blend shows the behaviour on my machine. Instructions included.

Blender 2.48a / OS X 10.5.5 / intel Core 2 Duo 2.5 / 2GB RAM / Geforce 8600M GT.%%%

**Group**: V 2.48a release **Category**: Python %%%I am having problems getting Python messages and general Blender messages to show in console.app on Mac OS X 10.5.5. A workaround is to deliberately generate some Python errors. It seems to me that Blender is being conservative with dumping output to the log file. This probably helps performance, but makes it very difficult to debug scripts, both regular Blender scripts and from the game engine. I'm not sure if there's a setting somewhere in Blender or the console, or an alternative IO stream to log to, but I've been unable to find it after extensive searching. The attached .blend shows the behaviour on my machine. Instructions included. Blender 2.48a / OS X 10.5.5 / intel Core 2 Duo 2.5 / 2GB RAM / Geforce 8600M GT.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.
Author

%%%Since submitting this bug, I've found out you can have a terminal window monitoring the Python log. (By starting Blender from inside the .app package).

Still, this looks like erratic behaviour, and the recommendation to look at Console.app for output is still there in many tutorials and help threads.%%%

%%%Since submitting this bug, I've found out you can have a terminal window monitoring the Python log. (By starting Blender from inside the .app package). Still, this looks like erratic behaviour, and the recommendation to look at Console.app for output is still there in many tutorials and help threads.%%%

%%%I can confirm this issue. Still looking into it. :/

%%%

%%%I can confirm this issue. Still looking into it. :/ %%%

%%%Using watch "syslog -C | tail" to watch the output you can see the python strings if you use the line sys.stdout.flush() after your python print statements%%%

%%%Using watch "syslog -C | tail" to watch the output you can see the python strings if you use the line sys.stdout.flush() after your python print statements%%%
Member

%%%Yes, the osx terminal is not well configured for direct debugging, use Console instead.

I always run Blender in small window when testing, so console is visible;
./blender.app/Contents/MacOS/blender -p 500 200 1000 800
%%%

%%%Yes, the osx terminal is not well configured for direct debugging, use Console instead. I always run Blender in small window when testing, so console is visible; ./blender.app/Contents/MacOS/blender -p 500 200 1000 800 %%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

%%%I'm curious why this bug was closed. People are still having issues with consistent monitoring in the console under 10.5.%%%

%%%I'm curious why this bug was closed. People are still having issues with consistent monitoring in the console under 10.5.%%%
Author

%%%There is indeed some confusion on this issue. The issue has even been submitted again after this one was closed:

http://projects.blender.org/tracker/?func=detail&atid=125&aid=18689&group_id=9 (also closed)

Maybe I can clear a couple of things up:

Console.app / system.log is simply a bad place for this sort of output. The system.log is a useful place to see what your computer was doing at any given time, why an app crashed, etc. However, this log contains data from any app / process, and is continuously written to disk (as a large file including the backlog). This means that to see things in the log, the log process has to process them first. Naturally, if this wasn't done intelligently / with a buffer, every process would write to the disk several times a second - very bad for performance. So, the logging is done in the background and asynchronously, no promises made on when precisely things will appear, just that they eventually will, and in the correct order.

If you program your own app in XCode, and dump stuff to the log, you have the same issue - you can get the output in system.log, but you can't dictate when it appears. At least, if you try to, performance suffers. So, in XCode, use the debugger, which has a terminal directly showing output without having to write to the log. Memory vs. hard disk / focused task vs. general system tool.

We can do the same for Blender.

I found out how, and have put together sort of a walk-through on how to get a double-clickable application with the right icon that launches a terminal output window, here:

http://blenderartists.org/forum/showpost.php?p=1267071&postcount=15

(It takes all of two minutes).

The issue remains one of education - "console" is sometimes used interchangeably with "terminal" or "shell", to describe the output window you see on e.g. Windows. Yet, on OS X you decidedly want a Terminal window, not a Console. (It doesn't help that Ton apparently mistakenly swapped the terms, in the comment above).

Now, this should be made clear somewhere, and we should spend some energy educating about this issue (since the other option - making it work well in console.app means pleading with Apple, not Blender foundation.)

Except, as Campbell noted when he closed the other bug - Blender 2.5 has a built-in console planned. Much nicer, and the same for all platforms. So any solution we get now, will be moot in 2.5.

Hope this helps.%%%

%%%There is indeed some confusion on this issue. The issue has even been submitted again after this one was closed: http://projects.blender.org/tracker/?func=detail&atid=125&aid=18689&group_id=9 (also closed) Maybe I can clear a couple of things up: Console.app / system.log is simply a bad place for this sort of output. The system.log is a useful place to see what your computer was doing at any given time, why an app crashed, etc. However, this log contains data from any app / process, and is continuously written to disk (as a large file including the backlog). This means that to see things in the log, the log process has to process them first. Naturally, if this wasn't done intelligently / with a buffer, every process would write to the disk several times a second - very bad for performance. So, the logging is done in the background and asynchronously, no promises made on when precisely things will appear, just that they eventually will, and in the correct order. If you program your own app in XCode, and dump stuff to the log, you have the same issue - you can get the output in system.log, but you can't dictate when it appears. At least, if you try to, performance suffers. So, in XCode, use the debugger, which has a terminal directly showing output without having to write to the log. Memory vs. hard disk / focused task vs. general system tool. We can do the same for Blender. I found out how, and have put together sort of a walk-through on how to get a double-clickable application with the right icon that launches a terminal output window, here: http://blenderartists.org/forum/showpost.php?p=1267071&postcount=15 (It takes all of two minutes). The issue remains one of education - "console" is sometimes used interchangeably with "terminal" or "shell", to describe the output window you see on e.g. Windows. Yet, on OS X you decidedly want a Terminal window, not a Console. (It doesn't help that Ton apparently mistakenly swapped the terms, in the comment above). Now, this should be made clear somewhere, and we should spend some energy educating about this issue (since the other option - making it work well in console.app means pleading with Apple, not Blender foundation.) Except, as Campbell noted when he closed the other bug - Blender 2.5 has a built-in console planned. Much nicer, and the same for all platforms. So any solution we get now, will be moot in 2.5. Hope this helps.%%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#18033
No description provided.