progrium / env86

Embeddable v86 virtual machines
MIT License
31 stars 0 forks source link

Console not rendering properly on a Webkit window [Linux] #4

Open gysddn opened 1 week ago

gysddn commented 1 week ago

This is a new issue, that I believe arrived from a recent upgrade of libraries, that causes the console to not render properly on a WebKit window.

Here is side by side with firefox:

image

It happens both on main which worked perfectly normal before, as well as on purego.

Console does not have any error messages, so not an immediate guess on what causes it 🤷🏻‍♂️

progrium commented 1 week ago

So in that screenshot, on the left is Firefox and on the right is a Webkit window with GTK? Can you put into words how its not rendering properly? I can see a prompt but in the middle of the screen, so is maybe the top of the screen not rendering? Did it cold boot to that prompt? How did it look going through the boot process?

gysddn commented 1 week ago

So in that screenshot, on the left is Firefox and on the right is a Webkit window with GTK? Can you put into words how its not rendering properly? I can see a prompt but in the middle of the screen, so is maybe the top of the screen not rendering? Did it cold boot to that prompt? How did it look going through the boot process?

Correct, left is Firefox and right is WebKitGtk window.

Here is how it goes when it window loads: env86

And when I try to enter commands: env2

gysddn commented 1 week ago

Another update, I tried it with Epiphany which is WebKit based, and sure enough, same situation:

Screencast From 2024-09-25 21-50-10.webm

Funny things is, epiphany is linked with libwebkitgtk-6.0.so.4 and my demo browser is linked with /usr/lib/libwebkit2gtk-4.1.so.0 but they produce the exact same problem.

I'm not exactly sure how the versions of WebKitGtk are distributed but I found that they both have the same version number, which is "2.46.0-2".

image

I'll try to downgrade to test and update this thread.

gysddn commented 4 days ago

Update on the problem.

The issue repeats when I test it only with v86 as well. This is Epiphany browser on https://copy.sh/v86 :

image

I tried env86 in a VM with Ubuntu, but WebKit straight up crashed when I tried to load the emulator page. And I can confirm that it has the same behavior when I tested it on https://copy.sh/v86 as well.

gysddn commented 4 days ago

I found the problem!

It appears 2.46.0 changed a lot of how rendering works. But in particular they added this:

Add a new setting to enable or disable the 2D canvas acceleration (enabled by default).

Which they enabled by default. So I tested with this disabled and sure enough, it worked.

progrium commented 4 days ago

Wow, good find