console-gl.c:96:surface_gl_create_texture:code should not be reached

Bug #1581796 reported by luigiburdo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Facing this if i enable gtk,gl option same is with sd2 gl options.

PowerPc P5020 4gb ram Ubuntu Mate 16:04

tested on
RadeonSi 7750HD 2gb ddr3
r600 6570 2gb ddr3

Masa 11.2.2 and 11.3 dev
same issue come on swrast mode

Thanks
Luigi

description: updated
description: updated
Revision history for this message
Thomas Huth (th-huth) wrote :

Could you please add a
 printf("Pixel format = 0x%x\n", surface->format);
in front of the g_assert_not_reached() in that function, and report which value is printed when you run it again?

Revision history for this message
luigiburdo (intermediadc) wrote :

Will report soon

Revision history for this message
luigiburdo (intermediadc) wrote :
Download full text (8.0 KiB)

here is the result

qemu-2.5.1.1/i386-softmmu$ ./qemu-system-i386 -display sdl,gl=on
Pixel format = 0x20020888
**
ERROR:ui/console-gl.c:96:surface_gl_create_texture: code should not be reached
Aborted (core dumped)

In case is needed this is my ldd
linux-vdso32.so.1 => (0x00100000)
 libvirglrenderer.so.0 => /usr/local/lib/libvirglrenderer.so.0 (0x0ff8a000)
 libepoxy.so.0 => /usr/lib/powerpc-linux-gnu/libepoxy.so.0 (0x0fe86000)
 libX11.so.6 => /usr/lib/powerpc-linux-gnu/libX11.so.6 (0x0fd23000)
 libz.so.1 => /lib/powerpc-linux-gnu/libz.so.1 (0x0fce2000)
 libcurl-gnutls.so.4 => /usr/lib/powerpc-linux-gnu/libcurl-gnutls.so.4 (0x0fc41000)
 libbz2.so.1.0 => /lib/powerpc-linux-gnu/libbz2.so.1.0 (0x0fc00000)
 libpixman-1.so.0 => /usr/lib/powerpc-linux-gnu/libpixman-1.so.0 (0x0fb5f000)
 libutil.so.1 => /lib/powerpc-linux-gnu/libutil.so.1 (0x0fb2e000)
 libncurses.so.5 => /lib/powerpc-linux-gnu/libncurses.so.5 (0x0fadd000)
 libtinfo.so.5 => /lib/powerpc-linux-gnu/libtinfo.so.5 (0x0fa8c000)
 libpulse.so.0 => /usr/lib/powerpc-linux-gnu/libpulse.so.0 (0x0fa1b000)
 libpng16.so.16 => /usr/lib/powerpc-linux-gnu/libpng16.so.16 (0x0f9ba000)
 libjpeg.so.8 => /usr/lib/powerpc-linux-gnu/libjpeg.so.8 (0x0f949000)
 libSDL2-2.0.so.0 => /usr/local/lib/libSDL2-2.0.so.0 (0x0f7f2000)
 libnettle.so.6 => /usr/lib/powerpc-linux-gnu/libnettle.so.6 (0x0f791000)
 libgnutls.so.30 => /usr/lib/powerpc-linux-gnu/libgnutls.so.30 (0x0f63f000)
 libgtk-x11-2.0.so.0 => /usr/lib/powerpc-linux-gnu/libgtk-x11-2.0.so.0 (0x0f15b000)
 libgdk-x11-2.0.so.0 => /usr/lib/powerpc-linux-gnu/libgdk-x11-2.0.so.0 (0x0f07a000)
 libcairo.so.2 => /usr/lib/powerpc-linux-gnu/libcairo.so.2 (0x0ef38000)
 libgdk_pixbuf-2.0.so.0 => /usr/lib/powerpc-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x0eee7000)
 libgobject-2.0.so.0 => /usr/lib/powerpc-linux-gnu/libgobject-2.0.so.0 (0x0ee66000)
 libglib-2.0.so.0 => /lib/powerpc-linux-gnu/libglib-2.0.so.0 (0x0ed15000)
 libsnappy.so.1 => /usr/lib/powerpc-linux-gnu/libsnappy.so.1 (0x0ece4000)
 librt.so.1 => /lib/powerpc-linux-gnu/librt.so.1 (0x0ecb3000)
 libm.so.6 => /lib/powerpc-linux-gnu/libm.so.6 (0x0ebc2000)
 libgcc_s.so.1 => /lib/powerpc-linux-gnu/libgcc_s.so.1 (0x0eb81000)
 libpthread.so.0 => /lib/powerpc-linux-gnu/libpthread.so.0 (0x0eb3e000)
 libc.so.6 => /lib/powerpc-linux-gnu/libc.so.6 (0x0e98a000)
 libgbm.so.1 => /usr/local/lib/libgbm.so.1 (0x0e959000)
 libdrm.so.2 => /usr/lib/powerpc-linux-gnu/libdrm.so.2 (0x0e928000)
 libdl.so.2 => /lib/powerpc-linux-gnu/libdl.so.2 (0x0e8f7000)
 libxcb.so.1 => /usr/lib/powerpc-linux-gnu/libxcb.so.1 (0x0e8b6000)
 libidn.so.11 => /usr/lib/powerpc-linux-gnu/libidn.so.11 (0x0e855000)
 librtmp.so.1 => /usr/lib/powerpc-linux-gnu/librtmp.so.1 (0x0e814000)
 libgssapi_krb5.so.2 => /usr/lib/powerpc-linux-gnu/libgssapi_krb5.so.2 (0x0e7a3000)
 liblber-2.4.so.2 => /usr/lib/powerpc-linux-gnu/liblber-2.4.so.2 (0x0e772000)
 libldap_r-2.4.so.2 => /usr/lib/powerpc-linux-gnu/libldap_r-2.4.so.2 (0x0e6f0000)
 /lib/ld.so.1 (0x203e7000)
 libjson-c.so.3 => /lib/powerpc-linux-gnu/libjson-c.so.3 (0x0e6bf000)
 libpulsecommon-8.0.so => /usr/lib/powerpc-linux-gnu/pulseaudio/libpulsecommon-8.0.so (0x0e61e000)
 libdbus-1.so.3 => /lib/powerpc-linux-gnu/libdbus...

