Get an error clicking on the DRO field.

If you have a question about the software please ask it here.

Get an error clicking on the DRO field.

Postby kig23 » Tue Aug 07, 2018 9:28 am

Hi,
i've a strange issue. I'm creating a new screenset. My problem is the following. When i click on the MDI field and then click on the X axis DRO field a get an exception. Here is the exception text :
Code: Select all
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at UCCNC.GUI.Leavetextfieldswithoutvalidation()
   at UCCNC.GUI.gl_main_mousedown(Object , MouseEventArgs )
   at UCCNC.Form1.glControl2_MouseDown(Object , MouseEventArgs )
   at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.UserControl.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.UserControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


I've attached the picture of the error. I need some advices. Thanks
Attachments
error.png
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Get an error clicking on the DRO field.

Postby cncdrive » Tue Aug 07, 2018 9:33 am

An index is out of range for something, but I can't tell you what exactly.
If you will post the screenset and will tell me what to exactly do (step by step) then I can debug it for you.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Get an error clicking on the DRO field.

Postby kig23 » Tue Aug 07, 2018 11:00 am

Thanks Balazs for you fast replay. I've attached the screetset file. The .ssf file has only UC100 device screenset. You can create a new profile and change the screenset file with attached file. When you open UCCNC just click on the MDI field without typing and then click on the X axis DRO field and you'll see the exception. Thank you for your help.
Attachments
Defaultscreenset_issue.ssf
(3.12 KiB) Downloaded 549 times
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Get an error clicking on the DRO field.

Postby cncdrive » Tue Aug 07, 2018 1:08 pm

I've checked the issue and it happens because there is no DRO on the jogpanel and there is a code in the software which starts checking the DROs and because the array which holds the jogpanel's DROs is empty an exception happens. It is not handled, because we did not think about this scenario that somebody removes all the DROs from the jogpanel.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Get an error clicking on the DRO field.

Postby kig23 » Tue Aug 07, 2018 2:24 pm

Thank you very much.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 24 guests