Community Question

Anyone else getting this error when trying to save to the EZ-Cloud App Store ?
This just started to happening. I have been able to save in the past.

Thank you Rich

Version: 2018.05.01.00

System.NullReferenceException: Object reference not set to an instance of an object.
at EZ_Builder.UCForms.FormCameraDevice.GetConfiguration()
at EZ_Builder.UCForms.FormMaster.get_ConfigurationForm()
at EZ_Builder.FormMain.z1HXSaOIKq()
at EZ_Builder.FormMain.jGMXdLptVn()
at EZ_Builder.FormMain.SSK5Dl5wsq(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.RibbonItem.OnClick(EventArgs e)
at System.Windows.Forms.RibbonButton.OnClick(EventArgs e)
at System.Windows.Forms.RibbonMouseSensor.Control_MouseClick(Object sender, MouseEventArgs e)
at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseClick(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Ribbon.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)
Commented July 11

If it helps.


The error occurs when you open the project:
User-inserted image


Error Setting Camera Configuration: System.ArgumentOutOfRangeException: Value of '0' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
Parameter name: Value
at System.Windows.Forms.TrackBar.set_Value(Int32 value)
at EZ_Builder.UCForms.FormCameraDevice.SetConfiguration(ConfigurationFormV2 cf)

So there is no code i.e. script execution must be something on the file.

Can't be a generic corruption, otherwise the Project content i.e. XML can't be correctly loaded/parsed.



Error Setting Camera Configuration:

Is related to the camera control



System.Windows.Forms.TrackBar.set_Value(Int32 value)

Ez-builder is trying to assign a value to an UI component i.e. TrackBar



System.ArgumentOutOfRangeException: Value of '0' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.

The invalid value is a "0" and is not between a Minimum and Maximum. Maybe the minimum is more than zero, maybe a "1" ?

I opened the your project with a text editor, and i copied the camera code to another file.


.... (xml removed for brevity)

Then i searched for a zero value parameter (constrained to the camera settings content file): ">0< "
User-inserted image

we are looking for a TrackBar UI component: CameraImageBrigtness and GridTransparency match our search.

The next step: discover the minimum values, so i created a new project with a camera control with all the trackbars set to the minimum value, then isolated the camera settings to a file, search for zero parameter again.

User-inserted image

As you can see both are not there:

minimum values:

So using "Sherlock Holmes" deduction method: i assumed the zero is between CameraImageBrightness (-150;150) and GridTransparency has an invalid value.

Changing the original project to "1" fixes the load and as consequence the save process. Save requests Camera control's get configuration and during the execution tries to set the trackbar again with zero failing to save, but the problem is already seen during the initial load.

The next question: Why is broken ?

If you didn't change the value by hand... my guess is: zero is the default value for an integer, EZ-builder code during the save/Serialization process allowed the zero to go through to the file, and after that the camera settings became invalid.

It's only a guess... DJ has access to the code :) maybe he can find a better explanation.

Commented July 11

That explanation was great, that was what I was hoping for. As I have been a programmer for 6 years and now doing Powershell and VBScript it makes sense. Also thank you for letting me know that we can open the project in a text or other editor (Visual Studio, Notepad++) I will look at that along the way now. So that we I make major changes to something else in the code I can verify these and other settings.

I do remember turning the grid off/on several times during the project length. I might have adjusted the camera brightness once. It is hard to remember doing that one. Could these setting have changed when I went from Direct network connection to WIFI ? If you noticed that the connect blue button is at a address and Video Device is at Thought that this box should match the current IP scheme. The 192.168 is my WIFI address, and the 10.0 is when the EZB connected directly to my home network.

I loaded the fixed version here in my office on a laptop with a freshly installed EZ-builder and It let me save to the Cloud and directly on the laptop. The bigger test is when I get home and have it hooked up the the EZB controller and camera. I will keep up to date with everyone on that tonight.

@Richard R
I did what you did by taking out the camera control and putting it back into the project. However now I can't connect to the EZB using my WIFI connection. I am going to work on this some more tonight. I am not sure if I was to tired or just frustrated with the whole thing to see the real picture. That is why I am going to work on it more tonight. I connected the WIFI from EZB to my laptop first then tried to connect using ezbuilder. It would always error out and never connect. the only thing that I didn't do was reboot the laptop several times. I re-connected about 6 times and no luck.

Thank you for your assistance.
Commented July 11
I have good news the issue is resolved.

@Richard R
Your fix of removing the camera app and added it back would fix the issue. The not connecting issue was an IP address conflict between Spectrum and EZB. Both are using the IP address. Anyway I have resolved that IP address conflict and the camera is working and I can save to the cloud and locally.

Your fix by removing the zero within the camera code also fixed the issue. I had to adjust the video device box IP to match what I was using for the connection button box string. To get the camera working again.

@Richard fix was the quick fix for the issue. @PTP was more of a programmers fix for the issue. Since DJ is involved I am glad for the programmer fix. Both fixes will help others in the long run.

I hope that DJ has an answer as to what might have happened to cause this. Waiting to hear from you DJ.

I want to thank @DJ, @Richard and @PTP for help in resolving this issue. It is a good feeling that there are other that are will to jump in and help.
Commented July 18
UPDATE: Last night I received the camera error again last night when trying to save my project to local disk. I simply removed the camera device app and I was able to save as normal. I then saved to the cloud also. I thought that is was very odd to see this error again. I will report any other errors that I received related to the camera.

I have installed a fresh copy of EZ-Builder. I installed that just a few days ago. I also renamed my project to shorten its name.

@DJ, is there an issues with the path name and file name being longer that 256 characters total ? Microsoft had/has that limitation. I know it was a limitation with Windows 7 and Windows Server 2008. The reason that I mention this is I am sure that I am very close to this limitation with my path name where my project is located.

Just try to think out loud and use the 30 plus year experience within the IT Technology field.
DJ Sures
Commented July 18
I'm watching this thread - still unsure how these values happened. I'm wondering if a controlcommand() changed a value outside the range.
Asked on Saturday, June 30, 2018