Read more...

Revision history for this message
Thomas Huth (th-huth) wrote :

OK, thanks for checking. Pixel format = 0x20020888 is the PIXMAN_x8r8g8b8 format, if I've got the pixman.h header right. So could you please try the following patch to see whether it fixes the issue for you?

diff --git a/ui/console-gl.c b/ui/console-gl.c
--- a/ui/console-gl.c
+++ b/ui/console-gl.c
@@ -88,6 +88,10 @@ void surface_gl_create_texture(ConsoleGLState *gls,
         surface->glformat = GL_BGRA_EXT;
         surface->gltype = GL_UNSIGNED_BYTE;
         break;
+ case PIXMAN_BE_x8r8g8b8:
+ surface->glformat = GL_RGBA;
+ surface->gltype = GL_UNSIGNED_BYTE;
+ break;
     case PIXMAN_r5g6b5:
         surface->glformat = GL_RGB;
         surface->gltype = GL_UNSIGNED_SHORT_5_6_5;

Revision history for this message
Thomas Huth (th-huth) wrote :

Uh, seems like the web interface ate up the spaces in my previous comment. Here's the patch as attachment instead.

Revision history for this message
luigiburdo (intermediadc) wrote :

Hi T.
i been test and build your patch with the qemu 2.6 on mate 16.10 and look like not crashing when qemu open like before
but i continue have the black display here,look like the emulated hardware have a issue someware.
(check the attached image)... the strange of this issue is it was not present before and not is relative something about sdl or gtk .
I try all the options available adding a bios, changing the vga the machine type, gave a cpu option but nothing... all the time the same issue.

About your sdl parch:
I will check your patch on qemu 2.5.1 and on fedora 24 for confirm everything working right.

thanks for you parches
Luigi

Revision history for this message
luigiburdo (intermediadc) wrote :

Hi T,
tested on 2.5.1 and the patch is working.
it can be included in the mainstream

Luigi

Revision history for this message
Thomas Huth (th-huth) wrote :

When you say it's failing with qemu 2.6, are you using the official release 2.6.0 or the current version from the git repository? Also, which target machine are you emulating? x86_64? ppc64?

Revision history for this message
luigiburdo (intermediadc) wrote :

Hi T.
yes the official git 2.6 from qemu.org
No video come with all type of machine i had been tested: ppc, ppc64, i386, x86_64 , but this only on Ubuntu 16.10
on Fedora 24 all is working right .
I think there is something broken on ubuntu 16.10.

ah sorry i forgot ... on Fedora 24 qemu 2.6.0 with the patch is working

Luigi

Revision history for this message
Thomas Huth (th-huth) wrote :

Fix has been pulled into the QEMU git repository:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=2c2311c5451f4555e850772

Changed in qemu:
status: New → Fix Committed
Revision history for this message
luigiburdo (intermediadc) wrote :

Thomas,
thank you very much
for your fix

Luigi

Revision history for this message
luigiburdo (intermediadc) wrote :

Hi T.Huth,
is possible add the sdl patches on BigEndian on Qemu 2.5.1 ?
the lastest are not initializing the display i dont understand what appening with last qemu on Big Endian.

Revision history for this message
Thomas Huth (th-huth) wrote :

Sorry, I didn't quite get your question ... do you want to see the patch included in the 2.5 stable branch (i.e. included in version 2.5.2)? Or do you have a problem applying the patch on top of 2.5.1 on your own?

Revision history for this message
luigiburdo (intermediadc) wrote :

i think the best will be it included in the stable branch for have a full working qemu options

Revision history for this message
Thomas Huth (th-huth) wrote :

Well, QEMU 2.7 is likely to be released next months, so I'm not sure whether there will be another 2.5.x stable release ... but if you like, you can try to send the patch to the qemu-stable mailing list (that's the official way to get a patch included into the stable tree) and ask to include it in 2.5.2 if it ever gets released.

Revision history for this message
luigiburdo (intermediadc) wrote :

I will send your old sdl patches? i dont like to tief code ;-)

Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.