vivictorg / vivictpp

Vivict++ is an easy to use tool for subjective comparison of the visual quality of different encodings of the same video source.
GNU General Public License v2.0
78 stars 6 forks source link

imgui error #65

Open vludumu opened 3 days ago

vludumu commented 3 days ago

I can't launch vivictpp after compiling it under debian testing.

I use the system SDL and SDL_ttf, I can install them directly and I use the following command for vivictpp :

sudo apt --fix-missing install -y cmake python3-pip gcc python3-setuptools python3-wheel libfreetype6-dev libavformat-dev libavcodec-dev libavfilter-dev libswscale-dev pkg-config

git clone https://github.com/vivictorg/vivictpp.git
cd ./vivictpp
meson setup build
meson compile -C build

If I open a terminal inside build directory and run the following command : ./vivictpp /home/folder/file.mkv /home/folder/file_enco.mkv

I get this error :

vivictpp: ../imgui/imgui_draw.cpp:2068: ImFont ImFontAtlas::AddFont(const ImFontConfig): Assertion `font_cfg->SizePixels > 0.0f' failed.

By using the subproject for SDL and SDL_ttf, I need to install libsdl2-dev before running these commands :

sudo apt --fix-missing install -y cmake python3-pip gcc python3-setuptools python3-wheel libfreetype6-dev libavformat-dev libavcodec-dev libavfilter-dev libswscale-dev pkg-config

git clone https://github.com/vivictorg/vivictpp.git
cd ./vivictpp
meson setup -Duse_sdl2_subproject=true build
meson compile -C build

And I get the same error.

grusell commented 2 days ago

Could it be that you have some incorrect values for fontsize in $HOME/.config/vivictpp/vivictpp.toml ?

Otherwise, My best guess is something goes wrong here: https://github.com/vivictorg/vivictpp/blob/35ddd91e6ead94cd7e0591be17053901a3bfcf0c/include/ui/FontSize.hh#L29

Any chance you could try commenting out that block like below and see if it works better then?

/*
  if (dpiScaling) {
      float dpi;
      SDL_GetDisplayDPI(0, &dpi, nullptr, nullptr);
      dpiScaleFactor = dpi / REFERENCE_DPI;
    }
*/
vludumu commented 2 days ago

Thanks for the reply. I checked for files in $HOME/.config/vivictpp/ but the folder was empty.

I tried to compile with the suggested modification and it works. I am under a virtual machine, this maybe related.

grusell commented 2 days ago

Ah good to hear that the fix works at least. Will look into a real fix.

Can you give some details about the VM environment you are using, would help if I could eproduce the problem?

vludumu commented 2 days ago

It's running debian testing up to date. I will try to run this modification with a clean install out of the box, I have a save of it, just need to update.

vludumu commented 4 hours ago

OK, I tried several times but I couldn't make your fix working again and couldn't replicate the state I was in. Now it's hanging without opening the player, but I don't have the error. Without your fix I have the imgui error.

My system is currently : VirtualBox Version 6.1.50_Ubuntu r161033 Kernel: 6.11.2-amd64 arch: x86_64 bits: 64 compiler: gcc v: 14.2.0 clocksource: tsc Desktop: Cinnamon v: 6.0.4 tk: GTK v: 3.24.43 wm: Muffin v: 6.0.1 vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux trixie/sid

Do you need more information ?

Edit : I think I found the culprit, if I install libxext-dev, your fix is working again. And also, if I don't activate the 3D acceleration (with graphism controller VMSVGA), I have the following warnings :

libEGL warning: DRI3: Screen seems not DRI3 capable libEGL warning: DRI2: failed to authenticate libEGL warning: DRI3: Screen seems not DRI3 capable MESA: error: ZINK: failed to choose pdev libEGL warning: egl: failed to create dri2 screen

If it is activated, it works.