i was able to cause this:
"[Java.lang.string"
to be embedded in a string that i piece together in my app. no error thrown, nothing appeared in the log.
i'm wondering if anyone can think of some reason - just off the top of their head - how this could
occur. in the old days i would start thinking about a buffer or stack overflow. but between the basic
wrapper and underlying native calls, i wouldn't even know where to begin. it starts with a "[" the "J" was definitely capital; i can't swear the "s" in string was lower case. no closing "]"
at first i thought it was an anomaly with the emulator, but i was able to make it occur again with the
same input. at the time, some other issues were more important, so i let it slide.
in the app, a user inputs a search term. the app tries to find it in a database. if it can't find an exact match, it follows a series of rules to massage the search term, either by breaking it up into chunks and/or searching for similar terms. at the end - regardless of success, if any - it pieces what it found back together and displays the result, as a string.
so, if the result, after massaging and breaking up and piecing back together is supposed to be:
"foo" & " " & "bar",
what i see on the screen, under very specific circumstances which i cannot for the moment duplicate, would be "foo [Java.lang.string bar". the app then continues as if nothing occurred.
it only occurs with a long search term (7-8 words) and if one or more terms requires some kind of massage for a match. searches for up to 5 words in the term can be handled without this occurring (after 1000's of searches), with or without massaging. exactly which rule, if any, might cause the problem, i can't say at this time. i've started some scaffolding to see if i can spot where something might be occurring.
in any case, i wanted to ask if anyone has ever seen such output (with no error or log message thrown by the system) or, based on any android memory management expertise, how such a string might magically insert itself into my basic string. the only compiler warnings i see relate to unused variables. thanks.
"[Java.lang.string"
to be embedded in a string that i piece together in my app. no error thrown, nothing appeared in the log.
i'm wondering if anyone can think of some reason - just off the top of their head - how this could
occur. in the old days i would start thinking about a buffer or stack overflow. but between the basic
wrapper and underlying native calls, i wouldn't even know where to begin. it starts with a "[" the "J" was definitely capital; i can't swear the "s" in string was lower case. no closing "]"
at first i thought it was an anomaly with the emulator, but i was able to make it occur again with the
same input. at the time, some other issues were more important, so i let it slide.
in the app, a user inputs a search term. the app tries to find it in a database. if it can't find an exact match, it follows a series of rules to massage the search term, either by breaking it up into chunks and/or searching for similar terms. at the end - regardless of success, if any - it pieces what it found back together and displays the result, as a string.
so, if the result, after massaging and breaking up and piecing back together is supposed to be:
"foo" & " " & "bar",
what i see on the screen, under very specific circumstances which i cannot for the moment duplicate, would be "foo [Java.lang.string bar". the app then continues as if nothing occurred.
it only occurs with a long search term (7-8 words) and if one or more terms requires some kind of massage for a match. searches for up to 5 words in the term can be handled without this occurring (after 1000's of searches), with or without massaging. exactly which rule, if any, might cause the problem, i can't say at this time. i've started some scaffolding to see if i can spot where something might be occurring.
in any case, i wanted to ask if anyone has ever seen such output (with no error or log message thrown by the system) or, based on any android memory management expertise, how such a string might magically insert itself into my basic string. the only compiler warnings i see relate to unused variables. thanks.