Icarus: An exception occurred while dispatching a message to a log listener

484 views
Skip to first unread message

Adam Voss

unread,
Dec 13, 2011, 11:35:20 AM12/13/11
to gallio-dev
I did not have this problem before I made attempts at building Gallio
from [unmodified] source.

Since I have tried that, I now find that get the Unhandled Exception
"An exception occurred while dispatching a message to a log listener"
popping up multiple times when Icarus loads, rescans an assembly, or
runs tests. This happens even when I run Icarus from the official
Gallio build from the Internet.

Does this look familiar to any one as to what I may have screwed up?

Stack trace:

System.InvalidOperationException: Invoke or BeginInvoke cannot be
called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller,
Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.BeginInvoke(Delegate method,
Object[] args)
at Gallio.Icarus.Logging.RuntimeLogger.LogImpl(LogSeverity
severity, String message, ExceptionData exceptionData)
at Gallio.Runtime.Logging.DispatchLogger.Data.Dispatch(LogSeverity
severity, String message, ExceptionData exceptionData) in c:\Server
\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime\Logging
\DispatchLogger.cs:line 85
Reported by:
UnhandledExceptionPolicy
at Gallio.Common.Concurrency.LockBox`1.Read(ReadAction`1 action) in
c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Common
\Concurrency\LockBox.cs:line 61
at Gallio.Runner.DefaultTestRunner.TappedLogger.Handle(LogSeverity
severity, String message, ExceptionData exceptionData, Boolean log) in
c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runner
\DefaultTestRunner.cs:line 879
at Gallio.Runner.DefaultTestRunner.TappedLogger.LogImpl(LogSeverity
severity, String message, ExceptionData exceptionData) in c:\Server
\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runner
\DefaultTestRunner.cs:line 859
at
Gallio.Runtime.Hosting.IsolatedProcessHost.LogConsoleOutputWriteBufferedMessageSync()
in c:\Server\Projects\MbUnit v3.3\Work\src\Gallio\Gallio\Runtime
\Hosting\IsolatedProcessHost.cs:line 323
at
Gallio.Runtime.Hosting.IsolatedProcessHost.LogConsoleOutput(Object
sender, DataReceivedEventArgs e) in c:\Server\Projects\MbUnit v3.3\Work
\src\Gallio\Gallio\Runtime\Hosting\IsolatedProcessHost.cs:line 296
at Gallio.Common.Policies.EventHandlerPolicy.SafeInvoke[T]
(EventHandler`1 handlerChain, Object sender, T e) in c:\Server\Projects
\MbUnit v3.3\Work\src\Gallio\Gallio\Common\Policies
\EventHandlerPolicy.cs:line 69
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
at
System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage
msg)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage
msg, IMessageSink replySink)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx)
at
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Graham Hay

unread,
Dec 14, 2011, 2:52:40 PM12/14/11
to galli...@googlegroups.com
That's probably me rather than you, I'm afraid :(

It needs to use the sync context, rather than invoking. I'll fix it when I get a chance.


--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gallio-dev?hl=en.


Scott Lerch

unread,
Dec 16, 2011, 2:41:27 PM12/16/11
to galli...@googlegroups.com
I submitted a patch along with another fix related to the Runtime Log:  http://code.google.com/p/mb-unit/issues/detail?id=872.  An easy work around though is to just make sure the Runtime Log window is visible before loading or running tests.

-Scott

Graham Hay

unread,
Dec 18, 2011, 11:10:58 AM12/18/11
to galli...@googlegroups.com
I applied both patches. Thank you!

On 16 December 2011 19:41, Scott Lerch <scott...@gmail.com> wrote:
I submitted a patch along with another fix related to the Runtime Log:  http://code.google.com/p/mb-unit/issues/detail?id=872.  An easy work around though is to just make sure the Runtime Log window is visible before loading or running tests.

-Scott

--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gallio-dev/-/nxvSJDHehwkJ.

Chan Chan

unread,
Apr 29, 2015, 3:36:38 AM4/29/15
to galli...@googlegroups.com
Hi Adam Voss,
me too getting the same trouble with Ranorex 5.3.1 and the latest Gallio bundle gallio.icarus.
Could you please tell me what steps you have followed to fix it.

Thanks,
Chan
Reply all
Reply to author
Forward
0 new messages