Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink
Accepted Solution

Crash issue - Error msg "Premature end of JPEG file"

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.

Highlighted
Developer
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 LE
My Carrier: Three

Re: Crash issue - Error msg "Premature end of JPEG file"

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?



Did this post help you? If so, please make sure to "like" it!
Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink

Re: Crash issue - Error msg "Premature end of JPEG file"

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?

 

Thanks Smiley Happy

Developer
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 LE
My Carrier: Three

Re: Crash issue - Error msg "Premature end of JPEG file"

Could you provide some sample code?



Did this post help you? If so, please make sure to "like" it!
Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink

Re: Crash issue - Error msg "Premature end of JPEG file"

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.