PardeeCenterDU / IFs-Issues-Tracking

This repository only holds the list of bugs that have been reported for IFs. Anyone may add a bug report, but please look to see if your issue has already been added!
2 stars 0 forks source link

Crashing When Using "Display Options -> Percent" #232

Open caleb-petry opened 1 year ago

caleb-petry commented 1 year ago

Crash When Using "Display Options -> Percent"

Date: 2023/01/11 Version: 7.92 .Net Development - Rebased to 1995 Branch: Threat Found by: Caleb Petry Error Type: Blowup

Model crashes when any other option is selected after turning on "Percent" in "Display Options" in the Flex Display. Does not seem to occur with all variables at all times; "Capital Stock - Billion dollars" seems to occur the most consistently.

image The following error occurred:Exception of type 'System.Web.HttpUnhandledException' was thrown.System.InvalidCastException: Conversion from string "" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format.at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) --- End of inner exception stack trace ---at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)at Microsoft.VisualBasic.CompilerServices.Operators.CompareObject2(Object Left, Object Right, Boolean TextCompare)at Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectGreaterEqual(Object Left, Object Right, Boolean TextCompare)at IFsWeb.frm_TableDisplay.Convert_Billions_To_Trillions() in C:\Users\Public\IFs\IFsWeb\frm_TableDisplay.aspx.vb:line 10883at IFsWeb.frm_TableDisplay.frm_TableDisplay_Load(Object eventSender, EventArgs eventArgs) in C:\Users\Public\IFs\IFsWeb\frm_TableDisplay.aspx.vb:line 1896at System.Web.UI.Control.OnLoad(EventArgs e)at System.Web.UI.Control.LoadRecursive()at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

PardeeCenterIFs commented 1 year ago

Using the 2017 base, I loaded this list with the default options, since you don't mention anything, so that's Afghanistan, Agriculture, go to Table, change to Percentage, and it works fine.

The error mentions the Convert_Billions_To_Trillions functions which indicates big values, so I tried it again with World, and Total, and work fine again.

Can you send an image that includes the table before the error.

caleb-petry commented 1 year ago

Of course, here is the table right before the error. From here, actions such as turning off the percent option cause the initial error message.

image

PardeeCenterIFs commented 1 year ago

It looks like you're using History plus Forecast, right? Not plainly "Capital Stock - Billion dollars"

caleb-petry commented 1 year ago

That is due to another issue #233, though I could see how they might be related.

caleb-petry commented 1 year ago

This one still occurs sometimes with 7.93's GUI, but overall is more stable now.

It seems to occur more often when the model has been used for a while.