[Scummvm-tracker] [ScummVM :: Bugs] #15374: ANDROID: Log Debug level is reset when force closing the app

ScummVM :: Bugs trac at scummvm.org
Sun Sep 22 11:50:35 UTC 2024


#15374: ANDROID: Log Debug level is reset when force closing the app
-----------------------+----------------------------
Reporter:  antoniou79  |       Owner:  (none)
    Type:  defect      |      Status:  new
Priority:  normal      |   Component:  Port: Android
 Version:              |  Resolution:
Keywords:              |        Game:
-----------------------+----------------------------
Comment (by antoniou79):

 With respect to the specific issue of this ticket (loss of Debug level
 setting), it looks like the intended behavior is actually that the Debug
 level is **not** saved in the ScummVM configuration file.

 For example on Windows (tested with a 2.9.0git build from latest master
 HEAD) no corresponding key-value is written to scummvm.ini after applying
 the change via the Launcher GUI nor after exiting ScummVM, and the value
 is reset to "None" upon relaunch. This is also confirmed by looking at our
 source code and how gDebugLevel is initialized/updated but never stored to
 ConfMan (although there's some (maybe remnant) code that checks for
 ConfMan's "debuglevel" here:
 https://github.com/scummvm/scummvm/blob/d7a6701a66c66578539c4010f3ca9df1bd40d5f5/base/main.cpp#L475

 I've still have not investigated thoroughly why Android specifically keeps
 the set value if the user quits ScummVM properly (via Quit from the
 launcher). I can confirm though that the scummvm.ini file on Android
 remains unchanged (no key-value is added nor updated) when applying the
 debug level change from the GUI or when subsequently quitting ScummVM.

 Maybe the gDebugLevel is cached by the Android System because its a
 variable with global scope?
 See:
 https://github.com/scummvm/scummvm/blob/d7a6701a66c66578539c4010f3ca9df1bd40d5f5/common/debug.h#L149
 and:
 https://github.com/scummvm/scummvm/blob/d7a6701a66c66578539c4010f3ca9df1bd40d5f5/common/debug.cpp#L31

 Also might be relevant: For a brief period and specific debug purposes, we
 used to explicitly override and set the gDebugLevel in the android.cpp's
 initBackend() as shown by this commit change:
 https://github.com/scummvm/scummvm/commit/67743660cac#diff-
 d112ba6d5371b6b878f86ddd82035bd646f53e85e0a2cc5164233b36f009c11d
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15374#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list