1

I have a doubt...i am not sure whether its some carelessness from my part. I was using mBitmap.compress(Bitmap.CompressFormat.PNG,100, out); to save a bitmap to png . In the code the line beneath this code does not respond along with this. Let me make it clear, I have given Log.i(xy,xy); in all the alternating lines in the method to trace the issue, but all the Log until the line before mBitmap.compress(Bitmap.CompressFormat.PNG,100, out); prints and I have included the whole code in a try-catch, but no exception was caught. I have checked whether the parameter and the object were null, but no they are not. I am confused here..please help ...

Thanks in advance

Logcat

05-17 10:07:24.819: WARN/ActivityManager(73): Launch timeout has expired, giving up wake lock!
05-17 10:07:24.849: WARN/ActivityManager(73): Activity idle timeout for ActivityRecord{40968180 com.test.android.sk/.FPaint}

Edit

    public String cReatePNG(){

        Log.i("cp1", "in the create png");

          try{
              Log.i("cp2", "in the create png");
              flag=true;
              DataBaseHelper  myDbHelper = new DataBaseHelper(this);

              String pattern= "dd-MM-yyyy-HHmmss"   ;
              SimpleDateFormat format = new SimpleDateFormat(pattern);
              String formattedDate = format.format(new Date());
            Log.i("cp3", "in the create png");
              tmpfile= CreateTempDir.createTempDir();

              File file = new File(Environment.getExternalStorageDirectory()
                + File.separator+"/SK_Temp/img-"+formattedDate+".png");

            try{

                Log.i("cp4", "in the create png"+file);    
                  FileOutputStream  out = new FileOutputStream(file);
                Log.i("cp5", "in the create png");    
                Log.i("view",out.toString());
                view.mBitmap.compress(Bitmap.CompressFormat.PNG,100,out); // <----issue with this line
             }catch(Exception e){ e.printStackTrace();}
                Log.i("CP#file_creation", "PNG file created");
                filename=file.toString();
            }catch(Exception e){e.printStackTrace();}  
rahul
  • 2,758
  • 5
  • 32
  • 53
  • So, what is your issue? Image is not correctly compressed/saved or you do not see trace log? Important part of code with more clear explanation would be helpful. – Zelimir May 17 '11 at 07:47
  • I dont get any response in the logcat.I have some issues with my debugger, it is not working properly. – rahul May 17 '11 at 08:55
  • I am afraid you cannot move forward until you resolve that. – Zelimir May 17 '11 at 09:13

1 Answers1

0

The app could have exceeded the VM buget and ran out of memory..

Jana
  • 2,890
  • 5
  • 35
  • 45
  • then the emulator may force close the app...or wont respond to any more clicks on the app...but for me it do respond – rahul May 17 '11 at 09:45