How to read crash dump of Android

by koba » Sat, 14 May 2011 21:35:17 GMT


Sponsored Links
 Hi, I wrote about crash dump in my blog.

objdump -S is useful to see source code from object.

"How to read crash dump of Android"
 http://kobablog.wordpress.com/2011/05/14/how-to-read-crash-dump-of-android/ 

crash dump is generated by debuggerd.

"debuggerd of Android"
 http://kobablog.wordpress.com/2011/05/12/debuggerd-of-android/ 

-- 



Other Threads

1. How to set the SeekBar progress value

Hi All,
I am making a simple layout which contain SeekBar like this

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="250px"
android:layout_height="100px" xmlns:android="
http://schemas.android.com/apk/res/android">
<TextView android:text="@+id/seekValue" android:id="@+id/seekValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"></TextView>
<SeekBar android:layout_width="fill_parent"
android:layout_below="@+id/seekValue" android:layout_height="wrap_content"
android:id="@+id/SeekBar" android:max="3000"
android:soundEffectsEnabled="true"></SeekBar>
<Button android:layout_width="125px"
android:layout_below="@+id/SeekBar" android:text="OK"
android:layout_height="wrap_content" android:id="@+id/seekOK"></Button>
<Button android:layout_width="125px"
android:layout_toRightOf="@+id/seekOK" android:layout_below="@+id/SeekBar"
android:text="Cancel" android:layout_height="wrap_content"
android:id="@+id/seekCancel"></Button>
</RelativeLayout>

I would like to change my progress with minimum 50 value.
What I want to say is when if scroll my seekbar the value changed value
should be like 50,100, 150, 200, ....3000.

thanks in advace

regards
NBS

-- 

2. addContentView obscures events

I'm trying to overlay one view on top of another using addContentView.
The bottom view has an ImageButton on it linked to a ClickListener.
This all worked fine until I add the overlay view using:
addContentView(overlayView, new
LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
After that, no click events are seen by my base view. I think I'm
missing something fundamental about event propagation wrt views, but I
can't figure it out... any thoughts would be appreciated.

Thanks,
-Chris

Here's the base view:
--------------------------------------------------------------------------------------------------------------
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
  android:id="@+id/cameraView" android:layout_width="fill_parent"
  android:layout_height="fill_parent" android:gravity="center_vertical|
center_horizontal">
  <RelativeLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:gravity="bottom">
    <SurfaceView android:id="@+id/camera_surface"
      android:layout_width="fill_parent"
android:layout_height="fill_parent" />
    <LinearLayout android:layout_width="fill_parent"
      android:layout_height="wrap_content"
android:layout_gravity="bottom"
      android:paddingTop="8dip" android:gravity="center_horizontal"
      android:background="#AA000000">
      <ImageButton android:id="@+id/shutterButton"
        android:layout_width="wrap_content"
android:layout_height="wrap_content"
        android:src="@android:id/drawable/ic_menu_camera" />
    </LinearLayout>
  </RelativeLayout>
</LinearLayout>
--------------------------------------------------------------------------------------------------------------

And here's the view I'm trying to add on top:
--------------------------------------------------------------------------------------------------------------
public class OverlayView extends View
implements View.OnTouchListener, View.OnClickListener,
ZoomButtonsController.OnZoomListener {

  private final Drawable overlay;
  private boolean inDrag = false;
  private final ZoomButtonsController zoomController;
  private final float zoomIncrement = 0.1f;
  private final float aspectRatio;

  protected OverlayView(Context context) {
    super(context);

    setFocusable(true);
    setFocusableInTouchMode(true);
    overlay = context.getResources().getDrawable(R.drawable.overlay);
    aspectRatio = ((float)overlay.getIntrinsicHeight()) /
((float)overlay.getIntrinsicWidth());
    overlay.setBounds(0, 0, 100, (int)(100 * aspectRatio));
    setOnTouchListener(this);
    setOnClickListener(this);

    zoomController = new ZoomButtonsController(this);
    zoomController.setOnZoomListener(this);
  }

  protected void onDraw(Canvas canvas) {
    overlay.draw(canvas);
    super.onDraw(canvas);
  }

  public boolean onTouch(View v, MotionEvent event) {
    switch (event.getAction()) {
    case MotionEvent.ACTION_DOWN:
      if (overlay.getBounds().contains((int)event.getX(),
(int)event.getY())) {
        inDrag = true;
      } else {
        zoomController.setVisible(true);
      }
      break;
    case MotionEvent.ACTION_MOVE:
      if (inDrag) {
        Rect bounds = new Rect();
        overlay.copyBounds(bounds);
        bounds.offsetTo((int)(event.getX() - bounds.width()/2),
            (int)(event.getY() - bounds.height()/2));
        overlay.setBounds(bounds);
        invalidate();
      }
      break;
    case MotionEvent.ACTION_UP:
      if (inDrag)
        inDrag = false;
      break;
    default:
      break;
    }
    if (zoomController.isVisible())
      zoomController.onTouch(v, event);

    return false;
  }

  public void onClick(View v) {
  }

  public void onVisibilityChanged(boolean visible) {
    setOnTouchListener(this);
  }

  public void onZoom(boolean zoomIn) {
    Rect bounds = new Rect();
    overlay.copyBounds(bounds);
    if (zoomIn) {
      float width = bounds.width() * (1.0f + zoomIncrement);
      float height = width * aspectRatio;
      bounds.set(bounds.left, bounds.top, bounds.left + (int)width,
bounds.top + (int)height);
    }
    else {
      float width = bounds.width() * (1.0f - zoomIncrement);
      float height = width * aspectRatio;
      bounds.set(bounds.left, bounds.top, bounds.left + (int)width,
bounds.top + (int)height);
    }
    overlay.setBounds(bounds);
    invalidate();
  }

  protected void onDetachedFromWindow() {
    zoomController.setVisible(false);
    super.onDetachedFromWindow();
  }

}
--------------------------------------------------------------------------------------------------------------

-- 

3. Desire a2sd

4. Pulsa Tri Murah

5. RIP+MOD Nemo Player dari Acer Liquid, Gudeg MO

6. RIP+MOD Nemo Player dari Acer Liquid, Gudeg MOD

7. rooting Desire+RO