MediaInfo icon indicating copy to clipboard operation
MediaInfo copied to clipboard

[VCL GUI] When multiple files are opened, graphs for files other than the first are corrupt

Open cjee21 opened this issue 8 months ago • 11 comments

~Produced in GUI which uses MI->Inform(Pos) looping over MI->Count_Get()~ Due to displaying multiple SVG on the same HTML page because of the way Graphviz Cairo uses IDs for glyphs.

Image

cjee21 avatar Apr 12 '25 15:04 cjee21

Interesting observations:

  1. Result of opening test1.txt and test2.txt: Image

  2. If the same file is opened twice, there is no corruption on the 2nd graph.

cjee21 avatar Apr 12 '25 19:04 cjee21

Further tests found that this only happens when using svg:cairo.

cjee21 avatar Apr 13 '25 08:04 cjee21

I figured out what is going on now. There is no issue with MediaInfoLib or Graphviz. It is corrupt due to displaying two SVGs on the same HTML page.

cjee21 avatar Apr 13 '25 11:04 cjee21

It is corrupt due to displaying two SVGs on the same HTML page.

We didn't think to multiple files when we implemented the SVG & HTML code 😅.

JeromeMartinez avatar Apr 13 '25 12:04 JeromeMartinez

I got a solution now but it involves changing both GUI and Graph template code and I only tested it in WebView2.

cjee21 avatar Apr 13 '25 12:04 cjee21

I got a solution now but it involves changing both GUI and Graph template code and I only tested it in WebView2.

Fair enough, please go ahead then @g-maxime could have another view on it and fix other parts if needed. Your help is greatly appreciated.

JeromeMartinez avatar Apr 13 '25 12:04 JeromeMartinez

Works great in Qt GUI after some changes. However it is highly likely not going to work on VCL + IE because it is too modern / new.

Image

I'll make PRs anyway so your side can see what to do about it.

cjee21 avatar Apr 13 '25 13:04 cjee21

I think the above method is a no go. It is too modern. There will be issues with not only VCL version but with Linux distros using older Qt WebEngine. The other way is probably to only show one graph at a time and add a drop down selector to select which file to show.

cjee21 avatar Apr 13 '25 15:04 cjee21

The other way is probably to only show one graph at a time and add a drop down selector to select which file to show.

Actually it may be a better UI for graphs (graphs may be huge even for 1 file).

JeromeMartinez avatar Apr 13 '25 17:04 JeromeMartinez

Updated PR for Qt, now showing one graph at a time with selector:

Image

Current state of VCL one with two separate bugs:

Image

cjee21 avatar Apr 13 '25 17:04 cjee21

This is fixed for Qt GUI but VCL GUI still as shown in screenshot above. Issue should probably be moved to MediaInfo as it is on GUI side.

cjee21 avatar Apr 16 '25 11:04 cjee21