Repository navigation
Closed
Labels
bugSomething isn't working
Description
Most appropriate sub-area of Processing 4?
PDE
Processing version
Processing 4.5.2 portable version (processing-4.5.2-windows-x64-portable.zip)
Operating system
Windows 10
Bug description
When a custom location for preferences.txt is defined in settings.txt:
- Processing creates a
preferences.txtin that directory but does not write to (update) that file. - Preference changes are written to the default preferences directory instead and are not used.
- Processing will use the custom
preferences.txtif it is manually edited.
Processing should write to (update) the configured custom preferences.txt location.
This works as expected in Processing 4.4.x
Steps to reproduce this
This is a custom environment on my system.
Steps to reproduce:
- Unzip
processing-4.5.2-windows-x64-portable.zipinto:
D:\Program_Portable\
This creates:D:\Program_Portable\Processing\ - Create this folder (must be created manually):
D:\Program_Portable\Processing\mypreferences\ - Create this file:
D:\Program_Portable\Processing\app\resources\lib\settings.txt - Put this single line into settings.txt:
settings.path=D:\Program_Portable\Processing\mypreferences - Launch Processing.
- Confirm it creates:
D:\Program_Portable\Processing\mypreferences\preferences.txt - Change any preference in the UI (example: Editor font size and Console font size).
- Close Processing.
- Check which file actually changed:
D:\Program_Portable\Processing\mypreferences\preferences.txt%APPDATA%\Processing\preferences.txt
Actual result:
- Processing creates
D:\Program_Portable\Processing\mypreferences\preferences.txt - Processing does not write preference changes to it.
- Preference changes are written to
%APPDATA%\Processing\preferences.txtinstead.
Expected result:
- Processing should read/write preferences using the folder specified by
settings.path. - You should see the Editor font size change in real time when modifying it with the scrollbar
Reference:
- https://discourse.processing.org/t/custom-location-for-preferences-txt-not-working-with-processing-4-5-2/47872
- https://github.com/processing/processing4/wiki/Preferences#sketchbook-and-settings-location
- https://github.com/processing/processing4/releases
Additional context
See Processing Discourse for additional context:
Would you like to work on the issue?
No, I’m just reporting the issue
Activity
avinxshKD commentedon Feb 16, 2026
I'd like to work on this, pls assign
SableRaf commentedon Feb 16, 2026
@avinxshKD Hey, thanks for wanting to help out again
Just a heads-up: as we discussed on #1433, commenting "please assign" without a proposed approach or investigation into the issue goes against our contribution guidelines which ask that you include a brief explanation of how you'd tackle the problem before requesting assignment.
I totally understand college keeps you busy. Just know that consistently skipping the process creates extra work for maintainers and isn't fair to other contributors either. Quality over quantity 😉
If you're interested in this issue, a great next step would be try reproducing the issue, dig into the codebase for the cause of the bug, and share your findings and proposed fix here. That kind of contribution is always welcome!
avinxshKD commentedon Feb 16, 2026
Hey @SableRaf, you're absolutely right and I apologize. I got caught up in the excitement of wanting to contribute and skipped the actual work. And yeah college has been hectic but that's no excuse for skipping the process. That's on me, so sorry
i looked into it and yeah it's broken. the new kotlin preferences code (Preferences.kt line 84) just calls Settings.getFolder() directly instead of checking if theres a settings override first. the old java version used to check Base.getSettingsOverride() before grabbing the default folder. so settings.txt gets read on startup but then preferences get saved to appdata anyway
fix should be pretty simple - justn check the override first:
val settingsFolder = Base.getSettingsOverride() ?: Settings.getFolder()can test it with the steps from the issue report if you want me to make a pr. will do the homework first next time, thanks
SableRaf commentedon Feb 17, 2026
@avinxshKD I have assigned you. I'll let @catilac comment on the proposed technical solution and next steps as this is outside of my area of competence 😌
catilac commentedon Feb 17, 2026
amazing thank you @SableRaf and @avinxshKD :) i'll be taking a look at the PR
avinxshKD commentedon Feb 18, 2026
hey super thanks, pr is ready you can review and
let me know if any adjustments needed, happy to