找不到应用崩溃的原因

时间:2011-12-02 16:15:58

标签: android debugging

在我的Android应用程序中,我在我的LogCat中得到了调试错误代码,我不理解,但由于这个我的应用程序关闭没有任何错误消息。这是什么意思?所以朋友,如果有人知道可能是什么原因..为什么会发生这种情况,请回复。这是我的LogCat ....

我正在使用sdk 3.1版的三星Galaxy Tab 10.1测试我的应用程序。

12-02 20:14:20.540: INFO/DEBUG(224): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-02 20:14:20.540: INFO/DEBUG(224): Build fingerprint: 'samsung/GT-P7500/GT-P7500:3.1/HMJ37/XWKG9:user/release-keys'
12-02 20:14:20.540: INFO/DEBUG(224): pid: 1298, tid: 1309  >>> com.ScentSational <<<
12-02 20:14:20.540: INFO/DEBUG(224): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 5d03a000
12-02 20:14:20.540: INFO/DEBUG(224):  r0 5d03a000  r1 003e37a0  r2 00000004  r3 d374a7c9
12-02 20:14:20.540: INFO/DEBUG(224):  r4 37e6adae  r5 a72dbb6c  r6 0afb0781  r7 36a8bee0
12-02 20:14:20.540: INFO/DEBUG(224):  r8 7a6dda1d  r9 4d374c54  10 69dc1e0b  fp c50a69dc
12-02 20:14:20.540: INFO/DEBUG(224):  ip b803832f  sp 5c099ae0  lr 00000010  pc aff0cadc  cpsr 20000010
12-02 20:14:20.540: INFO/DEBUG(224):  d0  3f80000000000064  d1  3ff0000000000000
12-02 20:14:20.540: INFO/DEBUG(224):  d2  3ff0000000000000  d3  4197d78400000000
12-02 20:14:20.540: INFO/DEBUG(224):  d4  3ff0000000000000  d5  4028000000000000
12-02 20:14:20.540: INFO/DEBUG(224):  d6  43e0000000000000  d7  412e848000000000
12-02 20:14:20.540: INFO/DEBUG(224):  d8  0000000000000000  d9  0000000000000000
12-02 20:14:20.540: INFO/DEBUG(224):  d10 0000000000000000  d11 0000000000000000
12-02 20:14:20.540: INFO/DEBUG(224):  d12 0000000000000000  d13 0000000000000000
12-02 20:14:20.540: INFO/DEBUG(224):  d14 0000000000000000  d15 0000000000000000
12-02 20:14:20.540: INFO/DEBUG(224):  scr 80000012
12-02 20:14:20.630: DEBUG/dalvikvm(370): GC_CONCURRENT freed 1046K, 12% free 30131K/34183K, paused 2ms+4ms
12-02 20:14:20.690: INFO/DEBUG(224):          #00  pc 0000cadc  /system/lib/libc.so (memcpy)
12-02 20:14:20.690: INFO/DEBUG(224):          #01  pc 000141c4  /system/lib/libbinder.so (_ZN7android12CursorWindow6copyInEjPKhj)
12-02 20:14:20.690: INFO/DEBUG(224):          #02  pc 00047308  /system/lib/libandroid_runtime.so
12-02 20:14:20.690: INFO/DEBUG(224):          #03  pc 00011d34  /system/lib/libdvm.so
12-02 20:14:20.690: INFO/DEBUG(224): libc base address: aff00000
12-02 20:14:20.690: INFO/DEBUG(224): code around pc:
12-02 20:14:20.690: INFO/DEBUG(224): aff0cabc e1a07827 e1877808 e1a08828 e1888809 
12-02 20:14:20.690: INFO/DEBUG(224): aff0cacc e1a09829 e189980a e1a0a82a e18aa80b 
12-02 20:14:20.690: INFO/DEBUG(224): aff0cadc e8a007f8 e1a0382b 2affffe8 ea000030 
12-02 20:14:20.690: INFO/DEBUG(224): aff0caec e491c004 e1a0400c e8b10fe0 f5d1f040 
12-02 20:14:20.690: INFO/DEBUG(224): aff0cafc e2522020 2491c004 e1833c04 e1a04424 
12-02 20:14:20.690: INFO/DEBUG(224): code around lr:
12-02 20:14:20.690: INFO/DEBUG(224): 00000000 ffffffff ffffffff ffffffff ffffffff 
12-02 20:14:20.690: INFO/DEBUG(224): 00000010 ffffffff ffffffff ffffffff ffffffff 
12-02 20:14:20.690: INFO/DEBUG(224): 00000020 ffffffff ffffffff ffffffff ffffffff 
12-02 20:14:20.690: INFO/DEBUG(224): 00000030 ffffffff ffffffff ffffffff ffffffff 
12-02 20:14:20.690: INFO/DEBUG(224): 00000040 ffffffff ffffffff ffffffff ffffffff 
12-02 20:14:20.690: INFO/DEBUG(224): stack:
12-02 20:14:20.690: INFO/DEBUG(224):     5c099aa0  00000033  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099aa4  00000000  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099aa8  40b4b008  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099aac  aca4cab1  /system/lib/libdvm.so
12-02 20:14:20.690: INFO/DEBUG(224):     5c099ab0  000b7108  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099ab4  aff4633c  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099ab8  00004000  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099abc  00000000  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099ac0  000b7108  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099ac4  aff10d58  /system/lib/libc.so
12-02 20:14:20.690: INFO/DEBUG(224):     5c099ac8  00177368  
12-02 20:14:20.690: INFO/DEBUG(224):     5c099acc  00000e98  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099ad0  0000001d  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099ad4  003e2928  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099ad8  df002777  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099adc  e3a070ad  
12-02 20:14:20.700: INFO/DEBUG(224): #00 5c099ae0  00177368  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099ae4  0000001d  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099ae8  00000e98  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099aec  00000000  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099af0  001ff1ae  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099af4  00000004  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099af8  00000105  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099afc  5d0391ae  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099b00  002e7780  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099b04  a81141c7  /system/lib/libbinder.so
12-02 20:14:20.700: INFO/DEBUG(224): #01 5c099b08  002e7780  
12-02 20:14:20.700: INFO/DEBUG(224):     5c099b0c  ad34730b  /system/lib/libandroid_runtime.so
12-02 20:14:22.310: INFO/DEBUG(224): dumpstate /data/log/dumpstate_app_native.txt
12-02 20:14:22.310: INFO/BootReceiver(287): Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
12-02 20:14:22.320: INFO/dumpstate(1313): begin
12-02 20:14:22.410: DEBUG/dalvikvm(287): GC_CONCURRENT freed 1605K, 49% free 12463K/24327K, paused 3ms+5ms
12-02 20:14:23.310: DEBUG/HierarchicalStateMachine(287): handleMessage: E msg.what=83
12-02 20:14:23.310: DEBUG/HierarchicalStateMachine(287): processMsg: ConnectedState
12-02 20:14:23.310: DEBUG/WifiStateMachine(287): ConnectedState{ what=83 when=-4ms arg1=1 }
12-02 20:14:23.320: DEBUG/HierarchicalStateMachine(287): handleMessage: X
12-02 20:14:25.060: DEBUG/VoldCmdListener(221): asec list
12-02 20:14:25.970: INFO/dumpstate(1313): done
12-02 20:14:26.030: INFO/ActivityManager(287): Process com.ScentSational (pid 1298) has died.
12-02 20:14:26.030: INFO/SurfaceFlinger(225): id=33 Removed com.ScentSational/com.ScentSational.SplashScreen idx=1 Map Size=2
12-02 20:14:26.030: INFO/SurfaceFlinger(225): id=33 Removed com.ScentSational/com.ScentSational.SplashScreen idx=-2 Map Size=2
12-02 20:14:26.030: INFO/SurfaceFlinger(225): id=33 Removed com.ScentSational/com.ScentSational.SplashScreen idx=-2 Map Size=2
12-02 20:14:26.030: DEBUG/Zygote(226): Process 1298 terminated by signal (11)
12-02 20:14:26.030: INFO/WindowManager(287): WIN DEATH: Window{40b63c20 com.ScentSational/com.ScentSational.SplashScreen paused=false}

