You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] - Gradient adjustment causes crash with large black canvas #726
When I was trying to create my own gradient in a new document, with other documents open, Photodemon crashed. This is a repeatable crash without other documents open. The steps are below.
How can I reproduce the bug?
click photo demon shortcut
dont restore
click new document (25x25 inches and 300 ppiblack)
Go to gradient
Click gradient and move cursor to create own gradient
Photodemon crashes
Expected behavior
I have created my own gradients before, so I expected to be able to create my own color gradients in a new document on a black background as the base.
I have caused this same crash to happen with a canvas size of 15x15 in and white as well when I tried to operate the gradient in addition to the original bug I reported.
Hello @rcchadburn . Thank you for filing this bug report! I apologize for PhotoDemon crashing on you. (Thank you also for attaching debug logs - it helps a ton.)
I have tried to recreate the problem here but can't trigger a crash, so let's diagnose two possibilities.
To eliminate the most obvious possibility - this being an out of memory issue - what happens if you attempt the above steps on a smaller image, like a 25" x 25" image at 200 DPI, or a 25" x 25" image at 100 DPI. (DPI is the critical setting here, as it has the largest impact on image size.) Do either of those work successfully?
Does this crash also happen with the built-in PhotoDemon gradients, or only one(s) you've created? If it's the latter, can you attach the responsible gradient file(s) to this issue? (In the Gradient Editor > gradient collection window, there should be a clickable link at the bottom that will open the folder with all your saved gradients. The one(s) you've created should appear there as separate file(s), each in .svg format.)
Thank you in advance for any further help you can provide.
When I try to access the gradient at all now, it crashes, and I am unsure as to why. I will probably try to experiment further with this in the next couple of days.
I did a complicated select recently and crashed it when I tried to move on past the select phase of what I was doing. If I can repeat it in the morning, I may submit a separate ticket for it.
Hi, I think I faced the exact same problem and brute-force solved it by deleting corrupt settings.
Here's what I found. A few weeks ago I tinkered with custom gradient creation (Gradient editor window -> edit this gradient).
I didn't need the gradients function for a while, but when I eventually tried to use it again, I found that whenever I tried to access the "Gradient editor" window (via the Fill or Gradient tools), the "Gradient editor" window would flash briefly with what seemed to be the last settings I used in the past (noise gradients), and then the program crashes.
Because of this, the gradient was impossible to customize.
At this point I thought there were broken settings. I downloaded a fresh copy of the program, and of course it was working fine. I compared the fresh "PhotoDemon_settings.xml" with the one from my old installation. Nothing remotely related to gradients there.
Then I went through the program directories and found that settings for many tools are stored in separate XML files in the "PhotoDemon Directory\Data\Presets" directory.
I deleted the "dialog_GradientEditor.xml" file. Problem solved, the program doesn't crash anymore. I guess there were some corrupt settings.
Unfortunately, I can't provide the corrupt file for examination, since I deleted it. I suggest @rcchadburn keep his corrupt copy of the settings file and provide it to the dev, if requested.
TLDR: Delete the corrupt settings file for the Gradient editor, located at:
PhotoDemon Directory\Data\Presets\dialog_GradientEditor.xml
I've just pushed a new nightly build with fixes for a potential crash when the gradient dialog is first loaded, if the last-used settings involved a noise gradient. Thank you to @marsa47 for pointing me in this direction! If you encounter any other problems with the gradient tool, please let me know and I'll dive deeper.
For testing purposes (on 2025.12), yesterday I played around with all the settings in the "noise gradient" tab, then went back to the image and applied the customized gradient (up to that point, everything was OK). But when I clicked the Gradient tool on the toolbar again, the program crashed. As you pointed out, it looks like the last-used "noise gradient" tab was the culprit.
At that point I once again had a "broken" dialog_GradientEditor.xml, so I could test it with the latest nightly build. I downloaded a fresh install (2026.1 alpha, build 68) and transplanted the corrupt settings. This time, the program does not crash, and the gradient settings load correctly, including noise gradients.
Thank you so much for the follow-up information, @marsa47 ! I'm happy the fix worked. I'm sorry I didn't find and fix this problem sooner.
@rcchadburn - in my estimation, your original crash still seems most likely to be a memory limitation. I am going to close this issue for now as the most pressing (and repeatable) issue has been solved, but if you can return and help me do additional testing on your situation, I would love to re-open the issue and investigate further. Thank you!
Activity
rcchadburn commentedon Dec 19, 2025
I have caused this same crash to happen with a canvas size of 15x15 in and white as well when I tried to operate the gradient in addition to the original bug I reported.
tannerhelland commentedon Dec 19, 2025
Hello @rcchadburn . Thank you for filing this bug report! I apologize for PhotoDemon crashing on you. (Thank you also for attaching debug logs - it helps a ton.)
I have tried to recreate the problem here but can't trigger a crash, so let's diagnose two possibilities.
To eliminate the most obvious possibility - this being an
out of memoryissue - what happens if you attempt the above steps on a smaller image, like a 25" x 25" image at 200 DPI, or a 25" x 25" image at 100 DPI. (DPI is the critical setting here, as it has the largest impact on image size.) Do either of those work successfully?Does this crash also happen with the built-in PhotoDemon gradients, or only one(s) you've created? If it's the latter, can you attach the responsible gradient file(s) to this issue? (In the
Gradient Editor > gradient collectionwindow, there should be a clickable link at the bottom that will open the folder with all your saved gradients. The one(s) you've created should appear there as separate file(s), each in .svg format.)Thank you in advance for any further help you can provide.
rcchadburn commentedon Dec 21, 2025
When I try to access the gradient at all now, it crashes, and I am unsure as to why. I will probably try to experiment further with this in the next couple of days.
I did a complicated select recently and crashed it when I tried to move on past the select phase of what I was doing. If I can repeat it in the morning, I may submit a separate ticket for it.
marsa47 commentedon Jan 25, 2026
Hi, I think I faced the exact same problem and brute-force solved it by deleting corrupt settings.
Here's what I found. A few weeks ago I tinkered with custom gradient creation (Gradient editor window -> edit this gradient).
I didn't need the gradients function for a while, but when I eventually tried to use it again, I found that whenever I tried to access the "Gradient editor" window (via the Fill or Gradient tools), the "Gradient editor" window would flash briefly with what seemed to be the last settings I used in the past (noise gradients), and then the program crashes.
Because of this, the gradient was impossible to customize.
At this point I thought there were broken settings. I downloaded a fresh copy of the program, and of course it was working fine. I compared the fresh "PhotoDemon_settings.xml" with the one from my old installation. Nothing remotely related to gradients there.
Then I went through the program directories and found that settings for many tools are stored in separate XML files in the "PhotoDemon Directory\Data\Presets" directory.
I deleted the "dialog_GradientEditor.xml" file. Problem solved, the program doesn't crash anymore. I guess there were some corrupt settings.
Unfortunately, I can't provide the corrupt file for examination, since I deleted it. I suggest @rcchadburn keep his corrupt copy of the settings file and provide it to the dev, if requested.
TLDR: Delete the corrupt settings file for the Gradient editor, located at:
PhotoDemon Directory\Data\Presets\dialog_GradientEditor.xml
tannerhelland commentedon Jan 26, 2026
Thank you for sharing your experience, @marsa47 ! This gives me something concrete to investigate.
(I tried and failed to replicate the original bug report, and a lack of follow-up information made it hard for me to continue.)
I will write some new tests against the gradient editor storage file, and see if I can solve this problem once and for all.
If you do encounter another problem with the gradient tool, please share your
\Data\Presets\dialog_GradientEditor.xmlfile here. Thank you!Gradient tool: fix potential crash when initiating dialog
tannerhelland commentedon Jan 26, 2026
I've just pushed a new nightly build with fixes for a potential crash when the gradient dialog is first loaded, if the last-used settings involved a noise gradient. Thank you to @marsa47 for pointing me in this direction! If you encounter any other problems with the gradient tool, please let me know and I'll dive deeper.
marsa47 commentedon Jan 27, 2026
Great news, looks like you solved the problem!
For testing purposes (on 2025.12), yesterday I played around with all the settings in the "noise gradient" tab, then went back to the image and applied the customized gradient (up to that point, everything was OK). But when I clicked the Gradient tool on the toolbar again, the program crashed. As you pointed out, it looks like the last-used "noise gradient" tab was the culprit.
At that point I once again had a "broken" dialog_GradientEditor.xml, so I could test it with the latest nightly build. I downloaded a fresh install (2026.1 alpha, build 68) and transplanted the corrupt settings. This time, the program does not crash, and the gradient settings load correctly, including noise gradients.
tannerhelland commentedon Jan 27, 2026
Thank you so much for the follow-up information, @marsa47 ! I'm happy the fix worked. I'm sorry I didn't find and fix this problem sooner.
@rcchadburn - in my estimation, your original crash still seems most likely to be a memory limitation. I am going to close this issue for now as the most pressing (and repeatable) issue has been solved, but if you can return and help me do additional testing on your situation, I would love to re-open the issue and investigate further. Thank you!