Android Question Error DialogView.OnOrientationChanged reported in Play Store

welu1805

Active Member
Licensed User
Longtime User
Hi all,

I got a bug report in Google Play Store

anywheresoftware.b4a.B4AUncaughtException at com.datastream.b4a.xtraviews.DialogView ...

The screenshot from developer console is attached. Has anyone an idea what this is?

Lutz
 

Attachments

  • error_DialogView.png
    error_DialogView.png
    38 KB · Views: 269
Last edited:

welu1805

Active Member
Licensed User
Longtime User
I contacted the user who reported this bug (I know him) and he told me that everytime he presses a button to start an input dialog (xtraviews, DialogView) he get this error:

... java.lang.RuntimeException: InputChannel is not initialized
 
Upvote 0

welu1805

Active Member
Licensed User
Longtime User
I use XtraViews version 2.60, BfA 5.80.

The app runs under Jelly Bean, Kitkat and Lollipop 5.1.1 with no problems.

I read over the error "java.lang.RuntimeException: InputChannel is not initialized" in the internet and they supposed it could be "Launcher Pro" which would not release hardware resources. I installed Launcher Pro from Play Store on my Lollipop tablet and my app works good ...
 
Upvote 0

welu1805

Active Member
Licensed User
Longtime User
The problem is that the dialogs not become visible. Just the user presses a button to show the dialog the error appears: "java.lang.RuntimeException: InputChannel is not initialized".

Rotating of the device in not the main problem because I blocked it programatically. In the menu is an entry to change the orientation and shutdown the device. After restart the orientation has changed.
 
Upvote 0

welu1805

Active Member
Licensed User
Longtime User
Now I have the tablet from the user which posted the error. I wrote a simple app to test XtraViews, which I can run in debug mode.

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim btnTest As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")

   btnTest.Initialize("btnTest")
   btnTest.Text = "XtraView MsgBox"
   Activity.AddView(btnTest, 100dip, 100dip, 200dip, 100dip)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub btnTest_Click
    Dim Dialog As DialogView
    Dialog.MsgBox("The title", "The message ...", "Positive", "Negative", "Cancel", Null)
End Sub

When I press btnTest this error immediately occurs in the log:

Error occurred on line: 46 (Main)
java.lang.RuntimeException: InputChannel is not initialized.
at android.view.InputEventReceiver.nativeInit(Native Method)
at android.view.InputEventReceiver.<init>(InputEventReceiver.java:70)
at android.view.ViewRootImpl$WindowInputEventReceiver.<init>(ViewRootImpl.java:5815)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:612)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:272)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.Dialog.show(Dialog.java:298)
at com.datasteam.b4a.xtraviews.DialogView.show(DialogView.java:353)
at com.datasteam.b4a.xtraviews.DialogView.MsgBox(DialogView.java:385)
at b4a.example.main._btntest_click(main.java:414)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:703)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:4767)
at android.view.View$PerformClick.run(View.java:19784)
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:5306)
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:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
** Activity (main) Pause, UserClosed = true **

This is line 46:
Dialog.MsgBox("The title", "The message ...", "Positive", "Negative", "Cancel", Null)
 
Upvote 0
Top