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. Segmentation fault on adding icon to App
Forum Updated to NodeBB v4.3 + New Features

Segmentation fault on adding icon to App

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 1.5k 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.
  • P Offline
    P Offline
    Patrick2391
    wrote on last edited by
    #1

    I have added icon to my App like this:

    @app = QApplication(sys.argv)
    app.setWindowIcon(QIcon("images/icon.jpeg"))@

    On closing app window I get segmentation fault. Why ?
    How to correct this ?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      The reson for the crash is probably different than icon setting. Please run your application in debug mode and see where it crashes. If that is not enough, you can run it through Valgrind and it will show a more thorough stack trace.

      (Z(:^

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Patrick2391
        wrote on last edited by
        #3

        Can u elaborate on how to debug Application.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          If you are using Qt Creator: select debug build in porject settings. Run the debugging session (F5). Do everything as you do normally to reproduce the crash. The debugger will show you exactly the line of code where the crash has occured.

          (Z(:^

          1 Reply Last reply
          0
          • P Offline
            P Offline
            Patrick2391
            wrote on last edited by
            #5

            Actually i have created Qt app in python using pyside library. Only .ui files are created in Qt creator.
            How can i debug?

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              In that case, I do not know. I guess Python also has some kind of debugger available.

              (Z(:^

              1 Reply Last reply
              0
              • P Offline
                P Offline
                Patrick2391
                wrote on last edited by
                #7

                Using gdb i got following trace:

                @[Thread 0x7fffed7fd700 (LWP 60845) exited]
                [Thread 0x7fffedffe700 (LWP 60844) exited]

                Program received signal SIGSEGV, Segmentation fault.
                0x00007ffff64c4bcb in PySide::SignalManager::clear() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
                (gdb) bt
                #0 0x00007ffff64c4bcb in PySide::SignalManager::clear() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
                #1 0x00007ffff64d1f95 in PySide::destroyQCoreApplication() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
                #2 0x00007ffff64d2981 in PySide::runCleanupFunctions() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
                #3 0x00007ffff683ecc5 in ?? () from /usr/lib/python2.7/dist-packages/PySide/QtCore.so
                #4 0x000000000052f936 in PyEval_EvalFrameEx ()
                #5 0x000000000056d0aa in ?? ()
                #6 0x00000000004da29f in PyEval_CallObjectWithKeywords ()
                #7 0x000000000042fa19 in Py_Finalize ()
                #8 0x000000000042fb7c in Py_Exit ()
                #9 0x000000000042fcb9 in ?? ()
                #10 0x000000000042ec32 in PyErr_PrintEx ()
                #11 0x000000000042f042 in ?? ()
                #12 0x000000000046aa09 in Py_Main ()
                #13 0x00007ffff7817ec5 in __libc_start_main (main=0x46ac3f <main>, argc=2, argv=0x7fffffffe4b8, init=<optimized out>, fini=<optimized out>,
                rtld_fini=<optimized out>, stack_end=0x7fffffffe4a8) at libc-start.c:287
                #14 0x000000000057497e in _start ()@

                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