Welcome, Guest
Username: Password: Remember me

TOPIC: Android ArgumentOutOfRangeException

Android ArgumentOutOfRangeException 3 months 3 weeks ago #2780

  • studenman
  • studenman's Avatar
  • Offline
  • Senior Member
  • Posts: 51
  • Thank you received: 1
  • Karma: 1
Some of our Android users are reporting a crash with I2.Loc. We've only seen it on Android 5.x devices. Not sure if that's related. But here's the exception:

ArgumentOutOfRangeException: Cannot be negative.
Parameter name: length

And the stack:

System.String.Substring (Int32 startIndex, Int32 length)
I2.Loc.LanguageSource.Import_Google_Result (System.String JsonString, eSpreadsheetUpdateMode UpdateMode, Boolean saveInPlayerPrefs)
I2.Loc.LanguageSource.Import_Google_FromCache ()
I2.Loc.LocalizationManager.AddSource (I2.Loc.LanguageSource Source)
I2.Loc.LocalizationManager.RegisterSourceInResources ()
I2.Loc.LocalizationManager.UpdateSources ()
I2.Loc.LocalizationManager.InitializeIfNeeded ()
I2.Loc.LocalizationManager.get_CurrentLanguage ()
I2.Loc.Localize.OnLocalize (Boolean Force)
Last Edit: 3 months 3 weeks ago by studenman.
The administrator has disabled public write access.

Android ArgumentOutOfRangeException 3 months 3 weeks ago #2781

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1081
  • Thank you received: 231
  • Karma: 68
Hi
Do you know if those users are running a version of I2 Localization previous than 2.8.0.
If I remember correctly, in 2.8.0 or 2.8.1 there was a fix for a similar crash.

I will double check the code and run some deeper test, but if they players where using a very old I2 Localization version, then it maybe that bug.

Hope that helps,
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.

Android ArgumentOutOfRangeException 3 months 3 weeks ago #2782

  • studenman
  • studenman's Avatar
  • Offline
  • Senior Member
  • Posts: 51
  • Thank you received: 1
  • Karma: 1
Frank wrote:
Hi
Do you know if those users are running a version of I2 Localization previous than 2.8.0.
If I remember correctly, in 2.8.0 or 2.8.1 there was a fix for a similar crash.

Thanks Frank, that probably is it. I can't confirm which version they are running, but I would guess it's probably 2.8.0 f3. I searched for an Android specific fix in the Release Notes, but couldn't find anything, so good to know it's probably fixed.
The administrator has disabled public write access.
Time to create page: 0.275 seconds
Colors