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. TsLib *** stack smashing detected *** Qt 6.10.2/6.11
Qt 6.11 is out! See what's new in the release blog

TsLib *** stack smashing detected *** Qt 6.10.2/6.11

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 135 Views 2 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.
  • sbelaS Offline
    sbelaS Offline
    sbela
    wrote last edited by
    #1

    I have a BeagleBone Black with the 2026-02-12 13.3 which has gcc 14.3 and glibc enabled -fstack-protector and when I cross-compile Qt6.10.2 or Qt6.11 and I want to use LinuxFB with tslib after the first touch I have a crash with 'stack smashing detected' segfault.
    I have found out that the problem is with the linker linking with a different version of tslib. But I can not prove that because my sysroot is up to date I am sure of that.
    But after some investigation I have found out that in qtbase/src/platformsupport/input/tslib/qtslib.cpp:61 ther is a ts_sample sample; variable which causes the problem.
    And after I moved this variable outside the function as:
    static ts_sample sample; before the function declaration,
    and stops being a stack variable.
    The problem goes away.

    How can I determine that the compiled libtslibplugin.so is compiled with which libts library ?
    If there is a way at all...

    Thank you!

    I would like!

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote last edited by
      #2

      It's for sure a tslibmismatch between host and target.

      This should work to show the current version.

      ts_print_raw --version
      dpkg -l libts*
      

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      1
      • sbelaS Offline
        sbelaS Offline
        sbela
        wrote last edited by
        #3

        If I understand correctly you say that I have made a mistake with rsync from target to the sysroot which is on the host ?
        Or libts-bin/libts-dev which comes with the distribution have a mismatch ?

        I would like!

        1 Reply Last reply
        0
        • sbelaS Offline
          sbelaS Offline
          sbela
          wrote last edited by
          #4

          I made some more digging and I found that it helps
          qtbase/src/platformsupport/input/tslib/qtslib.cpp:58

          void QTsLibMouseHandler::readMouseData()
          {
              static ts_sample sample;
              while (get_sample(m_dev, &sample, m_rawMode)) {
          

          and also works this:

          void QTsLibMouseHandler::readMouseData()
          {
              ts_sample sample;
              qCDebug(qLcTsLib) << "hello";
              while (get_sample(m_dev, &sample, m_rawMode)) {
          

          but why !?

          I would like!

          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