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. QThread on Windows XP

QThread on Windows XP

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.8k 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.
  • M Offline
    M Offline
    marco d
    wrote on last edited by
    #1

    Hello everyone,

    I have this question:

    I have an application that launches the main QThread in parallel with each click of a button.

    windows 7 with quad-core processor 3.33 GHz works fine and you do not ever crashed also launching 4-5 threads in parallel.

    on windows xp quad core 2.13 GHZ sometimes goes the other application terminates unexpectedly.

    do you know if there are limitations on xp?

    thank you

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      It should work the same way. Are you accessing any global data across threads ? Ensure that global data is protected properly. I'm not sure how big is your thread task. Did you try with simple sample ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • M Offline
        M Offline
        marco d
        wrote on last edited by
        #3

        the task of the thread is to take a QImage and create a TIFF on a path.
        in windows 7 works well and is never interrupted
        in windows xp many times you close the application

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Possible. Internally it depends on how OS handles these threads which Qt has no role to play. I'm sure you are doing some heavy work inside threads and some global data may be causing the issue. It may be due to synchronization issue. Better you try with simple test program and see the behaviour. If you want simple test program, I can provide you as well

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            [quote author="marco d" date="1405322894"]windows 7 with quad-core processor 3.33 GHz works fine and you do not ever crashed also launching 4-5 threads in parallel.

            on windows xp quad core 2.13 GHZ sometimes goes the other application terminates unexpectedly.[/quote]Hi,

            It sounds like your code contains race conditions -- you didn't synchronize read/write operations between threads correctly.

            See http://qt-project.org/doc/qt-5/threads-synchronizing.html

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            0
            • M Offline
              M Offline
              marco d
              wrote on last edited by
              #6

              [quote author="Dheerendra" date="1405398244"]Possible. Internally it depends on how OS handles these threads which Qt has no role to play. I'm sure you are doing some heavy work inside threads and some global data may be causing the issue. It may be due to synchronization issue. Better you try with simple test program and see the behaviour. If you want simple test program, I can provide you as well[/quote]

              thank you very much,if you can.
              i can try your simple code on windows 7 and xp.
              i hope that is one problem of synchronize

              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