Sign in to follow this  
Simon Brown

Film Noir Plugin - Updated for Paint.NET 3.20

Recommended Posts

Error Log. Have Fun! :D

File: C:\Program Files\Paint.NET\Effects\FilmNoir.dll
     Effect Name: FilmNoir.EffectPlugin
     Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.InvalidCastException: Unable to cast object of type 'PaintDotNet.Effects.BrightnessAndContrastAdjustmentConfigToken' to type 'PaintDotNet.Effects.PropertyBasedEffectConfigToken'.
  at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
  at FilmNoir.EffectPlugin.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
  at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction()
  --- End of inner exception stack trace ---
  at PaintDotNet.Effects.BackgroundEffectRenderer.Join()
  at PaintDotNet.Effects.BackgroundEffectRenderer.Abort()
  at PaintDotNet.Menus.EffectMenuBase.DoEffect(Effect effect, EffectConfigToken token, PdnRegion selectedRegion, PdnRegion regionToRender, Surface originalSurface, Exception& exception)

What version of Paint.NET are you using?

A note to everyone else: If you havn't got the latest version and have tried my plugin - please tell me your version and whether it worked.

Share this post


Link to post
Share on other sites

sabrown100, he's using the 3.20 alpha.

Please note, everything has changed for 3.20 in regards to complex effects--that is, effects that call other effects. The token structure has changed.

Share this post


Link to post
Share on other sites
sabrown100, he's using the 3.20 alpha.

Please note, everything has changed for 3.20 in regards to complex effects--that is, effects that call other effects. The token structure has changed.

I'll download that then - how can I update my effect to suit it?

Share this post


Link to post
Share on other sites

It doesn't work on the 3.20 Alpha version.

1 of 2
--------------
File: C:\Program Files\Paint.NET\Effects\GREYCstoration.dll
     Effect Name: GREYCstoration.BaseEffect
     Full error message: System.NullReferenceException: Object reference not set to an instance of an object.
  at PaintDotNet.Menus.EffectMenuBase.AddEffectsToMenu()

2 of 2
--------------
File: C:\Program Files\Paint.NET\Effects\EdHarvey.Effects.dll
     Effect Name: EdHarvey.Edfects.Effects.SurfaceBlurEffect
     Full error message: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'EdHarvey.Edfects.Effects.SurfaceBlurEffect'.  Assembly: 'EdHarvey.Effects, Version=1.0.2814.15670, Culture=neutral, PublicKeyToken=null'.

