TechnoRobbo

TR's Distort This! - Plugin V2.7.4 (Mar 6th, 2016)

130 posts in this topic

On 2/8/2017 at 7:09 PM, Red ochre said:

It could crash if you're moving the controls too much and not letting it 'catch up'.

It could, but it really shouldn't.

In the coming days, I'm going to have a close look at the code, and see what's going on there.

 

 

EDIT: I spent about 30 minutes trying to get it to crash, and I was unsuccessful.

If I can't get it to crash, I can't know where the issue is in the code. It's like a needle in a haystack.

Edited by toe_head2001
0

Share this post


Link to post
Share on other sites

I opened it for the first time on the latest version of paint.net, opened an image with skewed tiles, and dragged the borders to one of the tiles. I clicked "set working area". The handles reset to full. I tried grabbing the left-top handle and dragging it. While I was dragging it, all four handles seemed to have moved to the top right of the image (with some distance between each other; not all in a bunch). It crashed shortly thereafter with this error.
--------------------------------------------------------------------------------------------------------------------

File: C:\Program Files\PaintDotNet\Effects\DistortThis.dll
      Name: TRsDistortThis.EffectPlugin
      Version: 2.7.4.31014
      Author: TechnoRobbo
      Copyright: Copyright 2013 © TechnoRobbo
      Website: http://www.technorobbo.com/
      Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: must be positive
Parameter name: height:Int32=-3
   --- End of inner exception stack trace ---
   at PaintDotNet.Diagnostics.ValidationExtensions.ThrowValidationException(Validation validation) in D:\src\pdn\src\Base\Diagnostics\ValidationExtensions.cs:line 955
   at PaintDotNet.Surface..ctor(Int32 width, Int32 height, SurfaceCreationFlags surfaceCreationFlags) in D:\src\pdn\src\Core\Surface.cs:line 221
   at TRsDistortThis.EffectPlugin.myRender(Surface dst, Surface src, Rectangle rect)
   at TRsDistortThis.EffectPlugin.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
   at PaintDotNet.Effects.BackgroundEffectRenderer.RenderWithClipMask(Effect effect, EffectConfigToken token, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, IRenderer`1 clipMaskRenderer) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 169
   at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.RenderTile(EffectConfigToken token, Int32 tileIndex) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 149
   at PaintDotNet.Effects.BackgroundEffectRenderer.RendererContext.RenderNextTile(EffectConfigToken token) in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 141
   at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 238
   --- End of inner exception stack trace ---
   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 418
   at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 374
   at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 320
   at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass42_3.<RunEffectImpl>b__2() in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 953
 

0

Share this post


Link to post
Share on other sites

Unfortunately @TechnoRobbo no longer frequents this forum. I doubt there will be a fix for this.

0

Share this post


Link to post
Share on other sites
2 hours ago, AnthonyScoffler said:

I opened it for the first time on the latest version of paint.net, opened an image with skewed tiles, and dragged the borders to one of the tiles. I clicked "set working area". The handles reset to full. I tried grabbing the left-top handle and dragging it. While I was dragging it, all four handles seemed to have moved to the top right of the image (with some distance between each other; not all in a bunch). It crashed shortly thereafter with this error.

Thanks for the repo steps. I was able to get it to crash.

 

TL;DR: Here's the bug-fix release: :RightArrowBlue:  DistortThis.zip (v2.7.5)

 

Here's what was happening. If you released the button on your mouse too soon, the 'Work Area' would have a Width and Height of 0, and in turn, the effect would try to create a Surface with a size of 0. Crash!

I've added a check to ensure the 'Work Area' has a proper size. If it does not, the plugin will allow you to try again.

Code Change: https://github.com/toehead2001/pdn-tr-distort-this/commit/d4371e9fd04c9da780ff47891c0f9584dd1aa2ee

 

 

Hopefully TR will return to the forum in the near future.

3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now