Invalid Image data - object is in use elsewhere

4 posts, 0 answers
  1. Anula
    Anula avatar
    1 posts
    Member since:
    Aug 2013

    Posted 30 May 2018 Link to this post

    Hello I have a following problem - in my web app I am using an html 5 report viewer with telerik reporting and from time to time I am encountering a following problem - picturebox control is not being loaded with image data. Attached is a screenshot with a problem.

    I am loading image data as base:

         [code]var bytes = Convert.FromBase64String(base64String);
                using (var ms = new MemoryStream(bytes))
                    pbLogo.Value = Image.FromStream(ms);


    I tried to search for similara problems, but none of the resolutions worked out.

  2. Squall
    Squall avatar
    181 posts
    Member since:
    Feb 2011

    Posted 01 Jun 2018 in reply to Anula Link to this post

    The error from this thread looks similar -

    Is this the same issue?

  3. Andrew
    Andrew avatar
    1 posts
    Member since:
    Aug 2017

    Posted 31 Jan in reply to Anula Link to this post

    Anula, did you ever find a solution for this problem?  I'm having the same issue.


  4. Silviya
    Silviya avatar
    403 posts

    Posted 05 Feb Link to this post

    Hi Andrew,

    There's a lock inside GDI+ that prevents two threads from accessing a bitmap at the same time. Please check the following articles on the same topic:

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top