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