Question

Just to clarify, I have fixed this problem temperately and just wanted to see if someone could expand on why this happened and possibly give me some insight as to how to fix it permanently. I am building a plugin for AutoCAD and have ran into some troubles with some RadioButtons

I set the GroupName property of my a group of RadioButtons so i could control them independently from a different group. Now when I'm debugging in either release and debug mode the application works, but when i netload my .dll into autocad to check how it performs outside of debug mode, I click one of the 8 radio buttons and autocad crashes (Im not worried about that) and i got the exception that it was throwing it is as follows:

the thread tried to read from or write to a virtual address for which it does not have the appropriate access

and part of the code that threw it:

at System.Windows.Controls.RadioButton.UpdateRadioButtonGroup()
at System.Windows.Controls.RadioButton.OnChecked(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ToggleButton.OnIsCheckedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)

Now i really don't understand why it is not working outside of debugging. Can someone please try to give me some insight to this?

As a the temporary fix i removed GroupName from my RadioButton XAML. if you need any of the source please ask.

Was it helpful?

Solution

I didn't get the issue fixed directly. But, as a work around, I put them in their own grid. This gave me the results I was looking for.

OTHER TIPS

If you are showing your wpf view in a palette, try setting the session flag on the command to Session.

Example:

CommandMethod("CommandName",CommandFlags.Session)] public void Something() { //Your code }

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top