I used the plugin, it stayed at 0% for the whole time, I cancelled it, it told me to restart PDN, then I noticed the "view plugin error loads" thing, and it gave me the code above. Since your plug-in uses many effects, do they use GREYCstroration and surface blur (I doubt it, I'd have thought it would have showed the window that pops up for GREYCstoration)?

Share this post


Link to post
Share on other sites
It doesn't work on the 3.20 Alpha version.

1 of 2
--------------
File: C:\Program Files\Paint.NET\Effects\GREYCstoration.dll
     Effect Name: GREYCstoration.BaseEffect
     Full error message: System.NullReferenceException: Object reference not set to an instance of an object.
  at PaintDotNet.Menus.EffectMenuBase.AddEffectsToMenu()

2 of 2
--------------
File: C:\Program Files\Paint.NET\Effects\EdHarvey.Effects.dll
     Effect Name: EdHarvey.Edfects.Effects.SurfaceBlurEffect
     Full error message: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'EdHarvey.Edfects.Effects.SurfaceBlurEffect'.  Assembly: 'EdHarvey.Effects, Version=1.0.2814.15670, Culture=neutral, PublicKeyToken=null'.

I used the plugin, it stayed at 0% for the whole time, I cancelled it, it told me to restart PDN, then I noticed the "view plugin error loads" thing, and it gave me the code above. Since your plug-in uses many effects, do they use GREYCstroration and surface blur (I doubt it, I'd have thought it would have showed the window that pops up for GREYCstoration)?

It doesn't use either (but it does sepia - possibly the grey stroration thing). What version of PDN are you using?

Share this post


Link to post
Share on other sites

Blooper, the error message you posted shows what plugins failed to load on PDN's startup, which is irrelevant to plugins that crashed when running. When you get the dialog that tells you a plugin crashed, there's a separate button ("Error Details") that shows you details for that crash.

sabrown100, it looks like you invoke a brightness/contrast adjustment and pass a BrightnessAndContrastAdjustmentConfigToken. In 3.20, all of the effects were rewritten to use a PropertyBasedEffectConfigToken instead (thus giving a cast error).

Share this post


Link to post
Share on other sites
It doesn't work on the 3.20 Alpha version.

1 of 2
--------------
File: C:\Program Files\Paint.NET\Effects\GREYCstoration.dll
     Effect Name: GREYCstoration.BaseEffect
     Full error message: System.NullReferenceException: Object reference not set to an instance of an object.
  at PaintDotNet.Menus.EffectMenuBase.AddEffectsToMenu()

2 of 2
--------------
File: C:\Program Files\Paint.NET\Effects\EdHarvey.Effects.dll
     Effect Name: EdHarvey.Edfects.Effects.SurfaceBlurEffect
     Full error message: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'EdHarvey.Edfects.Effects.SurfaceBlurEffect'.  Assembly: 'EdHarvey.Effects, Version=1.0.2814.15670, Culture=neutral, PublicKeyToken=null'.

I used the plugin, it stayed at 0% for the whole time, I cancelled it, it told me to restart PDN, then I noticed the "view plugin error loads" thing, and it gave me the code above. Since your plug-in uses many effects, do they use GREYCstroration and surface blur (I doubt it, I'd have thought it would have showed the window that pops up for GREYCstoration)?

It doesn't, but for effects with parameters I can set the parameters without dialogs showing.

Share this post


Link to post
Share on other sites

I do understand now, thank you I like pi (my friend made a comic on that pun... :D). Anyhow, isn't this pretty much black and white, lower luminosity and higher contrast?

Share this post


Link to post
Share on other sites

Are you sure that you attached the proper version? It still does not work for me in 3.20.

I can see that:

DLL Version 1.0.0.0

Creation date 18.11.2007

Could you pls re-check it and update?

Share this post


Link to post
Share on other sites

Looks like there is a bug in the base Effect class. You can work around this for now by calling SetRenderInfo() before calling Render().

File: C:\Program Files\Paint.NET\Effects\FilmNoir.dll
     Effect Name: FilmNoir.EffectPlugin
     Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.InvalidOperationException: SetRenderInfo() was not called
  at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length)
  at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
  at FilmNoir.EffectPlugin.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
  at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction()
  --- End of inner exception stack trace ---
  at PaintDotNet.Effects.BackgroundEffectRenderer.Join()
  at PaintDotNet.Effects.BackgroundEffectRenderer.Abort()
  at PaintDotNet.Menus.EffectMenuBase.DoEffect(Effect effect, EffectConfigToken token, PdnRegion selectedRegion, PdnRegion regionToRender, Surface originalSurface, Exception& exception)

Share this post


Link to post
Share on other sites

I think you should put the version number and/or date in your topic title.

I also think you should just keep one version of the plugin in the first post; which do I download, 'FilmNoir Effect for Paint.NET 3.20 beta and higher updated' or 'Updated Plugin...'? Both sound as though they would work with the final 3.20, but which actually does? See the confusion that could be caused for some people? Especially for those who have not been following the discussion and so cannot ascertain which to choose - you have to make immediately clear which is to be used.

Share this post


Link to post
Share on other sites

I'd say so, too. Installing plugins doesn't take that long, and a lot of people would have antivirus problems with an installer.

Share this post


Link to post
Share on other sites
Can I just ask a question? Is adding an installer just a waste of time?

Absolutely, unless it's more complicated than your everyday Effect or Filetype plugin and requires files in other directories than Effects or FileTypes.

*coughhintcough*

Share this post


Link to post
Share on other sites

Let's just say he's going to be winning the Plugin Award in the "Best And Worst of Paint.NET" again next year. :-)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this