Page 1 of 1

ERROR:ArgumentOutOfRangeException: Argument is out of range.

Posted: Tue Apr 04, 2017 10:19 am
by ironmanman
HI! I am new here! Nice to meet you guys!

I am just a beginner! Today I just run the Examples scenes. The scenes played well. But I found there is always an Error in the Console:

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEditor.EditorWindow].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
UnityEditor.DockArea.OnEnable () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:99)

Is this fatal? How can I solve the error? Or just leave it ?

Thank you!

Re: ERROR:ArgumentOutOfRangeException: Argument is out of range.

Posted: Tue Apr 04, 2017 10:25 am
by Tony Li
Hi,

Thanks for using the Dialogue System!

Does this error also appear in a new project that only contains the Dialogue System?

If so, please reply with this information:

- Unity version
- Dialogue System version
- Scene played
- Were any Dialogue System windows open when playing the scene, such as the Dialogue Editor window?

Re: ERROR:ArgumentOutOfRangeException: Argument is out of range.

Posted: Tue Apr 04, 2017 10:42 am
by ironmanman
Hi! Tony!

Thank you for your reply!

Just now I just rebooted my Unity and played the project again! The error is gone! So weird!

There is no errow anyway! Thank you! :lol:

Re: ERROR:ArgumentOutOfRangeException: Argument is out of range.

Posted: Tue Apr 04, 2017 10:54 am
by Tony Li
Hi! Thanks for letting me know! If the error pops up again, please just let me know the info above.

Re: ERROR:ArgumentOutOfRangeException: Argument is out of range.

Posted: Mon Jun 29, 2020 7:09 am
by warnerjonn
The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method. Indexing an empty list will always throw an exception. Use a method like Add to append the item to the end of the list, or Insert to place the item in the middle of the list somewhere, etc. You cannot index into a list if that offset doesn't exist.

Typically, an ArgumentOutOfRangeException results from developer error. Instead of handling the exception in a try/catch block, you should eliminate the cause of the exception or, if the argument is returned by a method call or input by the user before being passed to the method that throws the exception, you should validate arguments before passing them to the method.

Re: ERROR:ArgumentOutOfRangeException: Argument is out of range.

Posted: Mon Jun 29, 2020 7:54 am
by Tony Li
^ I'm not sure if the message above is spam or not, so I approved it. Anyway, it's probably not entirely related to the original poster's question. Again, if the problem recurs, please let me know.