YAFLogo

shide
  • shide
  • 80.6% (Honored)
  • YAF Lover Topic Starter
8 years ago
Hi guys,

Here's an error i get when i go to the Host admin section.

Code seems to crash on that code (YAF.Pages.Admin.hostsettings.BindData) :



this.AppMemory.Text = "{0} MB of {1} MB".FormatWith(Platform.AllocatedMemory.ToType<int>() / 1000000,
                                                                Platform.MappedMemory.ToType<int>() / 1000000);
Since our website is using around 2,8Go of allocated memory i think that's where the problem comes from.

I've changed the type from "int" to "Int64" and it fixed the issue for us.

Cheers ! 😎

More Info :

Server Error in '/' Application.

Value was either too large or too small for an Int32.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.OverflowException: Value was either too large or too small for an Int32.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[OverflowException: Value was either too large or too small for an Int32.]
   System.Convert.ToInt32(Int64 value) +12569342
   System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +435
   YAF.Types.Extensions.ObjectExtensions.ToType(Object instance) +515
   YAF.Pages.Admin.hostsettings.BindData() +2911
   YAF.Pages.Admin.hostsettings.Page_Load(Object sender, EventArgs e) +536
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
8 years ago
Thanks, will be fixed in 2.1.2
shide
  • shide
  • 80.6% (Honored)
  • YAF Lover Topic Starter
8 years ago
btw, i found out how to make pull requests. Will do this in the future.