My client was sometime crashed by IndexOutOfBoundsException:
java.lang.IndexOutOfBoundsException: Invalid index 9, size is 9\n\tat java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)\n\tat java.util.ArrayList.get(ArrayList.java:304)\n\tat sfs2x.client.util.LagMonitor.getLastPingTime(LagMonitor.java:80)
I guess this error is caused by multi-thread. Is this a bug in the Java API client?
IndexOutOfBoundsException in the LagMonitor class
Re: IndexOutOfBoundsException in the LagMonitor class
Hi,
what version of the API are you using?
See the SmartFox.getVersion() method.
If it's not a recent version please make sure to upgrade here:
http://www.smartfoxserver.com/download/sfs2x#p=client
what version of the API are you using?
See the SmartFox.getVersion() method.
If it's not a recent version please make sure to upgrade here:
http://www.smartfoxserver.com/download/sfs2x#p=client
Re: IndexOutOfBoundsException in the LagMonitor class
Smartfox version: 1.3.4
Re: IndexOutOfBoundsException in the LagMonitor class
What server version are you running?
Any ways in which we could try and reproduce the problem?
Can you show me your code for enabling the LagMonitor?
thanks
Any ways in which we could try and reproduce the problem?
Can you show me your code for enabling the LagMonitor?
thanks
Re: IndexOutOfBoundsException in the LagMonitor class
I enabled the LagMonitor after login successful:
My client has already released to end user. In my client (android), I have implemented a method to send a mail to developer when the client was crashed. These days, I receive a lot of mails about this error. But I can't reproduce this error when I try test.
Code: Select all
private void onLogin(BaseEvent event) {
_sfsClient.enableLagMonitor(Config.LAG_MONITOR);
.............
}
My client has already released to end user. In my client (android), I have implemented a method to send a mail to developer when the client was crashed. These days, I receive a lot of mails about this error. But I can't reproduce this error when I try test.
Re: IndexOutOfBoundsException in the LagMonitor class
Neither can I.
In any case we'll take a closer look and see if we can release a quick patch for you to try.
I'll post an update here as soon as possible.
Cheers
In any case we'll take a closer look and see if we can release a quick patch for you to try.
I'll post an update here as soon as possible.
Cheers
Re: IndexOutOfBoundsException in the LagMonitor class
UPDATE: I think it is an issue with internal synchronization, hence the difficulty in reproducing the issue on command.
We have fixed the issue.
It would be great if you could test the update and tell us if the problem has been removed.
If you want to do so, contact us directly by sending an email to our support@... email box, with a reference to this forum thread.
Hope it helps
We have fixed the issue.
It would be great if you could test the update and tell us if the problem has been removed.
If you want to do so, contact us directly by sending an email to our support@... email box, with a reference to this forum thread.
Hope it helps
Re: IndexOutOfBoundsException in the LagMonitor class
Has this bug been fixed in the new version? When a new version is released?
In this time, I use try catch block to prevent this error. Thanks
In this time, I use try catch block to prevent this error. Thanks
Re: IndexOutOfBoundsException in the LagMonitor class
Did you read my previous message?
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 31 guests