Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2014

    CustomFilter C# NullReferenceException


    I searched the forum for a similar post and found this: http://developer.nokia.com/community...t=customfilter but it doesn't help in answering my question. When I call RenderAsync() when using my CustomFilter, a NullReferenceException is thrown, which I need to catch and keep calling RenderAsync() until it finally works. Any ideas why? My code is really simple:

    using (var source = new BufferImageSource(imgToProcess.data.AsBuffer()))
    using (var effect = new FilterEffect(new MyCustomFilter(source)))
    using (var renderer = new JpegRenderer(effect))
        IBuffer buf = await renderer.RenderAsync();
    for my custom filter, I just overrwrote OnProcess() and that's it. I have a try-catch statement in there, but the exception does not happen there. Any ideas? If I use a new FilterEffect(source) everything works just fine. It seems to be an issue with CustomFilter itself? Thank you for any help!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: CustomFilter C# NullReferenceException

    If you have time, you may try running the same piece of code, with the example filter from http://developer.nokia.com/resources..._CustomFilters.

  3. #3
    Regular Contributor
    Join Date
    Nov 2011
    la bouexiere, france

    Re: CustomFilter C# NullReferenceException

    why do you create a filtereffect?
    What is the MyCustomFilter parent?
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

Similar Threads

  1. Creating CustomEffect in C++, NullReferenceException
    By leemcpherson in forum Windows Phone Imaging
    Replies: 32
    Last Post: 2014-05-31, 12:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts