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 - Port from Windows to Linux
Forum Updated to NodeBB v4.3 + New Features

Segmentation Fault - Port from Windows to Linux

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 603 Views
  • 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
    peter_1998
    wrote on last edited by peter_1998
    #1

    Hello

    I am trying to solve this problem for two days now and I really dont know what to do anymore.
    The application works on windows 7 with this configuration:

    Qt 5.10.0 (i386-little_endian-ilp32 shared (dynamic) release build; by MSVC 2015) on "windows"
    OS: Windows 7 SP 1 (6.1) [winnt version 6.1.7601]
    Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX
    Qt Creator 4.6.0-beta1 (4.5.82)

    and I want to port it to my raspberry pi with debian stretch:

    QT 5.7.1
    OS: Raspbian GNU/Linux 9 (stretch)
    QT Creator 4.2.0

    Compiler on linux is GCC-6 and on windows: MinGW 4.9.2

    My problem is:

    the app crashes when I call Qapplication with Segmentation Fault .

    0_1522162419380_2018-03-27-144539_1680x1050_scrot.png

    0_1522162434854_2018-03-27-144513_1680x1050_scrot.png

    i tried open a new project on linux and copy the single files to it from the old project but that did not help. I tried to rebuild everything and run qmake but nothing helps.
    Help would really be appreciated!!

    1 Reply Last reply
    0
    • mranger90M Offline
      mranger90M Offline
      mranger90
      wrote on last edited by
      #2

      I've usually found that this is because of a missing shared library. Run ldd on your application and see if anything is missing.

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

        I found the fault , it was one line of code which was completely useless..so annoying!

        could somebody explain to me please why this worked in windows but not on linux..very strange: I just deleted the marked line on the first picture below...maybe because the same name ("socket") was used in the header and the source file? I dont know but the windows compiler didnt have any problems with it..

        2_1522195955708_fault1.JPG 1_1522195955708_fault2.JPG 0_1522195955705_fault3.JPG

        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