Posted 2 May 2024, 7:15 am EST
Hi,
For testing I have a simple form with a FlexChart. I receive the following unhandled exception.
System.InvalidCastException: Specified cast is not valid.
at C1.Util.DX.HResult.ThrowException () [0x0000b] in <6c47f93b00ff472aa889e8dbffd89277>:0
at C1.Util.DX.HResult.CheckError () [0x00009] in <6c47f93b00ff472aa889e8dbffd89277>:0
at C1.Util.DX.DXGI.SwapChain.GetBuffer (System.Int32 buffer, System.Guid riid) [0x0002b] in <6c47f93b00ff472aa889e8dbffd89277>:0
at #5ln.#4ln.#Vbg (System.IntPtr #frd) [0x00191] in <f1fad3d92ac849f9b32d5b05d62b4269>:0
at #5ln.#4ln.#3ln (System.Object #ci, System.EventArgs #di) [0x00019] in <f1fad3d92ac849f9b32d5b05d62b4269>:0
at System.Windows.Forms.Control.OnHandleCreated (System.EventArgs e) [0x00277] in <f8ddac92d8e04f8abe177f57ba0387df>:0
at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m) [0x0002c] in <f8ddac92d8e04f8abe177f57ba0387df>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x004ce] in <f8ddac92d8e04f8abe177f57ba0387df>:0
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage (System.Windows.Forms.Message& m) [0x00001] in <f8ddac92d8e04f8abe177f57ba0387df>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x000b3] in <f8ddac92d8e04f8abe177f57ba0387df>:0
at System.Windows.Forms.NativeWindow.Callback (System.Windows.Forms.Message& m) [0x00025] in <f8ddac92d8e04f8abe177f57ba0387df>:0
I am guessing that the #5ln, #4ln and #Vbg are the parameters being passed to the C1.Util.DX.DXGI.SwapChain.GetBuffer() function. I am also guessing that the C1…GetBuffer() is then calling the windows .GetBuffer() function.
I think the windows .GetBuffer() is throwing up the exception.
What is flexChart trying to do when it causes the exception?
Is there a way to debug/show the value of the parameters?
Thank you,