osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JPEGImage(<filename>) hangs


On Fri, 28 Sep 2018 15:01:41 +0100, Chris Green <cl at isbd.net> wrote:
> Chris Green <cl at isbd.net> wrote:
>> Brian Oney <brian.j.oney at googlemail.com> wrote:
>> > Could you please try another tool like `convert'? E.g.
>> > 
>> > $ convert 102_PANA/P1020466.JPG test.png
>> > 
>> > 
>> > What does that say?
>> 
>> Well, after having returned home with the laptop where this was
>> failing and doing exactly the same thing again, it now works.  However
>> it did take several seconds before the >>> prompt appeared.
>> 
>> The problem seems to be intermittent as I'm calling the function while
>> importing images from a camera SD card and, sometimes, the import
>> hangs but most times it works OK.
>> 
>> I'll see if I can see anything common to when it hangs.
>> 
> ... and the result is that it now hangs several images later in the
> sequence!  It's almost as if some resource is running out.
>
> If I try convert on the 'problem' image it too hangs absolutely
> solidly needing a 'kill -9'.
>
> After some experimentation....  OK, it's some sort of file
> accessibility problem between the SD card and the computer:-
>
>   Running 'convert 102_PANA/P1020493.JPG /tmp/xyz.png' hangs
>
>   So 'kill -9' the convert
>
>   Run 'cp 102_PANA/P1020493.JPG /tmp/fred' takes several seconds but returns
[snip]

If copying that particular file takes longer than copying other files,
I'd start to suspect that it's stored in a failing spot in memory.  Is
102_PANA/P1020493.JPG being read from a camera's flash memory?  Does
"convert" hang on /tmp/fred? Does 102_PANA/P1020493.JPG have an unusual
size?  Can you use smartctl to ask the storage device if it's
encountering many errors?

-- 
To email me, substitute nowhere->runbox, invalid->com.