I am pretty sure we are writing to LogMessage from background threads.

We have a logging system that routes all messages through a lock
though so two messages, even if they are on different threads, are not
being written at the same time.  That may be addressing the issue you
are running into.

Best regards,
-ben

On Fri, Jul 6, 2012 at 2:14 PM, Nicolas Burtnyk <nico...@redshift3d.com> wrote:
> Hello list,
>
> We've recently discovered that Application::LogMessage cannot be safely
> called from any thread except the main thread.
> The consequence of this is that we are unable to use LogMessage during our
> custom renderer's Process callback (which is not called on the main thread
> by XSI) without risking crashes.  I noticed that many other renderers are
> logging to the history window during rendering.  Does anyone know how this
> can be achieved?  I want to produce log messages from the render (process
> callback) thread, then consume them and call LogMessage from the main
> thread, but I'm not sure how I can get my consume code to run on the main
> thread, since I have no place to hook into the main thread.  Is there a way
> to execute a command on the main thread from another thread?
>
> Thanks!
>
> -Nicolas



-- 
Best regards,
Ben Houston
Voice: 613-762-4113 Skype: ben.exocortex Twitter: @exocortexcom
http://Exocortex.com - Passionate CG Software Professionals.

Reply via email to