Exception thrown when trying to list topics

Jun 26, 2012 at 1:03 PM
Edited Jun 26, 2012 at 1:03 PM

While using, the .net chat app, which functions correctly with all other respects, if I try to list topics as in the following snippet, I get an exception "Index was outside the bounds of the array" (see stack trace bellow), any ideas?

10x,

Black.

ESB.Authenticate("rpgmaker", "password1");
ESB.ConfigWithAddress("tcp://172.31.172.49:8000");
RegisterTopic(); 
// till this point all is fine, and without the next line - 
// the program works as expected

var topics = ESB.GetTopics(); //this throws
 
Stack trace:
at MessageShark.CustomBinary.ConvertBaseToConcreteType(Byte[] buffer, Type type, Int32& startIndex)
at IZeroMQCommandReplySerializer.ISerializer.Deserialize(Byte[] )
at MessageShark.MessageSharkSerializer.Deserialize[T](Byte[] buffer)
at Phoenix.ZeroMQConnectors.SerializationExtension.Deserialize[T](Byte[] buffer)
at Phoenix.ZeroMQConnectors.ZeroMQSender.Send[TRequest,TResponse](TRequest request)
at PServiceBus.Services.Gateway.Runtime.ZeroMQMessageBus.GetTopics()
at PServiceBus.Services.Gateway.Runtime.ESB.GetTopics()
at ChatApp.Program.Main(String[] args) in D:\ArielData\Dev\PSBusTest\ChatApp\Program.cs:line 36
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart() 
Coordinator
Jun 26, 2012 at 1:19 PM

The problem is with serialization. The data that was given to messageshark for serialization was T[] instead of List<T>, so it failed. I just fixed it in the branch

http://pservicebus.codeplex.com/SourceControl/changeset/changes/954e786330ca

You will need to download from the source control and recompile using build.cmd then uninstall what you have and install the compiled version. I will try to update the dll myself on the download page for other that might have tried it also.

 

Thanks,

Coordinator
Jun 26, 2012 at 1:36 PM

The changes for the fix is now part of the download. You can simply re-download the server and the samples again

Jun 26, 2012 at 1:43 PM

Great!

Many thanks.

Coordinator
Jun 26, 2012 at 2:20 PM

Let me know if the fix resolved your problem.