谢谢。

我的SplashScreen.java代码文件

公共类SplashScreen扩展Activity {     /** 在第一次创建活动时调用。 * /

ImageView splachScreenLogoImage,splachScreenBackgroungImage,splachScreenLaunchingImg;
Cursor curForCategory=null,curForHotDeal=null;
ProgressBar progressBar;
RelativeLayout splashScreenMainLayout;
ManageSettings manageSettings;
@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);

    setContentView(R.layout.main_splashscreen);

    clearingCacheMemory(SplashScreen.this);

    ApplicationClass applicationClass=(ApplicationClass) getApplication();

    SqliteDBHelper sqDBHelper=new SqliteDBHelper(this);
    SQLiteDatabase sqRead=sqDBHelper.getReadableDatabase();
    SQLiteDatabase sqWrite=sqDBHelper.getWritableDatabase();

    applicationClass.setSqliteDBHelper(sqDBHelper);
    applicationClass.setSqLiteDatabaseRead(sqRead);
    applicationClass.setSqLiteDatabaseWrite(sqWrite);

    initializeLayoutUI();

    if(HaveNetworkConnection(this))
    {        
         progressBar = (ProgressBar)findViewById(R.id.progressBar);
         progressBar.setVisibility(View.VISIBLE);

         System.out.println("$$ net connecton ");

         Async_SettingsParsing asysnc_Setting= new Async_SettingsParsing(SplashScreen.this);
         asysnc_Setting.execute("");

         AsyncTask_CropingImageUrl crropingImageUrl=new AsyncTask_CropingImageUrl(this);
         crropingImageUrl.execute("cropped Images!!!");

    }else{
        try{


            SQLiteDatabase sqLiteDatabase=applicationClass.getSqLiteDatabaseRead();

            /*
             * Check HotDeal from DB.
             */
            if(checkFeaturedFromDB(this))
            {
                progressBar = (ProgressBar)findViewById(R.id.progressBar);
                progressBar.setVisibility(View.VISIBLE);

                System.out.println("$$ Go to hot deal activity ");

                new Thread(new Runnable() {
                public void run() {
                    try {
                        Thread.sleep(3000);

                        // Go to Hot Deal Activity;
                        Intent loginAct=new Intent(SplashScreen.this,Tabs.class);
                        loginAct.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                        SplashScreen.this.finish();
                        startActivity(loginAct);

                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }

                    }
                }).start();


            }else{

                System.out.println("$$ No hot deal and check Category");

                if(checkCategoryFromDB(this))
                {
                    progressBar = (ProgressBar)findViewById(R.id.progressBar);
                    progressBar.setVisibility(View.VISIBLE);

                    System.out.println("$$ Go to Category activity ");
                    try {
                        Thread.sleep(3000);

                        Intent loginAct=new Intent(SplashScreen.this,Tabs.class);
                        SplashScreen.this.finish();
                        startActivity(loginAct);

                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }

                }else
                {
                    AlertDialog.Builder alertDilog = new AlertDialog.Builder(this);
                    alertDilog.setMessage("Do you want to close this application ?").setCancelable(false)
                        .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int id) {

                                SplashScreen.this.finish();
                                android.os.Process.killProcess(android.os.Process.myPid());
                            }
                        })
                        .setNegativeButton("No", new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int id) {

                                dialog.cancel();
                            }
                        });
                    AlertDialog alert = alertDilog.create();
                    alert.setTitle("No Internet Connectivity!!!");
                    alert.setIcon(R.drawable.launcher);
                    alert.show();

                }   
            }

        }catch (Exception e) 
        {
                e.printStackTrace();

        }
   } // End else
}





