libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.05k stars 1.81k forks source link

[Config] Regression with debug build. #7844

Closed orbea closed 5 years ago

orbea commented 5 years ago

Description

When running a debug build of RetroArch it will now print this.

$ ./retroarch
[INFO] [Config]: Loading default config.
[INFO] [Config]: loading config from: (null).
[INFO] Looking for config in: "/home/orbea/.config/retroarch/retroarch.cfg".

Full log - https://pastebin.com/wup8CVMG

And for reference a full log with the previous good commit.

https://pastebin.com/VfyegbWQ

And the diff.

--- retro.log.old       2018-12-30 10:31:15.442656541 -0800
+++ retro.log.new       2018-12-30 10:32:21.764211039 -0800
@@ -1,9 +1,12 @@
-[INFO] RetroArch 1.7.5 (Git 671b49afcd)
+[INFO] [Config]: Loading default config.
+[INFO] [Config]: loading config from: (null).
+[INFO] Looking for config in: "/home/orbea/.config/retroarch/retroarch.cfg".
+[INFO] RetroArch 1.7.5 (Git d24c7d76d5)
 [INFO] === Build =======================================
 Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES 
 Built: Dec 30 2018
 [INFO] Version: 1.7.5
-[INFO] Git: 671b49afcd
+[INFO] Git: d24c7d76d5
 [INFO] =================================================
 [INFO] Environ SET_PIXEL_FORMAT: RGB565.
 [INFO] Redirecting save file to "/media/data/home/games/roms/.saves/retroarch/.srm".
@@ -79,8 +82,8 @@
 [INFO] [udev]: Pad #0 (/dev/input/event22) supports 16 force feedback effects.
 [INFO] [Autoconf]: 271 profiles found.
 [INFO] [Joypad]: Found joypad driver: "udev".
-[INFO] [Font]: Using font rendering backend: freetype.
 [INFO] [autoconf]: selected configuration: /home/orbea/.config/retroarch/autoconfig/udev/Sony-PlayStation3-DualShock3-Controller-USB.cfg
+[INFO] [Font]: Using font rendering backend: freetype.
 [INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
 [INFO] [Video]: Found display server: x11
 [INFO] Found shader "/home/orbea/.config/retroarch/shaders/retroarch.glslp"
@@ -91,7 +94,7 @@
 [INFO] [Menu]: Found menu display driver: "gl".
 [INFO] [Font]: Using font rendering backend: freetype.
 [INFO] [Font]: Using font rendering backend: freetype.
-[INFO] [LED]: LED driver = 'null' 0xeca780
+[INFO] [LED]: LED driver = 'null' 0xec9780
 [INFO] [MIDI]: Initializing ...
 [INFO] [MIDI]: Input disabled.
 [INFO] [MIDI]: Output disabled.

I have not noticed any visible regressions in RetroArch, but its very possible I am not looking at the right places.

Expected behavior

No output should be printed.

Actual behavior

$ ./retroarch
[INFO] [Config]: Loading default config.
[INFO] [Config]: loading config from: (null).
[INFO] Looking for config in: "/home/orbea/.config/retroarch/retroarch.cfg".

Steps to reproduce the bug

  1. ./configure
  2. make DEBUG=1
  3. ./retroarch

Bisect Results

commit b201d669b5ea1470bb239036aa944342a0591a95
Author: krzys-h <krzys_h@interia.pl>
Date:   Fri Dec 28 12:41:38 2018 +0100

    First iteration of UWP support

    Enough to kind of run

    Working drivers: xinput, d3d11
    Still missing: input driver with keyboard support, audio driver

:100644 100644 a94c292b126c11d1582fbe223eff9a8e26522653 4863d9b0fbc22909f14e8e8df0a02b5d2fa97da2 M  AUTHORS.h
:100644 100644 871a7cc7b602a2b135dca8dd9c46a23093631660 7ab65f20d9d2dfaff7d15a4f371b835a24cd0b8a M  configuration.c
:100644 100644 049aad788337e63b7ae783297859a4ca6a535911 89bcc8f1c7d6bab1942fb1df31b57605775984da M  dynamic.c
:040000 040000 905ba9f6bfc6993d4e81501d0eb42ffbb2c8e0fb 82b17684751c1cb1d9a7ac06756f1cbd0adc7d6c M  frontend
:040000 040000 60698ae29c6623f029a229a7c683607340d3b027 6b6ee4d5f8d46de445d39c5edcbad046f09dd9cc M  gfx
:040000 040000 7d3fc98feee6f99f4d4c79e47beb1571fd0f186e d65e4e511264e6090d798d3f0b270f1fd19e2d62 M  griffin
:040000 040000 eaa32afc8c516242b71161972bd14ae2534e3aa5 2b73fd50c20857a3714a8259275850a4eb9df849 M  input
:040000 040000 14cb8cb29869aceae74bd6a7b0f289c0b45bcc61 9a0f2c2703ad56e0e08b58631e4032bc75abbecf M  libretro-common
:040000 040000 ce0e40efee2a9c90eeb78c52b93b1a1f6a6229a1 ba0a61c8c043d6a6ba420ccf92e0790e0a3ad795 M  menu
:040000 040000 699d2dbc17954cf2d2a8db4fceac8c9940bcc412 f079f04bec8e08b3e4b4a4ea4afaef47a958f61b M  pkg
:040000 040000 a56c0fe105a1b406d541bbf0cbec418f0dcde835 516f5b3a63ec99de67185447bfc0724ac675b595 M  ui
:000000 040000 0000000000000000000000000000000000000000 776cf71c78144433171ded7c06884506542d5fc5 A  uwp
:100644 100644 9db900e8e4078d5977a09258bcaff68603fd4f18 7a9cfccbd5ea89c5f94faa31e2c44711571d9274 M  verbosity.ccommit b201d669b5ea1470bb239036aa944342a0591a95

b201d669b5ea1470bb239036aa944342a0591a95

Version/Commit

You can find this information under Information/System Information

Environment information

orbea commented 5 years ago

@krzys-h Can you take a look at this?

orbea commented 5 years ago

@krzys-h After looking at that commit for a while I spotted the problem...

diff --git a/verbosity.c b/verbosity.c
index 7a9cfccbd5..e9b9d2269d 100644
--- a/verbosity.c
+++ b/verbosity.c
@@ -65,11 +65,7 @@
  * will write to this file. */
 static FILE *log_file_fp         = NULL;
 static void* log_file_buf        = NULL;
-#if _DEBUG
-static bool main_verbosity       = true;
-#else
 static bool main_verbosity       = false;
-#endif
 static bool log_file_initialized = false;

 #ifdef NXLINK

On non-console platforms verbosity should only be turned on with retroarch --verbose or by turning it on in the menu settings. What were you trying to achieve here?

krzys-h commented 5 years ago

These log messages already existed but they are printed before the config file and command line parameters are loaded, meaning they never appear otherwise - and I needed them to debug why my config file was not loading properly. Perhaps changing this globally was not the best idea but to be honest, I forgot I even did this.

orbea commented 5 years ago

Would you mind if I changed it back so its not set globally?

krzys-h commented 5 years ago

Sure, feel free to change it back. I needed it only for a while and probably would have reverted it myself if I remembered.

Logging messages that are never outputted anywhere make no sense though.

orbea commented 5 years ago

Logging messages that are never outputted anywhere make no sense though.

I fully agree, maybe they should be refactored to appear after the cli is initialized? However that change is more involved and out of scope of this issue report. :)