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] SIGSEGV segmentation fault
Forum Updated to NodeBB v4.3 + New Features

[solved] SIGSEGV segmentation fault

Scheduled Pinned Locked Moved General and Desktop
17 Posts 4 Posters 8.0k 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.
  • K Offline
    K Offline
    KushalAusula
    wrote on last edited by
    #6

    Hi,
    As far as I know this error could be caused due to accessing a NULL POINTER of invalid memory.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      KushalAusula
      wrote on last edited by
      #7

      Hi,
      As far as I know this error could be caused due to accessing a NULL POINTER or invalid memory.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Ildar
        wrote on last edited by
        #8

        What are type of listeMessages object? And are you initialize listeMessages?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          asma11
          wrote on last edited by
          #9

          Hi , listeMessages is a QTextBrowser

          1 Reply Last reply
          0
          • A Offline
            A Offline
            asma11
            wrote on last edited by
            #10

            i have changed s.th and now the debugger shows me that the ploblem is on line 33 :
            socket->connectToHost(serveurIP->text(), serveurPort->value());

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

              Hi,

              From the code you posted, neither serveurIP nor serveurPort are initialized

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

              1 Reply Last reply
              0
              • A Offline
                A Offline
                asma11
                wrote on last edited by
                #12

                serveurIP is a QLineEdit ,serveurPort is a QDableSpinBox : both are inisialised in client.ui

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

                  Then, the calls should be

                  @socket->connectToHost(ui->serveurIP->text(), ui->serveurPort->value());@

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

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    asma11
                    wrote on last edited by
                    #14

                    it's ok i have solved this problem but now another error appaired it's related with socket i will create another discussion . Thanx everybody for help :)

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

                      So what was the problem ?

                      Since you solved it, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

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

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        asma11
                        wrote on last edited by
                        #16

                        Hi ,the problem was on: "socket->connectToHost(ui->serveurIP->text(), ui->serveurPort->value()); " on this line I forget to put ui-> as you told me @SGaist , thanx for help.

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

                          What is strange is that this would compile, so I guess you have member variables with these names in your class ? If so remove you should remove them

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

                          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