Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Crashes when using QObject::tr("") on Android
Forum Updated to NodeBB v4.3 + New Features

Crashes when using QObject::tr("") on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 360 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Francky033
    wrote on last edited by Francky033
    #1

    Hello,

    For several years now, bugs have been appearing in the play console involving text translations when I use QObject::tr("")

    I get the same backtraces every time:

    backtrace:
      #00  pc 0x0000000000209cc0  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libQt5Core_arm64-v8a.so (match(unsigned char const*, unsigned int, char const*, unsigned int))
      #01  pc 0x0000000000209ba0  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libQt5Core_arm64-v8a.so (QTranslatorPrivate::do_translate(char const*, char const*, char const*, int) const)
      #02  pc 0x0000000000209ba0  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libQt5Core_arm64-v8a.so (QTranslatorPrivate::do_translate(char const*, char const*, char const*, int) const)
      #03  pc 0x00000000001e35fc  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libQt5Core_arm64-v8a.so (QCoreApplication::translate(char const*, char const*, char const*, int)+188)
      #04  pc 0x000000000015afe0  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libWinStars3_arm64-v8a.so (render3D::Objets2D()+36112)
      #05  pc 0x00000000002896c4  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libWinStars3_arm64-v8a.so (QWinStars3View::render()+3316)
      #06  pc 0x00000000002e16d8  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libWinStars3_arm64-v8a.so (QWinStars3View::paintGL()+272)
      #07  pc 0x00000000001d95dc  /data/app/~~ZnUYoB85TnSFH3Y1dW-WlA==/net.winstars3-k4o4SxuKgg98bAOFXihUxA==/lib/arm64/libQt5Widgets_arm64-v8a.so (QOpenGLWidgetPrivate::render())
    

    Crashes happen rarely (<1%) but always on QObject::tr lines.
    This seems to affect mainly devices running Android12 & 13...

    Any ideas?

    Thanks!

    PS: I'm using Qt 5.15.10 and NDK 21.4.7075529

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It's a good question but, sorry, I don't have an answer for it. However I am curious: why you are using an empty string with tr ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        It's a good question but, sorry, I don't have an answer for it. However I am curious: why you are using an empty string with tr ?

        F Offline
        F Offline
        Francky033
        wrote on last edited by
        #3

        @SGaist Hello !

        Oh no, sorry, that was just an (incorrect) way of formulating the question... I always use QOject:tr with a non-empty string of course.

        Here, I'm giving it a try by modifying the qtranslator.cpp file

        and more specifically the function

        static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)

        I've just added the condition

        if (!found || !target) return false;

        I'll let you know if I see a difference...

        Thanks a lot!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved