Jump to content

Film Noir Plugin - Updated for Paint.NET 3.20


Simon Brown

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.

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)?

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?

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).

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.

Link to post
Share on other sites
  • 3 weeks later...

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)

Link to post
Share on other sites
  • 3 weeks later...

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.

Link to post
Share on other sites
  • 2 weeks later...
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*

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...