Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81352 --- shadow/81352 2007-04-11 11:00:47.000000000 -0400 +++ shadow/81352.tmp.1548 2007-04-11 11:19:18.000000000 -0400 @@ -23,6 +23,297 @@ ------- Additional Comments From [EMAIL PROTECTED] 2007-04-11 09:35 ------- Please attach a test case. ------- Additional Comments From [EMAIL PROTECTED] 2007-04-11 10:35 ------- -> class libs + +------- Additional Comments From [EMAIL PROTECTED] 2007-04-11 11:19 ------- + public void Remote() + + { + + BinaryServerFormatterSinkProvider provider = new +BinaryServerFormatterSinkProvider(); + + provider.TypeFilterLevel = +System.Runtime.Serialization.Formatters.TypeFilterLevel.Full; + + + + IDictionary props = new Hashtable(); + + props["name"] = null; + + + + + int channelNameCount = 0; + + string channelName = ""; + + bool channelNameFound; + + while (props["name"] == null) + + { + + channelName = settings.RemotedObjectName + +channelNameCount.ToString(); + + channelNameFound = false; + + + + foreach (IChannel registeredChannel in +ChannelServices.RegisteredChannels) + + { + + if (registeredChannel.ChannelName.Equals(channelName)) + + { + + channelNameFound = true; + + + + break; + + } + + } + + + + if (!channelNameFound) + + props["name"] = channelName; + + else channelNameCount++; + + } + + + + + props["secure"] = false; + + + + + + + + int portIndex = 0; + + while (channel == null) + + { + + props["port"] = currentPort = settings.Ports[portIndex]; + + + + try + + { + + channel = new TcpChannel(props, null, provider); + + + + ChannelServices.RegisterChannel(channel, false); + + } + + catch (SocketException exception) + + { + + channel = null; + + if (settings.Ports.Count > (portIndex + 1)) + + portIndex++; + + else + + throw new UnableToCreateChannelException("", exception); + + } + + catch (RemotingException exception) + + { + + throw new UnableToRegisterChannelException("", exception); + + } + + } + + + + remotedObjectReference = RemotingServices.Marshal(this, +settings.RemotedObjectName, this.GetType()); + + + + if (remotedObjectReference == null) + + throw new CanNotRemoteHimSelfException(); + + + + if (Remoted != null) + + Remoted(this, null); + + + + + + if (settings.BroadCastPorts.Count != 0) + + { + + broadCastReceiver.Initialize(settings.BroadCastPorts); + + broadCastReceiver.StartListen(); + + + + + + foreach (int port in settings.BroadCastPorts) + + broadCastReceiver.Send(Description.ToShortString(), new +IPEndPoint(IPAddress.Broadcast, port)); + + } + + + } + + + + +run this code twice and it crash with: + + + + +System.NotSupportedException: Operation is not supported. + at +System.Runtime.Remoting.Channels.ServerDispatchSinkProvider.set_Next +(IServerChannelSinkProvider value) [0x00000] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/corlib/System.Runtime.Remoting.Channels/ServerDispatchSinkProvider.cs:54 + + at +System.Runtime.Remoting.Channels.ChannelServices.CreateServerChannelSinkChain +(IServerChannelSinkProvider provider, IChannelReceiver channel) +[0x0001a] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs:167 + + at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.Init +(IServerChannelSinkProvider serverSinkProvider) [0x000cc] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs:96 + + at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor +(IDictionary properties, IServerChannelSinkProvider +serverSinkProvider) [0x001b1] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs:142 + + at System.Runtime.Remoting.Channels.Tcp.TcpChannel.Init (IDictionary +properties, IClientChannelSinkProvider clientSink, +IServerChannelSinkProvider serverSink) [0x0001d] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs:61 + + at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor +(IDictionary properties, IClientChannelSinkProvider +clientSinkProvider, IServerChannelSinkProvider serverSinkProvider) +[0x00018] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs:75 + + at Apodis.Remote.Remotable.Remote () [0x00108] in +/home/eric/stage/Remote/Apodis.Remote/Remotable.cs:160 + at (wrapper remoting-invoke-with-check) +Apodis.Remote.Remotable:Remote () + at RemoteTest.RemotableForm.button_Click (System.Object sender, +System.EventArgs e) [0x00030] in +/home/eric/stage/Remote/RemoteTest/RemotableForm.cs:76 + at (wrapper delegate-invoke) +System.MulticastDelegate:invoke_void_object_EventArgs +(object,System.EventArgs) + at System.Windows.Forms.Control.OnClick (System.EventArgs e) +[0x0001c] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4815 + + at System.Windows.Forms.Button.OnClick (System.EventArgs e) +[0x00025] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:103 + + at System.Windows.Forms.ButtonBase.OnMouseUp +(System.Windows.Forms.MouseEventArgs mevent) [0x000a7] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:476 + + at System.Windows.Forms.Button.OnMouseUp +(System.Windows.Forms.MouseEventArgs e) [0x00000] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:107 + + at System.Windows.Forms.Control.WndProc +(System.Windows.Forms.Message& m) [0x0027f] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4477 + + at System.Windows.Forms.ButtonBase.WndProc +(System.Windows.Forms.Message& m) [0x00055] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:530 + + at System.Windows.Forms.Button.WndProc +(System.Windows.Forms.Message& m) [0x00000] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:120 + + at System.Windows.Forms.Control+ControlNativeWindow.WndProc +(System.Windows.Forms.Message& m) [0x00000] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:196 + + at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, +IntPtr wParam, IntPtr lParam) [0x0006b] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:171 + + +Unhandled Exception: System.InvalidOperationException: Cannot call +Invoke or InvokeAsync on a control until the window handle is created + at System.Windows.Forms.Control.BeginInvokeInternal (System.Delegate +method, System.Object[] args, Boolean disposing) [0x0007b] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:1162 + + at System.Windows.Forms.Control.BeginInvoke (System.Delegate method, +System.Object[] args) [0x00000] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3193 + + at (wrapper remoting-invoke-with-check) +System.Windows.Forms.Control:BeginInvoke (System.Delegate,object[]) + at System.Windows.Forms.Control.Invoke (System.Delegate method, +System.Object[] args) [0x00013] in +/var/tmp/portage/dev-lang/mono-1.2.3.1/work/mono-1.2.3.1/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3419 + + at (wrapper remoting-invoke-with-check) +System.Windows.Forms.Control:Invoke (System.Delegate,object[]) + at RemoteTest.RemotableForm.RemoteObjectDiscovered (System.Object +sender, Apodis.Remote.RemoteObjectEventArgs e) [0x00000] in +/home/eric/stage/Remote/RemoteTest/RemotableForm.cs:44 + at (wrapper delegate-invoke) +System.MulticastDelegate:invoke_void_object_RemoteObjectEventArgs +(object,Apodis.Remote.RemoteObjectEventArgs) + at Apodis.Remote.Remotable.BroadCastReceiver_DataReceived +(System.Object sender, Apodis.Remote.DataReceivedBroadcastEventArgs e) +[0x000eb] in /home/eric/stage/Remote/Apodis.Remote/Remotable.cs:112 + at (wrapper delegate-invoke) +System.MulticastDelegate:invoke_void_object_DataReceivedBroadcastEventArgs +(object,Apodis.Remote.DataReceivedBroadcastEventArgs) + at Apodis.Remote.BroadcastManager`1[System.String].ListeningFunction +() [0x00089] in +/home/eric/stage/Remote/Apodis.Remote/BroadCastManager.cs:150 + at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void () + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
