in

Archived Data Techniques Forums

Component hangs when loading pictures

Last post 06-28-2007 8:08 AM by support. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-27-2007 3:32 PM

    • MRTrevorF
    • Top 25 Contributor
    • Joined on 07-30-2004
    • Ontario, Canada
    • Posts 28

    Component hangs when loading pictures

    I'm using the sample code supplied with ImageMan.Net and am getting intermittent troubles when loading certain kinds of garbage images.

     

    In the LoadPagesWithAttributes, the line in question is this one:

     imImg = imDecoder.Load(progress)

     Sometimes this will hang indefinitely, while others it will only pause for ten seconds to a couple minutes.  For normal pictures, it takes a fraction of a second.

     Is there anyway to impose some sort of time limit on this method, so I can kill it if takes longer than x seconds?

  • 06-27-2007 11:51 PM In reply to

    • MRTrevorF
    • Top 25 Contributor
    • Joined on 07-30-2004
    • Ontario, Canada
    • Posts 28

    Re: Component hangs when loading pictures

    Through heavy adaption of the Progress form (also included in the sample), I've been able to provide the user with the ability to either skip the loading of a picture or stop the process altogether.  This works for those situations where the picture just takes a very long time to return a null value.

     For situations where the picture hangs indefinitely at the "Load" method, however, the events in the DTI.ImageMan.ProcessEventHandler simply don't get a chance to fire.

     I've examined a sample GIF that is causing this type of problem and can't see anything about it's data structure that is overtly out of the ordinary, so I'm having a hard time desiging logic to filter out such invalid files at the preliminary stage of my program.  It meets the criteria (on the surface at least) of a GIF.

  • 06-28-2007 8:08 AM In reply to

    Re: Component hangs when loading pictures

    Hi,

    We have such a corrupted GIF that you have sent us and are working on an update so the control will not hang when loading it. We should have that available sometime next week. 

    Sean
    Data Techniques Online Support
Page 1 of 1 (3 items)
Copyright 2009 Data Techniques, Inc. All Rights Reserved.