Rick Brewster Posted September 3, 2021 Share Posted September 3, 2021 As it turns out, the plugin loading error that @AndrewDavid reported with build 7906 was caused by a much deeper issue in the plugin loading system. I've significantly rewritten how plugins are loaded and the result is a much more robust and performant system. I've also greatly optimized the memory usage when custom shapes are installed. Previously, the declarative XAML would result in possibly hundreds of thousands of small boxed objects on the heap (floats, points, etc.) due to how the WPF-based object model. Now the shapes are compiled to a Direct2D-compatible format, reducing the memory used and the number of objects littering the heap (instead of 100's of thousands, now maybe just a few thousand). I was actually seeing jumps and spikes in paintbrush drawings, presumably due to added GC stress, and this now seems to be eliminated. Lastly, you can now specify additional directories to load plugins from, which means you can use something like OneDrive to host your plugins which will then be sync'd to all of your systems. For security reasons you must edit some registry entries to enable this feature. See here for more details. I think we're finally in the home stretch for 4.3! Get the update To get this update, make sure you have "Also check for pre-release (beta) versions" enabled in Settings, and then click on the Check Now button. (Unfortunately alpha/beta releases are not currently available for the Microsoft Store version of the app). Direct download links: Installer Any CPU (x64, x86, ARM64): https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.install.anycpu.web.zip Portable ZIPs Intel/AMD 64-bit (x64): https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.portable.x64.scd.aot.zip Intel/AMD 32-bit (x86): https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.portable.x86.scd.aot.zip ARM64: https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.portable.arm64.scd.aot.zip Installer (offline) Intel/AMD 64-bit (x64): https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.install.x64.scd.aot.zip Intel/AMD 32-bit (x86): https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.install.x86.scd.aot.zip ARM64: https://www.getpaint.net/files/zip/test/paint.net.4.300.7916.4874.install.arm64.scd.aot.zip Note that the offline installer may still need to download some prerequisites if you're on a Windows 7 or 8.1 machine that is not up-to-date via Windows Update. You do not need to have .NET installed, as these builds use self-contained deployment. Changes since 4.3 alpha build 7906: New: Additional directories can now be specified for plugin discovery, which enables the use of OneDrive for storing plugins. See here for more info: https://forums.getpaint.net/topic/118583-feature-request-set-custom-app-files-plugins-folder/?do=findComment&comment=586013 Note that this does not work with the portable version of the app, but you can install plugins next to the app so it isn't necessary. Optimized memory use when custom shapes are installed so they don't litter the heap with hundreds of thousands of boxed value types (e.g. floats and points) Fixed a whole bunch of issues related to plugin loading, such as random OptionBasedLibrary-based plugins not loading (race condition in the loader) Optimized the performance of plugin loading to prioritize "expensive" plugins so they don't extend the critical path any more than necessary Changed: FileType.IsReflexive() is now deprecated via [Obsolete], and is no longer honored. However, the Save Configuration dialog will no longer try to generate previews for FileTypes that do not specify any file extensions for loading, which is what this method was mostly being used for. Enjoy! The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
null54 Posted September 3, 2021 Share Posted September 3, 2021 2 hours ago, Rick Brewster said: ...FileTypes that do not specify any file extensions for saving... That should be: FileTypes that do not specify any file extensions for loading. 1 Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2021 Author Share Posted September 3, 2021 58 minutes ago, null54 said: That should be: FileTypes that do not specify any file extensions for loading. Thanks, fixed The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 3, 2021 Share Posted September 3, 2021 @Rick Brewster Open any image Reduce transparency to 50% by Adjustments/Transparency (Boltbait's plugin) Set brush size to 20 /100% Hardness Color Black 0,0,0,255 See what happens; 2 things outside 20 diameter maybe 90% erasure. quick fix I'm sure Link to comment Share on other sites More sharing options...
BDP Posted September 3, 2021 Share Posted September 3, 2021 Just updated to this latest version. Not showing any plugin errors, but when I activate the Plugin Browser, it bombs. I use this plugin an awful lot, as I still need a heads-up to understand which plugin is best to use for my purposes, and where it sits Brian Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 3, 2021 Share Posted September 3, 2021 Confirmed Spoiler Exception details: System.ArgumentException: The path is empty. (Parameter 'path') at System.IO.Path.GetFullPath(String path) at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) at PlugInData.PluginInfo..ctor(IEffectInfo effectInfo, Int32 index) at PlugInData.PluginInfoCollection..ctor(IEnumerable`1 effectInfos) at PlugInData.PBDialog.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at PaintDotNet.PdnBaseForm.WndProc(Message& m) in D:\src\pdn\src\Core\PdnBaseForm.cs:line 1949 at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) Link to comment Share on other sites More sharing options...
toe_head2001 Posted September 3, 2021 Share Posted September 3, 2021 On shimmed plugins, IEffectInfo.AssemblyLocation returns an empty string. 1 (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2021 Author Share Posted September 3, 2021 4 hours ago, BDP said: Just updated to this latest version. Not showing any plugin errors, but when I activate the Plugin Browser, it bombs. I use this plugin an awful lot, as I still need a heads-up to understand which plugin is best to use for my purposes, and where it sits Brian Should be an easy fix, @toe_head2001 pointed out the problem. Not sure why that's happening though 🤔 I should be able to get a fixed build out later today. The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2021 Author Share Posted September 3, 2021 12 hours ago, AndrewDavid said: @Rick Brewster Open any image Reduce transparency to 50% by Adjustments/Transparency (Boltbait's plugin) Set brush size to 20 /100% Hardness Color Black 0,0,0,255 See what happens; 2 things outside 20 diameter maybe 90% erasure. quick fix I'm sure I can barely see anything in that screenshot/picture, but I'm able to recreate a whole bunch of weird looking stuff with the brush tool. Doesn't seem evident at small sizes, but at larger sizes it's pretty chaotic. I'll get it fixed asap. Seems related to the same optimization that affects Shapes stuff. The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2021 Author Share Posted September 3, 2021 Okay I've fixed both of the issues reported in this thread Simple stuff, easy to miss, and thankfully easy to fix too. The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
AndrewDavid Posted September 3, 2021 Share Posted September 3, 2021 As I am seeing. Little things create big problems. Programming is no easy task. Link to comment Share on other sites More sharing options...
BoltBait Posted September 3, 2021 Share Posted September 3, 2021 1 hour ago, AndrewDavid said: Programming is no easy task. pro·gram·ming /prō'ˌɡram iNG/ 1. A pastime similar to banging one's head against a wall, but with fewer opportunities for reward. 2. Similar to solving a Rubix Cube starting with a blank sheet of paper. 3. The most amount of fun you can have with your clothes on. 4. The least amount of fun you can have with your clothes off. 1 Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2021 Author Share Posted September 3, 2021 @_koh_ I fixed the issue with the Magic Wand that you reported here https://forums.getpaint.net/topic/118565-paintnet-43-alpha-build-7906/?do=findComment&comment=585879 There's actually some work I should do here to improve how tolerance values are interpreted, but not for today. The low end of the tolerance scale has a lot of values that produce the same results, which is not ideal. (i.o.w. tolerance values 0% through 4% are all effectively the same, then 5% - 7% are the same, and so on) 1 The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 3, 2021 Author Share Posted September 3, 2021 New build should fix the 3 bugs that were reported: The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts