Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5993307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:39:23+00:00 2026-05-22T23:39:23+00:00

During a process that I have firing off during a e3roid scene population on

  • 0

During a process that I have firing off during a e3roid scene population on the android I keep coming across exceptions that I want to completely trap. Perhaps I need to create a back exception tracker that i can transverse through at my leisure instead of an immediate dialogue that takes away a user experience.

W/dalvikvm( 9540): threadid=1: thread exiting with uncaught exception (group=0x2
aac87c8)
E/AndroidRuntime( 9540): FATAL EXCEPTION: main
E/AndroidRuntime( 9540): java.util.ConcurrentModificationException
E/AndroidRuntime( 9540):        at java.util.ArrayList$ArrayListIterator.next(Ar
rayList.java:573)

the whole app dies with an exception dialogue.. I would love to be able to trap the ConcurrentModificationException from a global scope so that if such a event happens due to unknown circumstances the whole app does not get disposed..

** EDIT **

during this block getting fired off during a onSceneTouchEvent

try {


        postUpdate(new AddShapeImpl(scene, onX, onY));

    } finally {

    }

seems I am firing off the block too fast I think. I need to slow things down.

* Follow Up *

I seemed to of solved the problem.. I did one of these…

if (    ballspawning == false)

                    try {
                        Log.v(DEBUG_TAG, "onSceneTouchEvent 1-1");  


                        addnewball(scene, onX, onY);



                        Log.v(DEBUG_TAG, "onSceneTouchEvent 1-2");
                    } finally {


                    }

you will see that after I put in a ballspawning boolean flag and a secondary procedure that I pass my spawning values was so golden… i made it a field and it gets set at the end of my iteration and checked before the transverse of the list happens.. whoo hoo!! soo sweet!

no real need for global trapping.. just good old debugging. but I still would love to implement the global handler of all errors. TODO

I have erupted the concurrent error again..

screenshots

Debug Msgs

Another Occurrence

  • Follow Up 2 *
    Another One

screen shot 4

almost narrowing down culprit

I tried to catch the ConcurrentModificationException with a

 void uncaughtException(Thread t,
            Throwable e){

     Log.v(DEBUG_TAG, "uncaughtException **********");
     Log.v(DEBUG_TAG,"thread " + t + "    Throwable" +  e.toString());      
    }

as you can see in the last screenshot that the above method never gets called.

The ConcurrentModificationException crashs the app to a exception dialogue..

** Follow up **

I have added

public class LauncherActivity extends E3Activity implements UncaughtExceptionHandler ,FPSListener,SceneUpdateListener 

and during runtime the extra Unimplimented Method

@Override
public void uncaughtException(Thread t,Throwable e) {   

    Log.v(DEBUG_TAG, "uncaughtException **************");
     Log.v(DEBUG_TAG,"thread " + t + "    Throwable" +  e.toString());  


}

and still no exception trapping…

I also added

newThread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler(){

            @Override
            public void uncaughtException(Thread t, Throwable e) {

                Log.v(DEBUG_TAG,"***************   ERROR! An exception occurred in " + t.getName() + ". Cause: " + e.getMessage());
            }
            });

        newThread.start();

and no still no trapping…

ahhh

WHoo hoo!!

Just caught the exception!! check out the screen shot… you will see the !!!!!!

http://img17.imageshack.us/img17/135/concurrentmodificatione.png

Caught Exception

Thx all that made me work hard at getting to the bottom of java exception handling!!

Excellent Resource

I trapped the Concurrent problem by

removing the…

public class LauncherActivity extends E3Activity implements UncaughtExceptionHandler ,FPSListener,SceneUpdateListener

that I had to original… with no UncaughtExceptionHandler implementation

and added a class that was greatly detailed by Johnny Lee. blog.dimond.de/?p=63

Sweet stuff really.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:39:24+00:00Added an answer on May 22, 2026 at 11:39 pm

    Use Thread.setUncaughtExceptionHandler:

    It takes an Thread.UncaughtExceptionHandler as argument which is an interface of one method: uncaughtException(Thread t, Throwable e).

    From the documentation:

    Set the handler invoked when this thread abruptly terminates due to an uncaught exception.

    Needless to say however, you’re obviously better of fixing the exceptions at their sources. 😉 I do however use this construct my self for sending error reports in case of unforeseen errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a process that handles exceptions great. It calls: _set_se_translator(exception_trans_func); SetUnhandledExceptionFilter(UnhandledExceptionFilterHandler); _set_purecall_handler(purecallHandler); set_terminate(terminateHandler);
We have a custom build process (not using MS Build) and during that process
During our build process we run aspnet_compiler.exe against our websites to make sure that
During the process of building software applications, you would start testing what you have
I am firing an Ajax request using jQuery. During the process, I show a
I have a worker process that is executed via a Windows service (vb.net). It
I have a long running io process that I would like to be able
I have a process that is running as a java daemon on Ubuntu Linux.
I have part of a build process that creates a hideously long paths in
I have an Android Service running in a separate process from its client, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.