Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, August 13, 2013 10:48:34 PM(UTC)

henk  
henk

Groups: Registered
Posts: 3


Hello,

after updating from Leadtools 15 to Leadtools 17.5 a NullReferenceException was thrown
while drawing a protractor annotation. All other kinds of annotations can be drawn without
problems.

Stack Trace:

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)


We are using Leadtools 17.5 .NET, please let me know if you need an example project.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, August 14, 2013 5:45:01 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Henk,
Please answer the following questions:
1- What is the exact line of code that throws this error?
2- What is the file version (right-click->properties) of Leadtools.dll, Leadtools.Annotations.dll and Leadtools.Annotations.Core.dll that you are using?
3- Can you reproduce the issue using any of our demos? If yes, which one? What is the exact steps to reproduce?
4- If this issue only appears with your code, can you create a small sample project (NOT your full application) that shows the issue and put it inside ZIP or RAR file and upload it?
5- What is the Windows version (XP, Vista, 7, 8..etc) that you are seeing the issue on? Is it 32-bit or 64-bit? And Is it the development machine or the deployment machine?
6- Is LEADTOOLS installed on the machine that shows the issue or not?

Note: If you are going to upload files to the forums, do NOT use the "Preview" option.

 
#3 Posted : Tuesday, August 20, 2013 1:00:16 AM(UTC)

henk  
henk

Groups: Registered
Posts: 3


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.
File Attachment(s):
Leadtools17.5.Protractor.zip (13kb) downloaded 37 time(s).
 
#4 Posted : Tuesday, August 20, 2013 6:03:08 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Henk,
It appears that your code is missing the following line of code:
=============
protractorObject.Font =  new AnnFont(FontFamily.GenericSansSerif, new AnnLength(11), FontStyle.Regular);
=============
For the AnnProtactor object, it is necessary to set the font.

 
#5 Posted : Tuesday, August 20, 2013 10:36:06 PM(UTC)

henk  
henk

Groups: Registered
Posts: 3


That's it. Thanks for the quick support.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.331 seconds.