@Override
public void onConfigurationChanged(Configuration newConfig) {
    Bitmap launchingScreen=null;
    if(manageSettings.getOrientation(this)==ManageSettings.LANDSCAPE)
        launchingScreen =manageSettings.getSplashLoadingHorizontalImage(this);
    else
        launchingScreen =manageSettings.getSplashLoadingVerticalImage(this);

    if(launchingScreen!=null){
        splachScreenLaunchingImg.setImageBitmap(launchingScreen);
        splachScreenLaunchingImg.refreshDrawableState();
    }
    super.onConfigurationChanged(newConfig);
}





/**
 * This method used to check Hot Deal Record availale in DB.
 * @param activity
 * @return : if hot deal available then return true value otherwise return false.
 */
public boolean checkFeaturedFromDB(Activity activity)
{
    ApplicationClass applicationClass = (ApplicationClass)activity.getApplicationContext();
    SQLiteDatabase sqLiteDatabase=applicationClass.getSqLiteDatabaseRead();

    boolean result=false;
    Cursor cursor=null;
    try{
        cursor=sqLiteDatabase.rawQuery("select * from "+SqliteDBHelper.FEATUREDPRODUCT+";",null);

        System.out.println("$$ checkFeaturedFromDB cursor count "+cursor);

        if(cursor!=null && cursor.getCount()!=0)
        {
            result=true;
        }else{
            result=false;
        }
    }catch (Exception e) {

    }finally{

        if(cursor!=null&&!cursor.isClosed())cursor.close();
    }
    System.out.println("$$ checkFeaturedFromDB result : "+result);
    return result;
}

