Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Lynggaard 106 posts 293 karma points
    Feb 15, 2017 @ 14:03
    Rasmus Lynggaard
    0

    Object reference not set to an instance of an object.

    When accessing an image via imagegen (not all images, but very specific images), I get an "Object reference not set to an instance of an object." error.

    The image in question is http://www.r82.org/ImageGen.ashx?image=/pimmedia/image/CombiFramex_52389.jpg&width=218&constrain=true&quality=85

    But....

    If I change the path to: http://www.r82.org/ImageGen.ashx?image=/pimmedia/image/Combiframex_52389.jpg&width=218&constrain=true&quality=85

    or

    http://www.r82.org/ImageGen.ashx?image=/pimmedia/image/CombiFrAmex_52389.jpg&width=218&constrain=true&quality=85

    I'll just have to change the filename in some way, then imagegen renders the image correctly.

    Why is this and what can I do to get rid of the error?

    Anyone?

  • Douglas Robar 3562 posts 4590 karma points MVP 6x admin c-trib
    Feb 15, 2017 @ 14:10
    Douglas Robar
    100

    Hi, Rasmus,

    That's interesting. I'll see if I can reproduce the problem but as a starting point, I wonder if there's something gone wrong with the index file's information.

    A quick test would be to delete the /pimmedia/image/cached folder and restart the site's application pool (to clear any in-memory data).

    Let me know what you find out while I try to reproduce the issue here.

    cheers,
    doug.

  • Rasmus Lynggaard 106 posts 293 karma points
    Feb 15, 2017 @ 14:16
    Rasmus Lynggaard
    0

    That did the trick - now it's just a mystery why it happened

  • Douglas Robar 3562 posts 4590 karma points MVP 6x admin c-trib
    Feb 15, 2017 @ 14:21
    Douglas Robar
    0

    Super!

    Somehow the index.xml file (and associated memory with the same data) got corrupt. That can happen for various reasons (full disk, app-pool crash while writing data, etc). All very rare and I do all I can to notice and self-correct any of these problems. Seems there's a scenario I don't/can't fix on the fly.

    Now I'm kicking myself for not asking you to zip up the cached folder before you deleted it so I could have a look at it. #h5is

    Glad it's working now.

    FWIW, you might update to the latest ImageGen (2.9.3). Easy to do and has some performance and resilience improvements. Upgrade package and instructions on the main ImageGen page.

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft