Android Question Beta 3 Problems

klaus

Expert
Licensed User
Longtime User
I have trouble with several projects each one uses classes.
The problem seems being the same in the two first projects.
They work in legacy debug.

The RPNCalc project.
Log :
LogCat connected to: HT9CXP804731
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
** Activity (main) Pause, UserClosed = true **
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 507 (scale)
mainafterFirstLayout (java line: 98)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)
at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 507 (scale)
mainafterFirstLayout (java line: 98)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)
at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
size 480 724
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 507 (scale)
mainafterFirstLayout (java line: 98)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)


at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 1148 (clswheel)
mainafterFirstLayout (java line: 98)
java.text.ParseException: Unparseable date: "1940.0 janvier 1"
at java.text.DateFormat.parse(DateFormat.java:626)
at anywheresoftware.b4a.keywords.DateTime.DateParse(DateTime.java:147)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 507 (scale)
mainafterFirstLayout (java line: 98)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)
at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 507 (scale)
mainafterFirstLayout (java line: 98)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams


at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)
at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 507 (scale)
mainafterFirstLayout (java line: 98)
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)
at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
size 480 724
** Activity (main) Create, isFirst = true **


Error occurred on line: 507 (scale)


mainafterFirstLayout (java line: 98)


java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams
at anywheresoftware.b4a.objects.ViewWrapper.getLeft(ViewWrapper.java:136)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at KCSoft.RPNCalc.main.afterFirstLayout(main.java:98)
at KCSoft.RPNCalc.main.access$100(main.java:16)
at KCSoft.RPNCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
ClsWheels project:
Log :
size 0 0
size 480 724
** Activity (main) Create, isFirst = true **
Error occurred on line: 1148 (clswheel)
mainafterFirstLayout (java line: 98)
java.text.ParseException: Unparseable date: "1940.0 janvier 1"
at java.text.DateFormat.parse(DateFormat.java:626)
at anywheresoftware.b4a.keywords.DateTime.DateParse(DateTime.java:147)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:456)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:204)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **

I made a small project with the ClsWheels class to test the 'inline' code change.
Project ClsWheelsV1_7_B4A3.zip.
Log :
size 480 724
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Error occurred on line: 911 (clswheel)
java.lang.IllegalArgumentException: invalid value for field
at java.lang.reflect.Field.setField(Native Method)
at java.lang.reflect.Field.set(Field.java:558)
at anywheresoftware.b4a.shell.Shell.setField(Shell.java:409)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:219)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:170)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at anywheresoftware.b4a.agraham.reflection.Reflection$7.onTouch(Reflection.java:1118)
at android.view.View.dispatchTouchEvent(View.java:3881)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)


at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1691)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1125)
at android.app.Activity.dispatchTouchEvent(Activity.java:2096)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1675)
at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2194)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1878)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
When you click onto the Label the wheels appear.
If you move a wheel the program crashes.

Attached the projects.

The 'inline' code modification is a huge step forward !!!

Best regards.
 

Attachments

  • ClassRPNCalcV3_0.zip
    20.3 KB · Views: 97
  • ClsWheelsV1_7.zip
    18.4 KB · Views: 96
  • ClsWheelsV1_7_B4A3.zip
    14.7 KB · Views: 111

Erel

B4X founder
Staff member
Licensed User
Longtime User
Thank you Klaus. I've fixed the issues for the next beta update. All three apps now work correctly.
Will release Beta number 3 later today.

upload_2013-10-2_10-3-52.png
 
Upvote 0
Top