Skip to content

InvalidOperationException on Mac: This PlotModel is already in use by some other PlotView control. #139

Closed
@janusw

Description

@janusw

I have a Xamarin.Forms app that runs well on Android, iOS and UWP. When running on MacOS, however, I get errors when updating the plot (by re-assigning the PlotModel):

  System.InvalidOperationException: This PlotModel is already in use by some other PlotView control.
    at OxyPlot.PlotModel.OxyPlot.IPlotModel.AttachPlotView (OxyPlot.IPlotView plotView) [0x00011] in <aa89ede85c2344f7894022daa95cfaf3>:0
    at OxyPlot.Xamarin.Mac.PlotView.set_Model (OxyPlot.PlotModel value) [0x00027] in <bc79692f004c40a5a09a55685ae301d5>:0
    at OxyPlot.Xamarin.Forms.Platform.MacOS.PlotViewRenderer.OnElementChanged (Xamarin.Forms.Platform.MacOS.ElementChangedEventArgs`1[TElement] e) [0x00029] in <8e51f4d8166f43efa82d9a432db15ebc>:0
    at Xamarin.Forms.Platform.MacOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x0017a] in <6cf85f52b2ba4368b7f5ac91b0fb6d86>:0

This happens both with 2.0.0-beta.1 and 2.0.0-beta.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions