Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by d_wayne1 · Feb 17, 2019 at 01:56 AM · errorwebglruntime

Puzzling rare exception in WebGL: ArgumentOutOfRangeException

I have a fairly simple 2-D WebGL game that uses scripting to control game elements. The game has run well for the last year during development and testing - maybe a total of 600 runs.

On several very rare occasions, in our WebGL build, we get seemingly random ArgumentOutOfRangeExceptions. This has occurred 4 times that we know of out of the approximately 500 runs.

It has been impossible to identify the cause because it occurs so infrequently. We have not been able to reproduce this issue on development WebGL builds and the exception has never occurred in the Unity Editor.

We are currently running 2018.2.20f1 and we have experienced this issue as we updated across various 2017-2018 Unity versions.

Here is the exception that is displayed in the browser console:


UnityLoader.js:4 ArgumentOutOfRangeException: Argument is out of range. UnityLoader.js:4 Parameter name: index UnityLoader.js:4 at System.Collections.Generic.List`1[System.Int32].get_Item (Int32 index) [0x00000] in :0 UnityLoader.js:4
UnityLoader.js:4 (Filename: currently not available on il2cpp Line: -1) UnityLoader.js:4


Has anyone experienced this?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image zereda-games · Feb 17, 2019 at 04:42 AM 0
Share

hmm interesting, Usually that error comes up when an int or float value is below or above the constant set values.

Below if i use this method with a slider it's values cannot extend the preset values 0-1 if so you get an exception error. i'd check All of your value changers, and see if in the inspector if their values don't match your script aka if i had my slider be able to go -0.01 $$anonymous$$ and 1.01 max then i'd get this error every time i have the slider at the lowest value and the highest value. if i had the slider set to 0.0001 $$anonymous$$ and 0.9999 max then i'd never get the error. if you have it go to 1 or 0 sometimes you get this weird bug where is will call the exception 1/100 times or so.

     public static void Set$$anonymous$$asterVolume (float value)
     {
         if (value >= 0f && value <= 1f) {
             SetFloat ($$anonymous$$asterSFXVolumeSave$$anonymous$$ey, value);
         } else {
             Debug.LogException (new System.Exception ("SFX volume slider out of range. Set slider between 0 and 1 and Not whole numbers."));
         }
     }
avatar image zereda-games zereda-games · Feb 17, 2019 at 04:45 AM 0
Share

if you are using whole numbers: make sure the slider is set to whole number as well

avatar image zereda-games · Feb 17, 2019 at 04:51 AM 0
Share

are You able to replicate it on a build? on the web GL? if so figure out when exactly it happens. Is it the same instance each time aka are you tying to do the same thing each time the error comes up? and if so, what is it that is causing the error. further more in the editor you can use the attribute

 [SelectionBase]

Above your class' to be able to select the actual GameObject with the script and not just it parent when clicking on an object in the scene view. sure is a confusing bug to say the least though. hope you can get 'r figured.

avatar image d_wayne1 · Feb 21, 2019 at 01:11 PM 0
Share

Thank you @zereda-games for your replies.

The exception is not related to a slider or control - it only occurs on the WebGL build so I cannot get a line number. There are actually 7 very similar games that use shared infrastructure. The error has occurred on different games and occurs right after the games load.

I setup some additional automated testing to try to simulate 100's of game loads on the WebGL build but I cannot reproduce it.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

201 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WebGL Build doesn't fully load on Github Pages 0 Answers

Base64 to texture decoding, js -> webgl 1 Answer

[WebGL 2.0] Texture2DArray support? 1 Answer

"Unable to decode audio data" in webgl build 0 Answers

Build WEBGL Error in Unity 2019.3.3f1 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges