JPEGImage(<filename>) hangs
Chris Green
cl at isbd.net
Sat Sep 29 04:34:55 EDT 2018
Cameron Simpson <cs at cskk.id.au> wrote:
> On 28Sep2018 20:12, Chris Green <cl at isbd.net> wrote:
> >Peter Pearson <pkpearson at nowhere.invalid> wrote:
> >> 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.
>
> Can you separate the conversion from the copy? Copy the images off, run convert
> against the copies? That would give you more info as to whether it was the copy
> (implying an issue with the SD card as Peter suggests) or some pathologial
> image data (eg spinning out convert).
>
> Also, you can strace the hanging process; I'm a big fan of this for diagnostic
> purposes. A "hanging" process will normally be either spinning (using lots of
> CPU, or a mix of CPU and OS calls), or blocked (using no CPU at all while it
> waits for a OS call to complete). If it is blocked doing a read() then you
> immediately suspect the device from which the read is taking place.
>
It's blocked, I watched using top and it's using no CPU. So,
definitely points at a dodgy SD card.
--
Chris Green
·
More information about the Python-list
mailing list