Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] setIcon raises SIGSEGV Qt5
Forum Updated to NodeBB v4.3 + New Features

[Solved] setIcon raises SIGSEGV Qt5

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 2.2k 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.
  • D Offline
    D Offline
    dvillalobos
    wrote on last edited by
    #1

    Hi,

    I got a sigsegv wherever I call setIcon, any idea?

    @
    exitAction->setIcon(QIcon::fromTheme("application-exit", QIcon(":/images/svg/server-database.svg")));
    @

    Regards

    David

    1 Reply Last reply
    0
    • F Offline
      F Offline
      foxyz
      wrote on last edited by
      #2

      I'm not sure if you run it on Linux platform. Maybe you can use debug tool for tracing this error. like gdb. Usually, this kind of error is very simple if you use gdb

      I just know coding and coding

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qxoz
        wrote on last edited by
        #3

        Maybe you call setIcon before initialise the action?
        Anyway there is very few code, for saying something.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dvillalobos
          wrote on last edited by
          #4

          I found the problem. It is not in setIcon is in QIcon::fromTheme.

          Does someone know if there is a problem with fromTheme?

          Regards

          David

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dvillalobos
            wrote on last edited by
            #5

            This is the gdb

            <699bt

            &"bt\n"
            ~"#0 0x00007ffff3578bf8 in QIcon::~QIcon() () from /opt/Qt5.0.1/5.0.1/gcc_64/lib/libQt5Gui.so.5\n"
            ~"#1 0x00000000004de416 in MainWindow::createActions (this=0x942b40) at ../qt-mysql-gui-5/mainwindow.cpp:278\n"
            ~"#2 0x00000000004dbd84 in MainWindow::MainWindow (this=0x942b40) at ../qt-mysql-gui-5/mainwindow.cpp:97\n"
            ~"#3 0x0000000000420f63 in main (argc=1, argv=0x7fffffffe168) at ../qt-mysql-gui-5/main.cpp:14\n"
            699^done

            Regards

            David

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dvillalobos
              wrote on last edited by
              #6

              The code works fine on Qt 4.8 same machine. Any Ideas?

              Regards

              David

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dvillalobos
                wrote on last edited by
                #7

                It was a bug, see the "report":https://bugreports.qt-project.org/browse/QTBUG-30496.

                Regards

                David

                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