Bug? IllegalStateException

D

Deleted member 103

Guest
Hi,

my app works on Android 2.3 to 5.01 with no problems. From 5.1 (Nexus 7) crashes the app as soon as you display a Msgbox.

Link to App: https://play.google.com/store/apps/details?id=fg.cronomillemiglia

CMM-Lite_1.png
 

Attachments

  • CMM-Lite_2.png
    CMM-Lite_2.png
    128.5 KB · Views: 146
  • google-crashe-report.txt
    27 KB · Views: 198
  • b4a-crashe-report.txt
    54.3 KB · Views: 164
Last edited by a moderator:
D

Deleted member 103

Guest
Nexus 7(2012) , android 5.1 -> KO :mad:
Nexus 7(2013) , android 5.1 -> OK :)

Samsung-S4, android 5.01 -> OK :)
HTC-Desire, android 2.3.3 -> OK :)
Medion-Lifetab, android 4.4.2 -> OK :)
 
D

Deleted member 103

Guest
I have my complete project sent to you.
I thank you already in advance.
 
D

Deleted member 103

Guest
I didn't see your previous post before sending you the email.

First add a Try / Catch block before this call to prevent the app from crashing (you can show a toast message if there is an error).


Does it happen if you remove the bitmap from the msgbox2 call?
I have already tried everything.
When I use the "try / catch block" is no mistake.

When I use instead of Msgbox a ToastMessageShow then comes no error.
 
Last edited by a moderator:
D

Deleted member 103

Guest
When I create the Msgbox with a homemade Msgbox with Panel + label + button then everything works without problems.
 
D

Deleted member 103

Guest
Is there a chance to find the error?
I do not think I'm the only one with this problem.
The same problem also comes with Customdialog2.

I tried the Library BetterDialogs, unfortunately is the same error.
 
D

Deleted member 103

Guest
I will track this issue. I also tried to reproduce it in a small project unsuccessfully which makes it difficult to debug it.
As it is on your Nexus 5? Did you reproduce the error?

I hope you find this issue. :)
But that would be otherwise the first time that you can not solve a problem.;)
 
D

Deleted member 103

Guest
I have found something new.
When I run the Sub "mnuInfo_Click" from Sub "btnTest_Click" then no error occurs.
That is, the error is thrown when executing the Sub "mnuInfo_Click" from the menu.

B4X:
  Activity.AddMenuItem2("Info", "mnuInfo", LoadBitmap(File.DirAssets,"btn_info.png"))
...
Sub btnTest_Click
    mnuInfo_Click
End Sub

Sub mnuInfo_Click
   Msgbox2("Version " & mBBL.getVersion & CRLF & CRLF & Copyright & CRLF & Autor, AppName,"OK","","",LoadBitmap(File.DirAssets,"cronomillemiglia_48x48.png"))
End Sub
 
D

Deleted member 103

Guest
OK, I've found the solution! :)
B4X:
Sub ShowInfo
    Msgbox2("Version " & mBBL.getVersion & CRLF & CRLF & Copyright & CRLF & Autor, AppName,"OK","","",LoadBitmap(File.DirAssets,"cronomillemiglia_48x48.png"))
End Sub

Sub mnuInfo_Click
    CallSubDelayed(Me, "ShowInfo")
    Return
End Sub
 
D

Deleted member 103

Guest
See my answer in post #4 ;)
I had already tried it with "CallSubDelayed", but unfortunately no "Return" and that had not worked.
So is OK :)
B4X:
Sub mnuInfo_Click
    CallSubDelayed(Me, "ShowInfo")
    Return
End Sub

and so is not OK :(
B4X:
Sub mnuInfo_Click
    CallSubDelayed(Me, "ShowInfo")
End Sub
 
Top