julper Posted September 19 Share Posted September 19 (edited) I work with a lot of very large resolution images in PDN these days, both importing and exporting, some of which amount to at least a couple gigabytes for single-layer rasters. Recently, I've noticed opening a few choice images lead to these blocks of what looks like debug text popping up instead of the usual downscaled tiles from the work area's live preview. For what it's worth to anyone, these screenshots came from importing a 702MB .png file, scaled at 20400x28080px. I first noticed these curious tiles when I went and selected areas of the image to crop, as well as simple zooming in and out. I've also noticed that zooming seems to reset the tiles to display the selection of the image normally, though things tend to come up on occasion when I try to fiddle with cropping and such again. I've been using this program for about 10-15 years and this is the first time I've ever noticed such an oddity working on any machine. Despite everything I've said, this has had minimal issues on my actual workflow in the program, though I did have my web browser crash when I finalized the crop job, and the source file seems fine and wholly intact. Making a belated edit with basic info on the exact build I'm using, I suspect a lot of this is coming from me being on a beta currently, as well as the high resolution of these files in question. Application paint.net 5.1 (β 5.100.8986.33792) Build Date Thursday, August 8, 2024 Expiration Date Thursday, October 31, 2024 Install type Classic Language en-US Scaling 1.00x (96 DPI) UI/Canvas GPU True Rendering GPU 🚀 Performance (Intel Iris Xe Graphics) Advanced Color True Remote Session False Battery Saver False Animations True Translucent Windows True Windows Ink True OS Windows 10 Home x64 (10.0.19045.0) Runtime .NET 8.0.7 x64 Physical Memory 16,016 MB (5,689 MB free) Paging File 60,599 MB (10,688 MB free) CPU 13th Gen Intel(R) Core(TM) i9-13900H Speed ~2995 MHz Cores / Threads 14 / 20 Features SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2 Display 1 Name Generic PnP Monitor Connected to Intel(R) Iris(R) Xe Graphics Resolution 1920 x 1080, 8-bit, 60 Hz DPI 96 (1.00x scale) Coordinates (L=0, T=0, R=1920, B=1080) Advanced Color StandardDynamicRange SDR white level 80 nits Color space RgbFullGamma22NoneP709 Composition Support Fullscreen, Windowed Video Card Intel(R) Iris(R) Xe Graphics Hardware Acceleration Supported Performance Class Good Dedicated Video RAM 128 MB Dedicated System RAM 0 MB Shared System RAM 8,008 MB Driver Version 31.0.101.4255 Vendor ID 0x8086 Device ID 0xA7A0 Subsystem ID 0x17B31043 Revision 4 LUID 0x0000EDD0 Flags AcgCompatible, SupportMonitoredFences, KeyedMutexConformance Graphics Preemption TriangleBoundary Compute Preemption ThreadGroupBoundary Outputs 1 Feature Level Level_12_1 Features ComputeShadersEtc Maximum Bitmap Size 16384 Video Card Microsoft Basic Render Driver Hardware Acceleration N/A Performance Class VeryLow Dedicated Video RAM 0 MB Dedicated System RAM 0 MB Shared System RAM 8,008 MB Driver Version 10.0.19041.4355 Vendor ID 0x1414 Device ID 0x008C Subsystem ID 0x00000000 Revision 0 LUID 0x0000F17F Flags Software, AcgCompatible, SupportMonitoredFences, KeyedMutexConformance Graphics Preemption InstructionBoundary Compute Preemption InstructionBoundary Outputs 0 Feature Level Level_12_1 Features Doubles, ComputeShadersEtc Maximum Bitmap Size 8388608 Edited September 19 by julper added diagnostic info Quote Link to comment Share on other sites More sharing options...
Tactilis Posted September 19 Share Posted September 19 Physical Memory 16,016 MB (5,689 MB free) You have way too little RAM for the size of images you are trying to edit in paint.net plus the memory usage of all other apps that are running on your PC. From the debug message it looks as though paint.net is trying to allocate about 1GB of memory and is failing. 48 minutes ago, julper said: some of which amount to at least a couple gigabytes for single-layer rasters paint.net will require approx 4.7GB of virtual memory for a single layer image of 20400x20400 px. Do you have just one image open in paint.net, or multiple images? Paging File 60,599 MB (10,688 MB free) Due to insufficient physical RAM for the virtual memory requirement, your system is having to page out to and in from disk all the time. Performance is likely to poor. 48 minutes ago, julper said: though I did have my web browser crash when I finalized the crop job Likely due to Windows being out of memory. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 19 Share Posted September 19 This is actually a bug in the beta that I've been working on. I know exactly the problem and the fix. The canvas rendering engine is using waaaaaaaaaay too much memory when you zoom out a bunch. It's not your system. I'll be posting an updated build as soon as it's ready! Quote 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...
Tactilis Posted September 19 Share Posted September 19 3 hours ago, Rick Brewster said: This is actually a bug in the beta that I've been working on. I know exactly the problem and the fix. The canvas rendering engine is using waaaaaaaaaay too much memory when you zoom out a bunch. Oh, that's good to hear. With 5.1, will the previously used formula for VM per image of (Number of Layers + 2) * (Width * Height * 4) still apply? Or is the + 2 reduced by the reworking that you have been doing? 3 hours ago, Rick Brewster said: It's not your system. OK. But even with the problem fixed, at ~4.7GB per image, if @julper has just a few 20400x28080px images open, then taking into account the OS's and other apps' VM usage, they are going to bust their 16GB physical RAM and will be paging to disk. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 19 Share Posted September 19 5 hours ago, Tactilis said: With 5.1, will the previously used formula for VM per image of (Number of Layers + 2) * (Width * Height * 4) still apply? Or is the + 2 reduced by the reworking that you have been doing? It might be good to adjust it. You should remind me once 5.1 has been released. The +2 won't be a simple constant anymore (I don't think it has been since 4.0, in fact...) but we can probably figure out a simple enough heuristic. 1 Quote 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 19 Share Posted September 19 5 hours ago, Tactilis said: OK. But even with the problem fixed, at ~4.7GB per image, if @julper has just a few 20400x28080px images open, then taking into account the OS's and other apps' VM usage, they are going to bust their 16GB physical RAM and will be paging to disk. The problem in this case is that the tile cache is trying to allocate over a gigabyte just to store the pixels needed for rendering a single 128x128 tile that you see on screen. It's 128x128 after the zoom is applied, that is, meaning the source region is substantially larger. Their system has 14 cores / 20 threads, which means you have to multiply 1GB by somewhere between 14 and 20, meaning it's basically using up all of system memory just to draw anything on screen. It's just a bug, the buffering just needs to be much finger grained. I've already got it working, I'm just trying to find the time to finish it up, land it, and release a new build. 1 Quote 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 29 Share Posted September 29 Should be fixed now in v5.1 beta build 9038: Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.