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 6571975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:56:56+00:00 2026-05-25T14:56:56+00:00

I have some errors with my splash screen that I have been working on

  • 0

I have some errors with my splash screen that I have been working on for a while and can’t figure out. Is there a better way to time my splash screen than a thread? What’s wrong with my current thread? Can you see an issue with my media player object?

I’ve posted the guts of my splash class. Hopefully I can get some direction on these issues. This works when I run the app but I just don’t want to have errors.

————————-Code——————————

@Override
public void onCreate(Bundle savedInstanceState) {
 ......onCreate, hide window, and setting content view.......
        // Play Sound for startup
        mpSplash = MediaPlayer.create(this, R.raw.splashscream);
        mpSplash.start();
        final Splash splash = this;
        logoTimer = new Thread(){
        public void run(){
            try {
                synchronized(this){
                    // Wait given period of time or exit on touch
                    wait(4500);
                }
            } 
            catch(InterruptedException ex){ 
                ex.printStackTrace();
            }
            finish();
            mpSplash.stop();
            mpSplash.reset();
            //mpSplash.release();
            //mpSplash.release();
            // Run next activity
            Intent intent = new Intent();
            intent.setClass(splash, Game.class);
            startActivity(intent);
            stop();
        }
    };
    logoTimer.start();
}
// Splash screen touch events
@Override
public boolean onTouchEvent (MotionEvent evt)
{
    if(evt.getAction() == MotionEvent.ACTION_DOWN)
    {
        // Stop the introduction sounds
        mpSplash.stop();
        mpSplash.reset();
        //mpSplash.release();
        //mpSplash.release();
        synchronized(logoTimer){
            logoTimer.notifyAll();
        }
    }
    return true;
}

——————————Errors—————————–

09-11 21:50:04.644: ERROR/MediaPlayer(460): stop called in state 1
09-11 21:50:04.644: ERROR/MediaPlayer(460): error (-38, 0)
09-11 21:50:04.654: ERROR/global(460): Deprecated Thread methods are not supported.
09-11 21:50:04.654: ERROR/global(460): java.lang.UnsupportedOperationException
09-11 21:50:04.654: ERROR/global(460):     at java.lang.VMThread.stop(VMThread.java:85)
09-11 21:50:04.654: ERROR/global(460):     at java.lang.Thread.stop(Thread.java:1379)
09-11 21:50:04.654: ERROR/global(460):     at java.lang.Thread.stop(Thread.java:1344)
09-11 21:50:04.654: ERROR/global(460):     at com.ss.lastzombie.Splash$1.run(Splash.java:61)

Thanks!!

  • 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-25T14:56:57+00:00Added an answer on May 25, 2026 at 2:56 pm

    Don’t call stop() in your thread. That’s a deprecated method (it leads to instability in the VM) and is not needed. (The thread will exit when the run() method returns). You probably intended to call finish() for the splash activity. That would make sense.

    Just for form’s sake, you might want to call startActivity and finish on the main thread instead of your worker thread. To do this, post a Runnable using runOnUIThread() and call those two methods from the Runnable.

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

Sidebar

Related Questions

There is a Java Struts application running on Tomcat, that have some memory errors.
I have to debug some error that is db related and have been continuously
I'm using Syntastic plugin. I have some files with some errors (Warnings) that I
I am working in Zen Cart and I have some errors in different pages.
I have some comments about the OAuth draft RFC (specifically about some errors it
I have some HTML errors in my output source code, coming from one of
Due to a prinitng error in some promotional material I have a site that
I have been helping someone debug some code where the error message was Day
I'm trying to connect to SQLite database with Ecplise but I have some errors.
Is there a way to dynamically change the LoginUrl of FormsAuthentication? What I have

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.