public static boolean checkCategoryFromDB(Activity activity){

    ApplicationClass applicationClass = (ApplicationClass)activity.getApplicationContext();
    SQLiteDatabase sqLiteDatabase=applicationClass.getSqLiteDatabaseRead();

    boolean result=false;
    Cursor cursor=null;
    try{
        cursor=sqLiteDatabase.rawQuery("select category_id from "+SqliteDBHelper.CATEGORYTABLE+";",null);

        System.out.println("$$ checkCategoryFromDB cursor count "+cursor);

        if(cursor!=null && cursor.getCount()!=0)
        {
            result=true;
        }else{
            result=false;
        }
    }catch (Exception e) {e.printStackTrace();
    }finally{
        if(cursor!=null&&!cursor.isClosed())cursor.close();
    }
    System.out.println("$$ checkCategoryFromDB result : "+result);
    return result;
}



/**
 * This method check Internet connection.
 * @return : If WIFI Internet available then this method return true otherwise return false. 
 * 
 */
public static boolean HaveNetworkConnection(Context context)
{
    boolean HaveConnected = false;
    NetworkInfo info;
    ConnectivityManager conMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);

    info= conMgr.getActiveNetworkInfo();

    if(info != null && info.isConnected()) 
    { 
        HaveConnected=true;
    }else{
        HaveConnected=false;
    }
    return HaveConnected;
}

public void initializeLayoutUI()
{
    if(manageSettings==null)manageSettings = new ManageSettings();

    splashScreenMainLayout = (RelativeLayout)findViewById(R.id.splashScreenMainLayout);
    splachScreenBackgroungImage = (ImageView)findViewById(R.id.splachScreenBackgroungImage);
    splachScreenLogoImage = (ImageView)findViewById(R.id.splachScreenLogoImage);
    splachScreenLaunchingImg= (ImageView)findViewById(R.id.splachScreenLaunchingImg);

    Drawable drawableForBackgroudImage =manageSettings.getBackgroundOnlyServerImage(SplashScreen.this);
    Bitmap  LogoImage =manageSettings.getLogoImage(SplashScreen.this);
    Bitmap launchingScreen=null;

    if(manageSettings.getOrientation(this)==ManageSettings.LANDSCAPE)
        launchingScreen =manageSettings.getSplashLoadingHorizontalImage(this);
    else
        launchingScreen =manageSettings.getSplashLoadingVerticalImage(this);

    if(drawableForBackgroudImage!=null)
    {
        splachScreenBackgroungImage.setBackgroundDrawable(drawableForBackgroudImage);
        splachScreenBackgroungImage.refreshDrawableState();
    }
    if(LogoImage!=null)
    {
        splachScreenLogoImage.setImageBitmap(LogoImage);
        splachScreenLogoImage.refreshDrawableState();
    }
    if(launchingScreen!=null){
        splachScreenLaunchingImg.setImageBitmap(launchingScreen);
        splachScreenLaunchingImg.refreshDrawableState();
    }
    splashScreenMainLayout.refreshDrawableState();
}



public void goToTabActivity()
{
     System.out.println("$$  finish parseSettingXml go to tabs act");
     new Thread(new Runnable() {
            public void run() {
                try 
                {

                    Thread.sleep(100);

                    Intent loginAct=new Intent(SplashScreen.this,Tabs.class);
                    SplashScreen.this.finish();
                    startActivity(loginAct);


                } catch (Error e) {
                    e.printStackTrace();
                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
    }).start();


}
/**
 * This method used to clear device cache memory.
 */
public static void clearingCacheMemory(Context context) {
    try {

            File dir = context.getCacheDir();
            if (dir != null && dir.isDirectory()) {
                deleteDir(dir);
            }

    } catch (Exception e) {

            e.printStackTrace();
    }
}

public static boolean deleteDir(File dir) {
    try {
            if (dir!=null && dir.isDirectory()) {

                String[] children = dir.list();
                for (int i = 0; i < children.length; i++) {
                    boolean success = deleteDir(new File(dir, children[i]));
                    if (!success) {
                        return false;
                    }
                }
            }
            // The directory is now empty so delete it
            return dir.delete();

    } catch (Exception e) {

            return false;
    }
}

}

0 个答案:

没有答案