HI ROMAIN, you were right. I had too many layers. When I reduced down, no more stack overflow exceptions on certain character inputs and NO MORE BREAKING MY APP YAY!!!!!!!!!
It would be nice if the layout editor in the android sdk could somehow warn the developer if he is using too many layers, but I know that would be difficult to do and kinda silly. Nah, let people find out the hard way like me lol On Sep 3, 8:34 am, Romain Guy <romain...@google.com> wrote: > TextView cannot be "hacked." The problem is that you have too many > layers of ViewGroups in your UI. By using specific characters you are > causing TextView to take another code path, usually not taken, that > happens to go right over the edge of the stack size. > > Use fewer views, that's all. > > On Thu, Sep 3, 2009 at 7:44 AM, kevikev2020<kkaw...@gmail.com> wrote: > > > Thanks ROMAIN, but I need to clarify the problem: What I am trying to > > say is there is a HACKER on my chat app who is able to send out a > > certain sequence of characters (it's like 2 unicode characters, but > > I'm not sure which ones), and it causes all these layers to explode > > out and causes the stack overflow. > > > I have personally witnessed him do it. For example, there will be > > like 10 ppl in the chat room all normally chatting away and my app is > > working perfectly fine. Then, this hacker says to the room, OK > > EVERYONE I AM GOING TO CAUSE FORCE CLOSE.. WATCH HAHHAHA. Then, all > > of a sudden, the screen goes blank and FORCE CLOSES. I have a limit > > on the # of characters you can post to the room, so it's NOT like he's > > posting a huge text string that Android can't handle. > > > The core of my chat app consists of a ListView using your efficient > > adapter concept. So, what I am trying to say is your TextView can be > > hacked by certain sequence of unicode characters and it causes too > > many layers to explode out and causes a stack overflow. There is some > > hole in the TextView, Romain. In fact I was on again this morning and > > this hacker, goes by the name of KING_BOU did it again. And everyone > > in the room gets upset at him and he loves attention and laughs. Like > > he feels some sort of personal power or gratification. I have his > > deviceid so we can track him down... smh @ his hax.... > > > OH, ONE LAST IMPORTANT NOTE: IF I CONVERT ALL POSTS FROM UNICODE TO > > ASCII, THIS PROBLEM NEVER HAPPENS!! BUT MY USERS LOVE THEIR SYMBOLS > > SO I CANNOT TAKE THAT AWAY FROM THEM. IM SO UPSET ABOUT ALL THIS. > > PLEASE HELP IF YOU CAN. HAS SOMETHING TO DO WITH TextView draw with > > certain UNICODES. THANK YOU!!! > > > On Sep 2, 3:18 pm, Romain Guy <romain...@google.com> wrote: > >> Yes, you have too many layers. You should check in HiearchyViewer. > > >> On Wed, Sep 2, 2009 at 2:18 PM, kevikev2020<kkaw...@gmail.com> wrote: > > >> > Hi, I DO NOT HAVE TOO MANY LAYERS, THIS STACK OVERFLOW EXCEPTION ONLY > >> > OCCURS WHEN A CERTAIN UNICODE CHARACTER SEQUENCE COME TO THE > >> > LISTVIEW. THIS BUG IS KILLING ME BECAUSE I CANNOT PUT A TRY/CATCH > >> > AROUND IT ANYWHERE IN MY CODE: > > >> > I DO NOT KNOW WHAT THAT SEQUENCE IS, BUT I DO KNOW IT"S A CERTAIN > >> > SMILEY FACE + ANOTHER CHARACTER THAT CAUSES IT, I AM CERTAIN IT'S NOT > >> > BECAUSE I HAVE TOO MANY VIEWS. IF SOMEBODY KNOWS THE WORK-AROUND, OR > >> > ANY WAY IT CAN BE TRAPPED, PLEASE LET ME KNOW THANK YOU! > > >> > 09-02 21:04:27.101: ERROR/AndroidRuntime(916): Uncaught handler: > >> > thread main exiting due to uncaught exception > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): > >> > java.lang.StackOverflowError > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > java.lang.String.getChars(String.java:992) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.text.TextUtils.getChars(TextUtils.java:63) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.text.Layout.drawText(Layout.java:1352) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.text.Layout.draw(Layout.java:339) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.TextView.onDraw(TextView.java:3921) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.View.draw(View.java:5838) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1486) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.ListView.dispatchDraw(ListView.java:2820) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.View.draw(View.java:5944) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.AbsListView.draw(AbsListView.java:2121) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1486) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.View.draw(View.java:5841) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1486) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.View.draw(View.java:5841) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.FrameLayout.draw(FrameLayout.java:352) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1486) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1484) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.View.draw(View.java:5841) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.FrameLayout.draw(FrameLayout.java:352) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.drawChild(ViewGroup.java:1486) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.View.draw(View.java:5841) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.widget.FrameLayout.draw(FrameLayout.java:352) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > com.android.internal.policy.impl.PhoneWindow$DecorView.draw > >> > (PhoneWindow.java:1847) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewRoot.draw(ViewRoot.java:1217) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewRoot.performTraversals(ViewRoot.java:1030) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.view.ViewRoot.handleMessage(ViewRoot.java:1482) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.os.Handler.dispatchMessage(Handler.java:99) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.os.Looper.loop(Looper.java:123) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > android.app.ActivityThread.main(ActivityThread.java:3948) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > java.lang.reflect.Method.invokeNative(Native Method) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > java.lang.reflect.Method.invoke(Method.java:521) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > >> > (ZygoteInit.java:782) > >> > 09-02 21:04:27.200: ERROR/AndroidRuntime(916): at > >> > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) > >> > 09-02 21:04:27.200: > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---