[Galaxy S II Android Development] maskerwsk:
Hey Guys.

Need a bit of debugging help :)

here is log:

02-16 10:49:47.092 7140 7140 D AndroidRuntime: Shutting down VM
02-16 10:49:47.092 7140 7140 E AndroidRuntime: FATAL EXCEPTION: main
02-16 10:49:47.092 7140 7140 E AndroidRuntime: Process: com.android.settings, PID: 7140
02-16 10:49:47.092 7140 7140 E AndroidRuntime: java.lang.IllegalArgumentException: width and height must be > 0
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.graphics.Bitmap.createBitmap(Bitmap.java:933)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.graphics.Bitmap.createBitmap(Bitmap.java:912)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at com.maskerwsk.colorpicker.ColorPickerPreference.getPreviewBitmap(ColorPickerPreference.java)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at com.maskerwsk.colorpicker.ColorPickerPreference.setPreviewColor(ColorPickerPreference.java)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at com.maskerwsk.colorpicker.ColorPickerPreference.onBindView(ColorPickerPreference.java)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.preference.Preference.getView(Preference.java:546)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.java:281)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.AbsListView.obtainView(AbsListView.java:2820)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.ListView.makeAndAddView(ListView.java:1884)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.ListView.fillDown(ListView.java:713)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.ListView.fillFromTop(ListView.java:779)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.ListView.layoutChildren(ListView.java:1693)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.AbsListView.onLayout(AbsListView.java:2624)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.View.layout(View.java:16804)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewGroup.layout(ViewGroup.java:5328)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.View.layout(View.java:16804)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewGroup.layout(ViewGroup.java:5328)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.View.layout(View.java:16804)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewGroup.layout(ViewGroup.java:5328)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.View.layout(View.java:16804)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewGroup.layout(ViewGroup.java:5328)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.View.layout(View.java:16804)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewGroup.layout(ViewGroup.java:5328)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2324)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2037)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1196)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6675)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.Choreographer.doCallbacks(Choreographer.java:590)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.Choreographer.doFrame(Choreographer.java:560)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.os.Handler.handleCallback(Handler.java:739)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:95)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:145)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at android.app.ActivityThread.main(ActivityThread.java:5940)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at java.lang.reflect.Method.invoke(Native Method)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at java.lang.reflect.Method.invoke(Method.java:372)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1389)
02-16 10:49:47.092 7140 7140 E AndroidRuntime:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)

and here is the method it refers to (as far as I can see )

.method private getPreviewBitmap()Landroid/graphics/Bitmap;
.locals 11

const/4 v10, 0x1

iget v8, p0, Lcom/maskerwsk/colorpicker/ColorPickerPreference;->mDensity:F

const v9, 0x41f8

mul-float/2addr v8, v9

float-to-int v3, v8

invoke-virtual {p0}, Lcom/maskerwsk/colorpicker/ColorPickerPreference;->getValue()I

move-result v2

sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

invoke-static {v3, v3, v8}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

move-result-object v0

invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

move-result v7

invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

move-result v4

move v1, v2

const/4 v5, 0x0

:goto_0
if-ge v5, v7, :cond_4

move v6, v5

:goto_1
if-ge v6, v4, :cond_3

if-le v5, v10, :cond_0

if-le v6, v10, :cond_0

add-int/lit8 v8, v7, -0x2

if-ge v5, v8, :cond_0

add-int/lit8 v8, v4, -0x2

if-lt v6, v8, :cond_2

:cond_0
const v1, -0x777778

:goto_2
invoke-virtual {v0, v5, v6, v1}, Landroid/graphics/Bitmap;->setPixel(III)V

if-eq v5, v6, :cond_1

invoke-virtual {v0, v6, v5, v1}, Landroid/graphics/Bitmap;->setPixel(III)V

:cond_1
add-int/lit8 v6, v6, 0x1

goto :goto_1

:cond_2
move v1, v2

goto :goto_2

:cond_3
add-int/lit8 v5, v5, 0x1

goto :goto_0

:cond_4
return-object v0
.end method

any ideas? Ive checked the line

Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

in existing methods inside secsettings and it matches.

so im abit stumped.

thanks guys