Jump to content
Software FX Community

Negating the minimum value of a twos complement number is invalid - ChartFX-Error


mkvenk

Recommended Posts

Hi

I am using VS.Net 2005 and ChartFX. Our team consits of 3 members. In all the development machines chartFx is working fine and in the Production Server is also working fine. But when ever i take a build on my machine and transfer the build to prod server i face an chartfx error - Negating the minimum value of a twos complement number is invalid. Even in my local system also i face this error. But in rest of my development machines i am not facing this error. Is any thing to do with installation. I have installed VS.Net 2003 and then i installed Vs.Net 2005 and then i installed Chart FX. I have uninstalled Chartfx 2 times and installed again, But no result. Please do help me out. Thanks in advance.

 Please view the error as attachment

Regards

Murali 

 

Link to comment
Share on other sites

This is the log which is logging on my machine.  Hope this helps.

 Date/Time = 29-Jun-2007 03:47:11; Code Source = <br>Offending URL: Source">http://localhost/ITDash/Dialogs/MeasureReportSetControlLimit.aspx?qsMeasureId=7471&qsMeasureReportId=62801&qsIsCustomMeasure=Y&qsControlName1=hdnTargetChanged<br>Source: System.Xml<br>Message: Unable to generate a temporary class (result=1).

error CS0006: Metadata file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\itdashboard\2fba5f6c\1298ba23\App_WebReferences.7atyeibx.dll' could not be found

<br>Stack trace:   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)

at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)

at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)

at System.Web.Services.Protocols.SoapClientType..ctor(Type type)

at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

at com.gsk.sedservice.SEDServices..ctor()

at CommonFunctions.ValidateUserDetails(HttpSessionState pSessionObject, String pLoginUserId)

at ASP.global_asax.Session_Start(Object sender, EventArgs e)

at System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e)

at System.Web.SessionState.SessionStateModule.CompleteAcquireState()

at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)

at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously); Exception: Src = System.Xml; Message = Unable to generate a temporary class (result=1).

error CS0006: Metadata file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\itdashboard\2fba5f6c\1298ba23\App_WebReferences.7atyeibx.dll' could not be found

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

I am also getting this error. I cannot yet produce a code snippet as that code is huge, probably unhelpful for this and above all, protected IP.  A developer should however be able to check the call(s) to Math.Abs in the Axis.a function and check for any possibility that the value passed may be less than (more negative than) Int32.MinValue. In doing so, I suspect that your developer should be able to come up with a use case in which the error is generated. I have faith in your developers, they produce a quality product.

 

StackTrace:

at System.Math.AbsHelper(Int32 value) at System.Math.Abs(Int32 value) at ChartFX.WinForms.Axis.a(Double A_0, Boolean A_1, Boolean A_2, Boolean A_3, Size A_4) at ChartFX.WinForms.Axis.a(aw A_0, Rectangle[] A_1, RepaintFlags& A_2, AxisPaint A_3, AxisSection& A_4) at ChartFX.WinForms.AxisCollection.a(aw A_0, Rectangle[] A_1, AxisPaint A_2) at ChartFX.WinForms.aw.b(Boolean A_0, Boolean A_1) at ChartFX.WinForms.aw.a(IFrame A_0, Int32& A_1) at ChartFX.WinForms.Chart.a(PaintBar A_0, IGraphicsEx A_1) at ChartFX.WinForms.ag.a(PaintEventArgs A_0) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Itron.LoadForecasting.UEM.Program.Main(String[] args) in C:\p4\UEM\LoadForecasting\main\Unbilled\UEM\Program.cs:line 30

 

 

 

Values passed in Axis.a function:ChartFX.WinForms.dll!ChartFX.WinForms.Axis.a(double A_0 = -1.0, bool A_1 = true, bool A_2 = true, bool A_3 = false, System.Drawing.Size A_4 = {Width = 18 Height = 14}) 

Link to comment
Share on other sites

Thank you for the vote of confidence :-) (I am a Chart FX Lead Developer)

Yes we could do this check, but then but do what? The important thing here is WHY this value is int.MinValue (it can never be less!). This is the root of the problem and I rather throw this exception than show say an empty chart which will be harder to figure out why is coming up.

 Without a repro case I can only guess, but it is a pretty good guess. It seems that the Axis is uninitialized, meaning it doesn't have a scale. How can this happen? simple: if you reset the Y-Axis then either don't pass any data or pass data that is all zero (or the Min value) then you end-up with a Y-Axis that has Min = Max or worse, an axis with Min = +Infinity and Max = -Infinity. In any of these cases there is nothing that can be drawn and therefore the exception is thrown.

I give you that if this is the case, we could throw a more meaningful exception but it would an exception nonetheless.

Check your code to see whether you are running into this condition.

Link to comment
Share on other sites

Thank you for the quick reply Frank. This problem does indeed occur when data with only one "empty" value has been passed in. Thank you for that tip.  I have fixed our application to remove that condition. My suggestion is really to do as you have noted: catch the case where the axis is empty and throw a more meaningful exception. One thing to note however is that the error is thrown outside of any of our code. If you check the call stack, you will see that the error is thrown from a paint event.

  ... at ChartFX.WinForms.Chart.a(PaintBar A_0, IGraphicsEx A_1) at ChartFX.WinForms.ag.a(PaintEventArgs A_0) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) ... 

There is little I as a developer can do at that point to handle theerror gracefully. Instead our application halts and must be restarted. Can I suggest that errors that are thrown from the paint event (or similar events such as the validate event) generate an error message that is displayed on the chart itself. In this case a "no data" message would be more than appropriate. Thank you,

-Cody 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...