View Issue Details

IDProjectCategoryView StatusLast Update
0001559OpenMPTGeneralpublic2023-04-10 08:24
ReporterSaga Musix Assigned Tomanx  
PrioritynormalSeverityminorReproducibilityN/A
Status acknowledgedResolutionopen 
Target VersionOpenMPT 1.32 / libopenmpt 0.8 (goals) 
Summary0001559: Don't use WinAPI functions for INI reading/writing
Description

Currently OpenMPT uses ReadPrivateProfile* / WritePrivateProfile*functions provided by Windows for reading and writing its settings files. This has several issues

  • It's relatively slow, which is why we only write setting that we know have changed
  • It requires hacks to enforce writing unicode files

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:

  1. Fresh OpenMPT installation, user sees the Welcome dialog and unchecks automatic update checks
  2. User closes OpenMPT. This is the first time the INI file is written, so it takes quite a while to write out all settings.
  3. User immediately reopens OpenMPT. It may now try to search for updates because the old instance might not have finished writing the settings yet.

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.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

There are no notes attached to this issue.

Issue History

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 / libopenmpt 0.8 (goals)