Android Question Java Arithmetic Exception anyone encounter this?

PFlores81

Active Member
Licensed User
Longtime User
Since updating the AHViewPager libraryI have been getting increasing reports from users. Anyone have any input as to what is causing it?
B4X:
java.lang.ArithmeticException: divide by zero
at de.amberhome.viewpager.ViewPagerTabs.higlightTab(ViewPagerTabs.java:301)
at de.amberhome.viewpager.ViewPagerTabs.offsetChildren(ViewPagerTabs.java:579)
at de.amberhome.viewpager.ViewPagerTabs.onPageScrolled(ViewPagerTabs.java:559)
at android.support.v4.view.ViewPager.onPageScrolled(ViewPager.java:1647)
at android.support.v4.view.ViewPager.pageScrolled(ViewPager.java:1585)
at android.support.v4.view.ViewPager.performDrag(ViewPager.java:2019)
at android.support.v4.view.ViewPager.onTouchEvent(ViewPager.java:1922)
at de.amberhome.viewpager.CustomViewPager.onTouchEvent(CustomViewPager.java:25)
at android.view.View.dispatchTouchEvent(View.java:7461)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2264)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1995)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2270)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2010)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2270)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2010)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2270)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2010)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2270)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2010)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2186)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1516)
at android.app.Activity.dispatchTouchEvent(Activity.java:2466)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2134)
at android.view.View.dispatchPointerEvent(View.java:7641)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3676)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3607)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4802)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4781)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4873)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:174)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4852)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4892)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:530)
at android.view.Choreographer$FrameHandler.handleMessage(Choreographer.java:664)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5293)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
 

PFlores81

Active Member
Licensed User
Longtime User
Now this as well. Sheesh, runs smoothly on the 8 different devices it was tested on. Not sure why the errors continue to populate.
B4X:
java.lang.IllegalArgumentException
at android.os.StatFs.native_setup(Native Method)
at android.os.StatFs.<init>(StatFs.java:32)
at android.webkit.CacheManager.init(CacheManager.java:199)
at android.webkit.BrowserFrame.<init>(BrowserFrame.java:210)
at android.webkit.WebViewCore.initialize(WebViewCore.java:201)
at android.webkit.WebViewCore.access$500(WebViewCore.java:54)
at android.webkit.WebViewCore$WebCoreThread$1.handleMessage(WebViewCore.java:631)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:653)
at java.lang.Thread.run(Thread.java:1019)
 
Upvote 0

PFlores81

Active Member
Licensed User
Longtime User
So I'm going to assume nobody has come across this before. I'll keep digging but thanks for your help.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
So I'm going to assume nobody has come across this before. I'll keep digging but thanks for your help.
I just came across this issue today, i'm actually trying to load an xml layout using the xmlLayoutBuilder library, but i have no idea why this is giving me this issue, hope someone can shed some light to this problem.

here's the actual error;
** Activity (main) Resume **


java.lang.ArithmeticException: divide by zero


at com.zhy.view.CircleMenuLayout.onLayout(CircleMenuLayout.java:223)
at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1705)
at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1694)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1470)
at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at com.zhy.view.CircleMenuLayout.onLayout(CircleMenuLayout.java:256)
at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at anywheresoftware.b4a.BALayout.onLayout(BALayout.java:43)
at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)


at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15654)
at android.view.ViewGroup.layout(ViewGroup.java:4967)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2102)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1859)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1078)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5875)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5299)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
--------- beginning of crash
 
Upvote 0
Top