Suddenly my app started to crash enormously. I checked Crashlytics report but it doesn't tell me much. This is what it says, hopefully someone could give me a hint if had same/similar problem..
Asked
Active
Viewed 98 times
0
-
Paste the raw crash log. May be then people could help. – Sivakumar S Jan 04 '18 at 08:59
-
1StringIndexOutOfBoundsException -- if the beginIndex is negative, or endIndex is larger than the length of this String object, or beginIndex is larger than endIndex. – Rohit5k2 Jan 04 '18 at 09:00
-
You are trying to get a string from index 0 to -2, which is not possible. Check your logic and fix the end index. – Rohit5k2 Jan 04 '18 at 09:02
-
@Rohit5k2 but how can I detect where it's happening? ..This ServiceInfoImpl class is generic and it can't be modified – user8789149 Jan 04 '18 at 09:04
-
I think @user8789149 knows what is `StringIndexOutOfBoundsException` the problem is that were should the exception be fixed. Such exceptions with ambiguous stack traces happen very often, unfortunately :( – Misha Akopov Jan 04 '18 at 09:12
-
Yep :/ I have like 500 crashes on only 2 users.. – user8789149 Jan 04 '18 at 09:26
1 Answers
1
This seems to be related to a known jmDNS bug that was supposedly fixed a long time ago1:
- https://sourceforge.net/p/jmdns/bugs/101/
- https://sourceforge.net/p/jmdns/mailman/jmdns-discuss/thread/4EA5B242.4070003@gmail.com/
Apparently, the problem is triggered by lookup of malformed DNS names: see last email in discussion thread.
I suggest that you add some diagnostics to your app to find out what name your code is attempting to lookup.
1 - I have my doubts that it was actually fixed ... based on the discussion thread.

Stephen C
- 698,415
- 94
- 811
- 1,216