c1RibbonForm: Parameter is not valid

Posted by: daniel.banks on 31 July 2018, 7:47 pm EST

    • Post Options:
    • Link

    Posted 31 July 2018, 7:47 pm EST

    I have attached a sample program that reproduces the problem we are having. Just double click on the screen to open a form and you should get the error.

    The software is running on Windows 2008 R2 Standard Service Pack 2.

    The resulting exception details is below:

    ************** Exception Text **************

    System.ArgumentException: Parameter is not valid.

    at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)

    at C1.Win.C1Ribbon.C1RibbonForm.a(IntPtr A_0)

    at C1.Win.C1Ribbon.C1RibbonForm.m(Message& A_0)

    at C1.Win.C1Ribbon.C1RibbonForm.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)

    ************** Loaded Assemblies **************

    mscorlib

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.18444 built by: FX451RTMGDR

    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

    ExceptionDemo

    Assembly Version: 1.0.0.0

    Win32 Version: 1.0.0.0

    CodeBase: file:///C:/Program%20Files%20(x86)/Default%20Company%20Name/Setup2/ExceptionDemo.exe

    Microsoft.VisualBasic

    Assembly Version: 10.0.0.0

    Win32 Version: 11.0.50938.18408 built by: FX451RTMGREL

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

    System

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

    System.Core

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

    System.Windows.Forms

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

    System.Drawing

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

    System.Runtime.Remoting

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

    C1.Win.C1Ribbon.4

    Assembly Version: 4.0.20181.307

    Win32 Version: 4.0.20181.307

    CodeBase: file:///C:/Program%20Files%20(x86)/Default%20Company%20Name/Setup2/C1.Win.C1Ribbon.4.DLL

    System.Configuration

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

    System.Xml

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

    C1.Win.4

    Assembly Version: 4.0.20181.307

    Win32 Version: 4.0.20181.307

    CodeBase: file:///C:/Program%20Files%20(x86)/Default%20Company%20Name/Setup2/C1.Win.4.DLL

    Accessibility

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

    ************** JIT Debugging **************

    To enable just-in-time (JIT) debugging, the .config file for this

    application or computer (machine.config) must have the

    jitDebugging value set in the system.windows.forms section.

    The application must also be compiled with debugging

    enabled.

    ExceptionDemo010818.zip

  • Posted 1 August 2018, 7:49 pm EST

    Hello,

    Could you please check with latest build. Please down the latest build from the following link:

    http://prerelease.componentone.com/dotnet40/c1winforms/2018-t2/C1WinForms.4_4.0.20182.314.zip

    Thanks

  • Posted 13 August 2018, 12:11 am EST

    Not answered…

    New RibbonForm version makes no difference… Still get

    System.ArgumentException: Parameter is not valid.

    at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)

    at C1.Win.C1Ribbon.C1RibbonForm.a(IntPtr A_0)

    at C1.Win.C1Ribbon.C1RibbonForm.m(Message& A_0)

    at C1.Win.C1Ribbon.C1RibbonForm.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)

  • Posted 13 August 2018, 4:32 pm EST

    Hi Daniel!

    Following is sequence of steps that were performed at my end:

    1. Ran your sample application. ‘Except’ screen appears.
    2. Double click on this screen. And then, RibbonForm1 appears.

    As per observations at your end, RibbonForm1 should not have been appeared. And ArgumentException should be thrown, stating ‘Parameter is not valid’. Right?

    Since I was not able to see this problem at my end, please confirm if I am missing any step.

    Also, let me know your VS version so that I can further investigate this issue.

    Regards,

    Meenakshi

  • Posted 13 August 2018, 6:50 pm EST

    Yep that is correct, it doesn’t do this on EVERY machine just on enough for it to be problem, and on these machines it happens every time

    .

    Visual Studio version is 12.0.40629.00 Update 5

    Thanks

    Danny

  • Posted 16 August 2018, 8:57 pm EST - Updated 3 October 2022, 4:58 pm EST

    Hello,

    Sorry to mention that I am not able to replicate the issue with “12.0.40629.00” version of visual studio. Please refer to the attached image.

    Environment Detail :

    OS: Windows 7 Service Pack 1 64 Bit

    RAM: 3 GB

    Processor: Intel(R) Core™ i7-3770 CPU @3.40GHz 3.39 GHz

    Application FW: 4.5

    C1 Version: 4.0.20181.307

    VS Version: 12.0.40629.00

    Could you please share your environment detail

    Thanks,

  • Posted 28 August 2018, 1:21 am EST

    The screen shot is from the machine running the software with the error.

    Capture is the copy of the setup for the build machine (which doesn’t get the error).

    D

  • Posted 28 August 2018, 1:21 am EST - Updated 3 October 2022, 4:58 pm EST

  • Posted 29 August 2018, 12:12 am EST

    Hello,

    I am creating the environment which takes some time and will update you once I have tested on the new environment.

    Sorry for the inconvenience caused to you.

    Thanks,

  • Posted 29 August 2018, 9:53 pm EST - Updated 3 October 2022, 4:58 pm EST

    Hello Daniel,

    I am unable to reproduce the error in the same environment. Please refer to the attached image. However, I have escalated the issue to our development team and will inform you once I get any information from them.

    Thanks,

  • Posted 9 September 2018, 9:15 pm EST

    Doing some research on this myself, I found

    https://stackoverflow.com/questions/14099246/system-drawing-parameter-is-not-valid

    Which for someone else states

    The problem was that, due to the way I load the actual images into memory, the images weren’t being given enough time to fully load in most of my tests. The ones that succeeded were the ones that allowed enough time for the images to load.

    And also

    I found also this trying to look for answers. be aware that it can also throw the exception when:

    stream contains a PNG image file with a single dimension greater than 65,535 pixels.

    I don’t know if it is either of these issues that your compenet doesn’t seem to be handling but thought I’d help your developers out with what I found.

  • Posted 9 September 2018, 9:21 pm EST

    It would appear to be quiet a common Microsoft problem that other developers seem to have addressed for their products. Hope you can find the solution soon.

  • Posted 11 September 2018, 11:19 pm EST

    Hello,

    Thanks for the information.

    I have forwarded your information to our development team.

    Thanks,

  • Posted 7 October 2018, 8:08 pm EST

    Any news \ development on this?

    D

  • Posted 10 October 2018, 12:02 am EST

    Hello,

    The issue may be fixed in our next release ie 2018 v3.

    thanks,

  • Posted 23 October 2018, 9:27 pm EST

    What is the ETA on this release?

    Thanks

    Daniel

  • Posted 25 October 2018, 8:29 pm EST

    Hello,

    The ETA for the next major release is around last week of the Nov or the first week of Dec.

    Thanks.

  • Posted 14 November 2018, 4:02 pm EST

    Hi Daniel,

    We are happy to inform you that the error “Parameter is not valid” does not occur any more.

    In order to verify the fix, please upgrade your ComponentOne version either using C1Live or downloading the latest builds from: http://prerelease.componentone.com/dotnet40/c1winforms/2018-t3/C1WinForms.4_4.0.20183.338.zip

    Please do feel free to let me know if you face any issues.

    Best wishes,

    Ruchir

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels