Jump to content

SpiroGraph (ymd:100725)


Recommended Posts

Hi, MadJik.

Cool plugin!

But I'm encounter with some bug that lead to crash PdN:

1) open "PdN";

2) "Rectangle select" about 400x400 (at full select works perfectly);

3) "SpiroGraph" > "Filled with gradient" > "Zoom" slider at "1" > crash PdN...

Here's the log:

This text file was created because Paint.NET crashed.

Please e-mail this file to paint.net@hotmail.com so we can diagnose and fix the problem.

Application version: Paint.NET v3.08 (Final Release build 3.08.2708.22795)

Time of crash: 27.07.2007 23:55:11

Application uptime: 00:04:36.0625000

OS Version: 5.1.2600.131072 Service Pack 2 Workstation x86

.NET Framework version: 2.0.50727.42 x86

Processor: 1x "Intel® Celeron® CPU 2.00GHz" @ ~2655MHz

Physical memory: 765 MB

Tablet PC: no

Locale: pdnr.c: ru-RU, hklm: ru-RU, hkcu: n/a, cc: ru-RU, cuic: ru-RU

Exception details:

PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.OutOfMemoryException: Out of memory.

at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Point point1, Point point2, Color color1, Color color2)

at PaintDotNet.Effects.SpiroGraph.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.Start()

at PaintDotNet.Menus.EffectMenuBase.EffectConfigTokenChangedHandler(Object sender, EventArgs e)

at PaintDotNet.Effects.EffectConfigDialog.OnEffectTokenChanged()

at PaintDotNet.Effects.EffectConfigDialog.FinishTokenUpdate()

at PaintDotNet.Effects.SpiroGraphConfigDialog.sAmount4_ValueChanged(Object sender, EventArgs e)

at System.Windows.Forms.TrackBar.OnScroll(EventArgs e)

at System.Windows.Forms.TrackBar.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Sorry for my English...

Link to comment
Share on other sites

Because of the way Paint.NET automatically multi-threads effects, finding the cause using a debugger is going to difficult... I would start with either:

  • [*:21599]rather than compiling against your installed copy of Paint.NET, add your project into Paint.NET's source solution and compile the whole thing together. That way, you'll have access to full debugging info, even if the crash happens within Paint.NET's code.
    [*:21599]Show us your source so we can help you :D

I've VS CSharp 2005 Express. Despitt, I can't install C++ from Express, download link is corrupted some how :(

@Alex555: Thank you, I thank you to have guided me the right way. I can reproduce it too!

@BoltBait: Thanks for the tip! I'm already doing this as some other of my plugins were crashing, now I'm testing a lot of things (like complicated cross-over XOR selections...) before publishing.

@all who want to know: I think PDN crashes because the gradient start point and end point are equals or too close (or somehow negative)...

I have to stop writing and to test my code...

Link to comment
Share on other sites

Bug fixed, download the file again!

Plugin SpiroGraph.dll

Here is the zip for the DLL

If the polygon is too small, gradient is replaced by normal fill! No seeable difference!

BTW I wasn't anymore able to reproduce the crash with this version...

I still strongly suggest you to save your work before using any plugin...

Link to comment
Share on other sites


Look at the first post of this topic for the lastest version of this plugin.


I wasn't happy with the way I solved the gradient bug... So I look at it again this morning and I find a better way.

To not let you re-downloading for a small change, I've added two 'bonus' options:

New version with slider for Gradient and checkbox for B&W lines.

Let's show your art now!

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...
  • 5 weeks later...

I have encountered the following error message when trying to use this plugin.

File: C:\Program Files\Paint.NET\Effects\SpiroGraph.dll

Effect Name: PaintDotNet.Effects.SpiroGraph

Full error message: System.InvalidCastException: Specified cast is not valid.

at PaintDotNet.Effects.SpiroGraphConfigDialog.InitTokenFromDialog()

at PaintDotNet.Effects.EffectConfigDialog.FinishTokenUpdate()

at PaintDotNet.Effects.SpiroGraphConfigDialog.sAmount1_ValueChanged(Object sender, EventArgs e)

at System.Windows.Forms.TrackBar.OnValueChanged(EventArgs e)

at System.Windows.Forms.TrackBar.set_Value(Int32 value)

at PaintDotNet.Effects.SpiroGraphConfigDialog.nAmount1_ValueChanged(Object sender, EventArgs e)

at System.Windows.Forms.NumericUpDown.OnValueChanged(EventArgs e)

at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)

at PaintDotNet.Effects.SpiroGraphConfigDialog.InitDialogFromToken(EffectConfigToken effectToken)

at PaintDotNet.Effects.EffectConfigDialog.InitDialogFromToken()

at PaintDotNet.Effects.EffectConfigDialog.set_EffectToken(EffectConfigToken value)

at PaintDotNet.Menus.EffectMenuBase.RunEffect(Type effectType)

Link to comment
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.

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.


  • Create New...