1 Replies - 643 Views - Last Post: 28 April 2012 - 07:04 PM

#1 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 147
  • View blog
  • Posts: 979
  • Joined: 13-March 09

App crashing. Can't find why

Posted 28 April 2012 - 01:54 PM

Hi.
I've been making an app to play some music.
It has worked just fine all the time, but some days ago, the app just crashes when starting the main activity.
The only change i did, was changing a color. i've tried to change it back, but it didn't work

Here is what the logcat says
 04-28 20:49:16.196: W/dalvikvm(310): VFY: returning Ljava/lang/Object; (cl=0x0), declared [Ljava/lang/Object; (cl=0x0)
04-28 20:49:16.196: W/dalvikvm(310): VFY:  rejecting opcode 0x11 at 0x0002
04-28 20:49:16.196: W/dalvikvm(310): VFY:  rejected Lscilor/jgroovemobile/JGrooveMobile;.access$3 (Lscilor/jgroovemobile/JGrooveMobile;)[Lcom/scilor/grooveshark/API/Functions/SearchArtist$SearchArtistResult;
04-28 20:49:16.196: W/dalvikvm(310): Verifier rejected class Lscilor/jgroovemobile/JGrooveMobile;
04-28 20:49:16.196: W/dalvikvm(310): Class init failed in newInstance call (Lscilor/jgroovemobile/JGrooveMobile;)
04-28 20:49:16.196: D/AndroidRuntime(310): Shutting down VM
04-28 20:49:16.196: W/dalvikvm(310): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-28 20:49:16.206: E/AndroidRuntime(310): FATAL EXCEPTION: main
04-28 20:49:16.206: E/AndroidRuntime(310): java.lang.VerifyError: scilor.jgroovemobile.JGrooveMobile
04-28 20:49:16.206: E/AndroidRuntime(310): 	at java.lang.Class.newInstanceImpl(Native Method)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at java.lang.Class.newInstance(Class.java:1429)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.os.Handler.dispatchMessage(Handler.java:99)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.os.Looper.loop(Looper.java:123)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at android.app.ActivityThread.main(ActivityThread.java:4627)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at java.lang.reflect.Method.invokeNative(Native Method)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at java.lang.reflect.Method.invoke(Method.java:521)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-28 20:49:16.206: E/AndroidRuntime(310): 	at dalvik.system.NativeStart.main(Native Method)



I've searched a bit on Goolge, but could find anything that would help.
Tired to clean and rebuild, well everything, just no luck.


Thanks in advance.

This post has been edited by EndLessMind: 28 April 2012 - 06:51 PM


Is This A Good Question/Topic? 0
  • +

Replies To: App crashing. Can't find why

#2 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 147
  • View blog
  • Posts: 979
  • Joined: 13-March 09

Re: App crashing. Can't find why

Posted 28 April 2012 - 07:04 PM

ops, forgot.

Here is the code from the start screen that opens the main activity
package scilor.jgroovemobile;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;

public class StartScreen extends Activity {
	
	protected boolean _active = true;
	protected int _splashTime = 2000; // time to display the splash screen in ms
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.startscreen);
        final StartScreen sPlashScreen = this;
        getWindow().setWindowAnimations(android.R.style.Animation_Toast);
        // thread for displaying the SplashScreen
        Thread splashTread = new Thread() {
            @Override
            public void run() {
                try {
                    int waited = 0;
                    while(_active && (waited < _splashTime)) {
                        sleep(100);
                        if(_active) {
                            waited += 100;
                        }
                    }
                    
                } catch(InterruptedException e) {
                    // do nothing
                } finally {
                    finish();
                    try	 {
                        startActivity(new Intent(sPlashScreen, JGrooveMobile.class));
                        overridePendingTransition( R.anim.fadein,R.anim.fadeout );
                    } catch (Exception e) {
                    	Log.e("Start_ny", e.getMessage().toString());
                    }


                    interrupt();
                   
                }
            }
        };
        splashTread.start();
    }
    
    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            _active = false;
        }
        return true;
    }
}


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1