Conduit CallbackOnCollectedDelegate

Hello,

In my plugin,

Managed Debugging Assistant 'CallbackOnCollectedDelegate' : ''RhinoCommon!Rhino.Display.DisplayPipeline+ConduitCallback::Invoke' 

this error usually happen.

When I build my plugin in debug mode, that error never happen. It happen only release build.

 public class MyConduit : Rhino.Display.DisplayConduit, IMyDomainRenderObject
    {
        public List<(Polyline, Color)> Polylines { get; set; }

        public RhinoDoc Doc { get; set; }

        protected override void DrawForeground(Rhino.Display.DrawEventArgs e)
        {
            if (this.Polylines != null)
            {
                foreach ((Polyline polyline, Color color) in this.Polylines)
                {
                    e.Display.DrawPolyline(polyline, color);
                }
                e.Display.EnableLighting(true);
            }
        }
    }

my conduit is simple.

When I create some polyline in my plugin, just render it.

conduit object is stored in my ViewModel.

if my ViewModel is deleted, I changed its all conduits to UnEnabled before deleting ViewModel.

Do anybody know some possible situation ??

  • Kyungmin

Hi @kyungmin.so,

Can you provide sample source code, that we can run here, along with step-by-step instructions on how to repeat what you are seeing?

Thanks,

– Dale

Hello @dale

I want provide sample code, but It is related third private library.

And, It is hard to reproduce that case.

If I create sample source code, I will post again.

Thank you for your support.

  • Kyungmin