Bug? NB6 crashes Sony Xperia M5 hard, forcing phone reboot

Discussion in 'Bugs & wishlist' started by Sandman, Aug 8, 2018.

  1. Erel

    Erel Administrator Staff Member Licensed User

    Doesn't look like it will be helpful.

    Does anyone encountered this issue with devices other than Galaxy S5 and Sony Xpreria M5?
  2. Sandman

    Sandman Well-Known Member Licensed User

    Well, @JohnnyHamburg also mentioned Note 4 here. Other than that it seems it's not an overly common problem. (Or perhaps it's just difficult to bughunt and land on the bitmap icon in NB6?)

    So what is the best strategy? Is it to simply add an IsCompatible to NB6 and check for these exact phones and it's one of them, set SupportLevel to S_OLD?

    Or perhaps do what @woniol did, as described here? (Which seems to be an alternative solution to what @JordiCP came up with.)
  3. Erel

    Erel Administrator Staff Member Licensed User

    This is a problematic issue. It is an OS bug on a few devices running Android 6.

    One of the reasons that I chose to limit NB6 to Android 6+ is to be able to use the new support for bitmaps. Working with bitmaps is much simpler than working with resources.

    I need your help with finding the problematic devices.

    NB6 v1.02 is attached.

    See the code in IsIncompatibleDevice. It will log your device model. We then need to fill the map with the correct model names. I've just made a guess with the current values:
    Dim ProblematicDevices As Map = CreateMap("Samsung Galaxy S5""""Sony XPreria M5""")

    Attached Files:

    • NB6.bas
      File size:
      12.8 KB
  4. Sandman

    Sandman Well-Known Member Licensed User

    I'd love to help, but I just don't know how to do it in a way that's really helpful and provide good coverage of the problematic devices. I don't even get an exception to log and send to my server, it's a rock solid crash, so I can just act on anecdotal data that furious users report to me.

    Would it be possible to use bitmaps and internally convert it to a resource? I realize this code from @woniol doesn't quite do that, but could something like this still be a solution? (I have no idea of the complexity of converting bitmaps to resources, sorry.)
    Private Sub CreateIconFromBitmap(bmp As BitmapAs Object
    If bmp = Null Or bmp.IsInitialized = False Then Return 0
    Dim icon As JavaObject
    'Return icon.InitializeStatic("android.graphics.drawable.Icon").RunMethod("createWithBitmap", Array(bmp))
        Dim xml As XmlLayoutBuilder
    Return icon.InitializeStatic("android.graphics.drawable.Icon").RunMethod("createWithResource"Array(ctxt,xml.GetResourceId("drawable","icon")))
    End Sub
  5. Erel

    Erel Administrator Staff Member Licensed User

    Do you have access to a device which crashes? Check the logs and find the logged model.

    It is not possible to convert a bitmap to a resource.
  6. Sandman

    Sandman Well-Known Member Licensed User

    Yes, I do - a Sony Xperia M5.

    key: Sony E5603
    So the strategy is pretty much to collect buggy devices over time and add them to ProblematicDevices?
  7. Erel

    Erel Administrator Staff Member Licensed User

    Yes. Hopefully there aren't many such devices and developers will help build this list.
  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