View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001559 | OpenMPT | General | public | 2022-01-30 17:48 | 2025-08-16 16:27 |
Reporter | Saga Musix | Assigned To | manx | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | acknowledged | Resolution | open | ||
Target Version | OpenMPT 1.33 / libopenmpt 0.9 (goals) | ||||
Summary | 0001559: Don't use WinAPI functions for INI reading/writing | ||||
Description | Currently OpenMPT uses
As a consequence of the first point, it's possible that one OpenMPT instance takes a long time to shut down, and a newly launched instance may not see the settings as saved by the previous instance. One particularly worrying example is the following scenario:
A custom INI implementation should avoid this scenario. While the file is being written, other OpenMPT instances should wait until the file is no longer locked, rather than reading incomplete settings. | ||||
Tags | No tags attached. | ||||
Has the bug occurred in previous versions? | |||||
Tested code revision (in case you know it) | |||||
I do not think this would be necessary. Atomically writing the file is the easier approach, because we do not (and do not want to, and cannot) guarantee settings consistency across different instances running concurrently anyway. Writing the file in 1 go should also be plenty fast enough to avoid the mentioned race condition. If the second instance is started while the first one is still actively running, there is not much we can do anyway, except for maybe flushing the configuration file after the welcome dialog (which would probably be a good idea even with the old implementation). There are a couple of open questions regarding our own implementation:
The INI implementation that I have in an older code base answers these questions as:
In case the answer to 3 is "no", we should use a different file name in order to not break downgrades completely. "OpenMPT.ini" would make sense here. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2022-01-30 17:48 | Saga Musix | New Issue | |
2022-01-30 17:51 | Saga Musix | Target Version | => OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) |
2022-10-22 13:45 | manx | Assigned To | => manx |
2022-10-22 13:45 | manx | Status | new => acknowledged |
2023-04-10 08:24 | manx | Target Version | OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) => OpenMPT 1.32.01.00 / libopenmpt 0.8.0 (upgrade first) |
2024-10-26 18:05 | manx | Target Version | OpenMPT 1.32.01.00 / libopenmpt 0.8.0 (upgrade first) => OpenMPT 1.33 / libopenmpt 0.9 (goals) |
2025-08-16 16:27 | manx | Note Added: 0006447 |