[Mono-winforms-list] NullReferenceException calling SWF.Control.set_AccessibleRole

Rafael Teixeira monoman at gmail.com
Mon Aug 28 09:29:10 EDT 2006


Looking at our code, I would say that the only chance of happening a
null reference error is if the control that UltraToolbarsDockArea is
trying to set the AccessibleRole (presumbaly itself) redefines
(overrides) the method:

	protected virtual AccessibleObject CreateAccessibilityInstance() {
			return new Control.ControlAccessibleObject(this);
	}

With one that is not able to return a new AcessibleObject-compatible
instance, for some other cause.

Good luck,

On 8/24/06, Nick Thorpe <nt at zrho.com> wrote:
> Hi all,
>
> I'm trying to get a 3rd party GUI library (Infragistics NetAdvantage)
> working with Mono 1.1.16.1. When I run our application it dies almost
> instantly with this exception:
>
>  Unhandled Exception: System.NullReferenceException: Object reference not
> set to an instance of an object
>   at System.Windows.Forms.Control.set_AccessibleRole
> (AccessibleRole value) [0x00000]
>   at
> Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.InitControlStyles
> () [0x00000]
>   at
> Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea..ctor
> () [0x00000]
>   at (wrapper remoting-invoke-with-check)
> Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea:.ctor
> ()
>   at PSOMA.Form1.InitializeComponent () [0x00000]
>   at PSOMA.Form1..ctor () [0x00000]
>   at (wrapper remoting-invoke-with-check) PSOMA.Form1:.ctor ()
>   at PSOMA.Form1.Main () [0x00000]
>
> I checked the CIL to see if the library was using something outside of .NET,
> but it looks pretty standard and is seems to be failing at this call:
>
>   IL_0098:  call       instance void
> [System.Windows.Forms]System.Windows.Forms.Control::set_AccessibleRole(valuetype
> [System.Windows.Forms]System.Windows.Forms.AccessibleRole)
>
> I don't know enough about SWF to say whether this is a bug, or if these
> libraries are doing something unsupported. If anyone has any input on the
> problem I'd appreciate it.
>
> Thanks,
> Nick
>
> _______________________________________________
> Mono-winforms-list maillist  -
> Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw


More information about the Mono-winforms-list mailing list