Page 1 of 1

Cannot open UCCNC, unhandled exception

PostPosted: Sun Oct 31, 2021 7:02 am
by Parkgrr
Hey folks
I recently upgraded to the latest UCCNC version. It has been running smoothly for a few days. I was using UCCNC for the entire today up until a couple of hours ago. I shut down the software and the computer, then after a couple of hours have reopened both and now UCCNC will not open.

"Profile: Default.pro was not found or had a syntax error. Attempting to Load the Default Profile!"
Screenshot (13).png

When I press OK:
Screenshot (14).png

When I press 'continue' it remains hung.

When I load in my OLD .pro from before I upgraded it fires up fine.
I have looked through the current Default.pro and haven't spotted any issues or syntax errors, I've attached it, did the software save something goofy to the .pro I haven't spotted?

The custom screenset listed exists and is named correctly. (yes, the screenset is called Default2019 - MG103.ssf.ssf, for some reason the software forces me to name it with the double extension. This screenset call in the .pro has worked a-ok for a few days with no changes made to the .pro. Additionally if I point the OLD profile to this NEW screenset it also still loads fine).

I was not mucking about in the .pro before it broke. The last thing I was doing in UCCNC was adjusting backoff for a rotary axis before closing the software.

Any tips?

UCCNC 1.2114
Windows 10 pro (10.0.19042)

Details from exception dialog:
************** Exception Text **************
System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.   
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)   
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)   
at UCCNC.Startupscreen.CloseForm()   
at UCCNC.Form1.Mainformpreparation()   
at UCCNC.Form1.Form1_Load(Object sender, EventArgs e)   
at System.Windows.Forms.Form.OnLoad(EventArgs e)   
at System.Windows.Forms.Form.OnCreateControl()   
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)   
at System.Windows.Forms.Control.CreateControl()   
at System.Windows.Forms.Control.WmShowWindow(Message& m)   
at System.Windows.Forms.Control.WndProc(Message& m)   
at System.Windows.Forms.Form.WmShowWindow(Message& m)   
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib   
Assembly Version: 4.0.0.0   
Win32 Version: 4.8.4420.0 built by: NET48REL1LAST_C   
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
------------------------------UCCNC   
Assembly Version: 1.0.0.0   
Win32 Version: 1.0.0.0   
CodeBase: file:///C:/UCCNC/UCCNC.exe

Re: Cannot open UCCNC, unhandled exception

PostPosted: Sun Oct 31, 2021 3:20 pm
by dezsoe
This profile is a load of garbage. Maybe, you had 2 instances of UCCNC closed in the same time? Use the copy of your old profile or you can overwrite this with a copy of Contents\Profiletemplate.pro.

Re: Cannot open UCCNC, unhandled exception

PostPosted: Mon Nov 01, 2021 7:33 pm
by Parkgrr
Hey my profile's been called worse things!
Thank you.
I decided to fix this profile by using some software to compare the broken .pro with the profiletemplate.pro mentioned.
I realized what had happened. After updating to the latest version my WCS offsets are not saving on close.
I inserted a exec.Callbutton(527); (save all offsets) into M99999. I'm sure this is what caused this issue.

I removed that Callbutton and am not having .pro issues anymore. Any tips for getting WCS to save on close? Should this still be happening automatically?

Re: Cannot open UCCNC, unhandled exception

PostPosted: Mon Nov 01, 2021 7:40 pm
by dezsoe
Yes, the WCS should and is saved on exit.

Re: Cannot open UCCNC, unhandled exception

PostPosted: Tue Nov 09, 2021 12:30 am
by Parkgrr
Offsets are not saving consistently on close, only about 50% of the time. It just messed up a big and expensive project by not saving the WCS.