04-02-2013 08:37 AM
In my application I generate HTTP request to download map tile. Every thing is performing well but sometime it get crased with error message-
Premature end of JPEG file
Can anybody please tell me what is the meaning of this message and what kind of error did by my code?
Thanks in advance.
Solved! Go to Solution.
04-02-2013 09:19 AM
Sounds like either the HTTP request is being interrupted or the image is corrupt. Can you display the "bad" image properly in a web browser or in a photo viewer?
04-02-2013 09:43 AM
Yes, you are right HTTP request is being interrupted.
My HTTP request is in different thread (not in main thread). And for my purpose I do stop this thread.
Is it problemetic? Is there any good way to do it?
04-02-2013 10:02 AM
Actually I inherit Qthread to create my own thread, then in run() I call a member function in which I did all the task for this thread. In this member function there is a while loop with condition checking the bool variable is true or false. if it is false then the loop is running, if it is true then execution of loop is stoped and also thread is not running now.
In main thread I frequently change the bool variable and also start my thread again & again if thread is not running.
I think this basic explanation may help you to help me.