1- I can't determine the exact line of code, the exception appears in Application.Run
Here is the full stack trace of the exception:
System.NullReferenceException was unhandled
HResult=-2147467261
Message=Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Source=Leadtools.Annotations
StackTrace:
bei Leadtools.Annotations.ProtractorDrawer.Draw(Graphics graphics)
bei Leadtools.Annotations.AnnProtractorObject.DrawObject(Graphics graphics)
bei Leadtools.Annotations.AnnObject.Draw(Graphics graphics)
bei Leadtools.Annotations.AnnDrawDesigner.OnAfterDrawingObjects(Object sender, AnnPaintEventArgs e)
bei Leadtools.Annotations.AnnContainer.OnAfterDrawingObjects(AnnPaintEventArgs e)
bei Leadtools.Annotations.AnnContainer.Draw(Graphics graphics)
bei Leadtools.Annotations.AnnAutomation.a(Object A_0, PaintEventArgs A_1)
bei Leadtools.Annotations.RasterImageViewerAutomationControl.a(Object A_0, PaintEventArgs A_1)
bei Leadtools.WinForms.RasterImageViewer.OnPostImagePaint(PaintEventArgs e)
bei Leadtools.WinForms.RasterImageViewer.RedirectPaint(Graphics graphics, Rectangle src, Rectangle dest, Rectangle destClip, Matrix transform, Boolean ignoreWorldTransform, RasterPaintDisplayModeFlags displayFlags, Boolean fromPan)
bei Leadtools.WinForms.RasterImageViewer.RedirectPaint(Graphics graphics, Rectangle src, Rectangle dest, Rectangle destClip, Matrix transform)
bei Leadtools.WinForms.RasterImageViewer.OnPaint(PaintEventArgs e)
bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
bei System.Windows.Forms.Control.WmPaint(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei Leadtools.WinForms.RasterImageViewer.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
2- Leadtools.dll 17.5.0.62
Leadtools.Annotations.dll 17.5.0.21
Leadtools.Annotations.Core.dll 17.5.0.5
3- No, I can't reproduce the issue with your demos.
4- Please see the ZIP file attached. Click Protractor and try to draw the annotation.
5- Windows 8, development machine, 64-Bit (but 32-Bit Leadtools and application)
6- Leadtools is installed on the machine.
Best regards.