[Mono-winforms-list] WinForm refresh/crash window problem

Jonathan Pobst monkey at jpobst.com
Mon Jun 30 11:16:10 EDT 2008

You might want to make sure that the events are being called on the 
correct thread.  You can check Control.InvokeRequired to see if you need 
to Invoke on the correct thread.

If that doesn't work, try to make a small test case that shows the 
problem and file a bug please.



buhochileno at gmail.com wrote:
> hi guys:
> I have a weird behavior with Winforms controls under mono on linux 
> (fedora 8 kernel 2.6.24, mono-1.9-3.1 update to revision 104788 from 
> opensuse repos, same for mono-winforms and libgdiplus0-103803)
> Updating some values of controls in a event (not trigger at a insane 
> speed...) all the window and the app stop responding and I don't get any 
> error message or console output..)..but is not all the time..
> But, for example, something like this always crash:
>        int i =0;
>        private void OnTiltMovementChangedEvent(object Sender, 
> NumValueMemberEventArgs<int> e) //also try with a non-generic types with 
> the same result
>        {
>            this.btnPosition.Top = i;
>             //even if you put a little sleep or "doevents" stuff...
>            i++;
>        }
> You can trigger the event in a loop even with sleeps or "doevents" in 
> the middle and the window still crash at some point...
> May be is something related to "Autosize" of the controls, because the 
> first time that I encounter the problem it was displaying values in a 
> event handler that receive values from a sensor, I was trying to display 
> the values in a texbox and the window have the problem, later I change 
> the controls to labels with autosize=true with the same result, but with 
> labels with autosize=false allmost all the time work ok (sadly the 
> autosize=false trick don't work in this case for textboxes or buttons...)
> any ideas?, sugestion?, bug report?
> Thanks
> Mauricio
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list

More information about the Mono-winforms-list mailing list