Bug? IllegalStateException

Discussion in 'Bugs & wishlist' started by Filippo, May 3, 2015.

  1. Filippo

    Filippo Expert Licensed User

    Attached Files:

    Last edited: May 3, 2015
    lomosami likes this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you reproduce with a simple project?
     
  3. Filippo

    Filippo Expert Licensed User

    Unfortunately not, have tried but without success.:(
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Try to use CallSubDelayed to call a sub that will show the msgbox.
     
  5. Filippo

    Filippo Expert Licensed User

    Have already tried, unfortunately without success.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    If you like you can send me the complete project and I'll try it on a nexus 5 with Android 5.1.
     
  7. Filippo

    Filippo Expert Licensed User

    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 :)
     
  8. Filippo

    Filippo Expert Licensed User

    I have my complete project sent to you.
    I thank you already in advance.
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    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?
     
  10. Filippo

    Filippo Expert Licensed User

    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: May 3, 2015
  11. Filippo

    Filippo Expert Licensed User

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

    Filippo Expert Licensed User

    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.
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    I will track this issue. I also tried to reproduce it in a small project unsuccessfully which makes it difficult to debug it.
     
  14. Filippo

    Filippo Expert Licensed User

    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.;)
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    There was no error on the Nexus 5.
     
  16. Filippo

    Filippo Expert Licensed User

    Then it's just a Nexus-7 error?
    I have the error on my Nexus-7 and a customer on his Nexus-7.
     
  17. Filippo

    Filippo Expert Licensed User

    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.

    Code:
    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
     
  18. Filippo

    Filippo Expert Licensed User

    OK, I've found the solution! :)
    Code:
    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
     
    Erel likes this.
  19. Erel

    Erel Administrator Staff Member Licensed User

    See my answer in post #4 ;)
     
    DonManfred likes this.
  20. Filippo

    Filippo Expert Licensed User

    I had already tried it with "CallSubDelayed", but unfortunately no "Return" and that had not worked.
    So is OK :)
    Code:
    Sub mnuInfo_Click
        CallSubDelayed(Me, 
    "ShowInfo")
        
    Return
    End Sub
    and so is not OK :(
    Code:
    Sub mnuInfo_Click
        CallSubDelayed(Me, 
    "ShowInfo")
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice