Jump to content
Eternal Lands Official Forums
bluap

glCopyTexImage2D() crashes on Ubuntu 9.04 intel driver

Recommended Posts

Several people have reported that the client crashes on Ubuntu Linux 9.04 (Jaunty) when using Intel drivers. I have finally managed to steal my daughter's laptop and can reproduce this crash. The graphics on this machine are "Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)".

 

The crash happens at loading_win.c:100, in the take_snapshot() function during the call to glCopyTexImage2D(). The parameters in this case are:

GL_RGBA=6408

bg_width=1024

bg_height=512

also

GL_MAX_TEXTURE_SIZE=3379

 

On the console you get the following message:

intel_tex_image.c:355: intelTexImage: Assertion `texImage->RowStride == postConvWidth' failed.

 

If I comment out the call to take_snapshot(), the client runs as normal.

 

There are a few bits of information on the web about this, including a Ubuntu bug report for another game; I am about to add a comment. However, nothing conclusive. Anyone have any clues what might be wrong, of course, its probably a graphics driver bug....

Edited by bluap

Share this post


Link to post
Share on other sites

The following patch stops the crash and appears to work as before. I'm not too familiar with the openGL stuff so is this a valid workaround?

 

Index: loading_win.c
===================================================================
RCS file: /cvsroot/elc/elc/loading_win.c,v
retrieving revision 1.12
diff -a -u -r1.12 loading_win.c
--- loading_win.c	21 Sep 2007 06:29:29 -0000	1.12
+++ loading_win.c	3 May 2009 20:24:48 -0000
@@ -97,7 +97,9 @@
		bg_height *= 2;

	glReadBuffer (GL_FRONT);
-	glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, bg_width, bg_height, 0);
+	//glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, bg_width, bg_height, 0);
+	glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, bg_width, bg_height, 0, GL_RGBA, GL_BYTE, &loading_texture);
+	glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, bg_width, bg_height);

	frac_x = ((float) width) / bg_width;
	frac_y = ((float) height) / bg_height;

Share this post


Link to post
Share on other sites

I patched it like this and it works, but yes it must be a driver bug.

 

void take_snapshot (int width, int height)
{
int bg_width = 1024;
int bg_height = 512;

glGenTextures (1, &loading_texture);
glBindTexture (GL_TEXTURE_2D, loading_texture);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

// texture sizes need to be powers of 2
while (bg_width < width)
	bg_width *= 2;
while (bg_height < height)
	bg_height *= 2;

glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, bg_width, bg_height, 0, GL_RGBA, GL_BYTE, NULL); /* In GL version 1.1 or greater, pixels may be a null pointer. In this case texture memory is allocated to accommodate a texture of width width and height height.  You can then download subtextures to initialize this texture memory. */
glReadBuffer (GL_BACK); // Reading from FRONT buffer is buggy atm, at least under DRI2+composited environment
glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, bg_width, bg_height, 0);

frac_x = ((float) width) / bg_width;
frac_y = ((float) height) / bg_height;

delete_texture = 1;
}

 

This kind of patch should be more or less harmless on other video cards too, so maybe Paul you could patch your packages like this? Or create a separate package eternal-lands-intel or something like that, would be helpful for some people...

Share this post


Link to post
Share on other sites

Does anyone know if the latest beta/cvs releases of MESA (and the Intel DRI contained within) still have this problem?

 

It may well solve itself in near future linux distro releases... not to say that an 'eternal-lands-intel' package isn't a good idea :evilgrin:

Share this post


Link to post
Share on other sites
Does anyone know if the latest beta/cvs releases of MESA (and the Intel DRI contained within) still have this problem?

It may well solve itself in near future linux distro releases... not to say that an 'eternal-lands-intel' package isn't a good idea :)

The Ubuntu bug report is marked "Declined for Jaunty" so I guess its not considered urgent. A quick goggle shows that the only mention of this error appears to be for the EL client and a game called FreedroidRPG. May be we should just fix it in the way shown above as that does not appear to change the behaviour for other drivers.

Share this post


Link to post
Share on other sites
Can the intel chipset be detected by some openGL vendor string thingy?

Good idea, we could investigate further. Though, I'm still inclined to change the code to the working version anyway.

Edited by bluap

Share this post


Link to post
Share on other sites

I've commited the change vytukas suggested as it successfully works around the driver bug and works on other cards and both Linux and windows too.

Share this post


Link to post
Share on other sites

gj :) ...now just need a 1.8.1 (or w/e) official release, so the intel ppls dont need to obtain CVS client ^^

Share this post


Link to post
Share on other sites
gj :) ...now just need a 1.8.1 (or w/e) official release, so the intel ppls dont need to obtain CVS client ^^

I've already prepared an update to the Debian/Ubuntu packages. I have included the fix the for 64-bit eyecandy crash too. Previously, Entropy has been happy for these minor updates to the base release to be done as long as they are well tested. I'm happy to do an updated of the (mostly) static build too if this issue affects distros other than Ubuntu.

Share this post


Link to post
Share on other sites

Problem with ATI mobility radeon 9700:

 

I/O warning : failed to load external entity "./spells.xml"

el.x86.linux.bin: radeon_mipmap_tree.c:117: compute_tex_image_offset: Assertion `lvl->size > 0' failed.

Aborted

 

I had to apply bluap patch to current CVS client to be able to play with an ATI mobility radeon 9700 card.

 

This note is just to update the issue in case some else has the same problem.

Share this post


Link to post
Share on other sites
Problem with ATI mobility radeon 9700:
I/O warning : failed to load external entity "./spells.xml"

el.x86.linux.bin: radeon_mipmap_tree.c:117: compute_tex_image_offset: Assertion `lvl->size > 0' failed.

Aborted

I had to apply bluap patch to current CVS client to be able to play with an ATI mobility radeon 9700 card.

This note is just to update the issue in case some else has the same problem.

Just so I understand, CVS has vytukas version of the change but you had to use my original version to avoid the crash?

Share this post


Link to post
Share on other sites

I've committed a hybrid version of vytukas's and my original suggested. This works fine on all the machines I have to test on and fixed a crash on a machine with a ATI Radeon Xpress 200M card. That card also needs "#use_animation_program=0" to work.

Share this post


Link to post
Share on other sites

Oh my, Eternal Lands Crashed - Don't Panic!

A few of things you can try:
1) Make sure your system is up to date, especially your video drivers.
2) If the client crashes repeatedly, try changing some settings.  Either by directly modifying the configuration file (e.g. gedit ~/.elc/main/el.ini). Or clicking the settings button window at the login screen.
i) Enable the "Poor Man" option in the "Details" tab of the setting window.  Or edit the configuration file and set "#poor_man=1".
ii) Disable the "Use animation program" option in the "Adv Video" tab of the setting window.  Or edit the configuration file and set "#use_animation_program=0".
iii) Disable the "Custom Looks Updates" option in the "Server" tab of the setting windows.  Or edit the configuration file and set "#customupdate=0".

If you continue to have problems check the Eternal Lands forums, especially the "Help Me" and "Bug Report" sections.  If you post a message make sure you include information about your system; i.e video driver and version, operating system and version.  Make sure you check your error log for clues too and include the contents in any forum report.

This information about your graphic hardware and software may help.
Output from "lspci | grep -i vga":
02:00.0 VGA compatible controller: ATI Technologies Inc RV790 [Radeon HD 4800 Series]
Output from "glxinfo | head -5":
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: ATI
server glx version string: 1.4

The following is your error log contents.  Note it is overwritten each time you run the game.



Log started at 2010-11-20 01:42:31 localtime (CET)

[01:42:31] Using the server profile: main
[01:42:31] Window size adjusted to 1014x713
[01:42:32] GL_ARB_multitexture extension found, using it.
[01:42:32] GL_EXT_compiled_vertex_array extension found, using it.
[01:42:32] GL_ARB_point_sprite extension found, using it.
[01:42:32] GL_ARB_texture_compression extension found, using it.
[01:42:32] GL_EXT_texture_compression_s3tc extension found, using it.
[01:42:32] GL_SGIS_generate_mipmap extension found, using it.
[01:42:32] GL_ARB_shadow extension found, using it.
[01:42:32] GL_ARB_vertex_buffer_object extension found, using it.
[01:42:32] GL_EXT_framebuffer_object extension found, using it.
[01:42:32] GL_EXT_draw_range_elements extension found, using it.
[01:42:32] GL_ARB_texture_non_power_of_two extension found, using it.
[01:42:32] GL_ARB_fragment_program extension found, using it.
[01:42:32] GL_ARB_vertex_program extension found, using it.
[01:42:32] GL_ARB_fragment_shader extension found, using it.
[01:42:32] GL_ARB_vertex_shader extension found, using it.
[01:42:32] GL_ARB_shader_objects extension found, using it.
[01:42:32] GL_ARB_shading_language_100 extension found, using it.
[01:42:32] GL_ARB_texture_mirrored_repeat extension found, NOT using it...
[01:42:32] GL_ARB_texture_rectangle extension found, NOT using it...
[01:42:32] GL_EXT_fog_coord extension found, NOT using it...
[01:42:32] GL_ATI_texture_compression_3dc extension found, using it.
[01:42:32] GL_EXT_texture_compression_latc extension found, using it.
[01:42:35] * server www.eternal-lands.com filename http://www.eternal-lands.com/updates190/files.lst
[01:42:35] Downloading http://www.eternal-lands.com/updates190/files.lst from www.eternal-lands.com
[01:42:35] Error: Can't open file "alias.ini"
[01:42:35] Sound devices detected: ALSA Software,OSS Software,PortAudio Software,PulseAudio Software,Wave File Writer
[01:42:35] Soundcard device attempted: 
[01:42:35] Soundcard device in-use: ALSA Software
[01:42:35] Finished downloading http://www.eternal-lands.com/updates190/files.lst
[01:42:36] * server www.eternal-lands.com filename http://www.eternal-lands.com/updates190/files.lst
[01:42:36] Downloading http://www.eternal-lands.com/updates190/files.lst from www.eternal-lands.com
[01:42:36] Finished downloading http://www.eternal-lands.com/updates190/files.lst
[01:42:37] * server www.eternal-lands.com filename http://www.eternal-lands.com/updates190/files.lst
[01:42:37] Downloading http://www.eternal-lands.com/updates190/files.lst from www.eternal-lands.com
[01:42:37] Finished downloading http://www.eternal-lands.com/updates190/files.lst
[01:42:37] Failed to download (files.lst) 3 times. Giving up.
[01:42:37] Error: Can't open file "custom_mirrors.lst"
[01:42:52] unable to add an attached actor: illegal/missing actor definition 255

This was the program output:  Note it is overwritten each time you run the game.

bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)

 

Ubuntu 9.10 (LTS)

 

uname -a
Linux military-PC-linux 2.6.31-22-generic #68-Ubuntu SMP Tue Oct 26 16:38:35 UTC 2010 i686 GNU/Linux

 

lspci
00:00.0 Host bridge: Intel Corporation X58 I/O Hub to ESI Port (rev 12)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 12)
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 12)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 12)
00:10.0 PIC: Intel Corporation 5520/5500/X58 Physical and Link Layer Registers Port 0 (rev 12)
00:10.1 PIC: Intel Corporation 5520/5500/X58 Routing and Protocol Layer Registers Port 0 (rev 12)
00:11.0 PIC: Intel Corporation 5520/5500 Physical and Link Layer Registers Port 1 (rev 12)
00:11.1 PIC: Intel Corporation 5520/5500 Routing & Protocol Layer Register Port 1 (rev 12)
00:13.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub I/OxAPIC Interrupt Controller (rev 12)
00:14.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub System Management Registers (rev 12)
00:14.1 PIC: Intel Corporation 5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 12)
00:14.2 PIC: Intel Corporation 5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 12)
00:15.0 PIC: Intel Corporation 5520/5500/X58 Trusted Execution Technology Registers (rev 12)
00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 1
00:1c.1 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 2
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 5
00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller
00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
00:1f.5 IDE interface: Intel Corporation 82801JI (ICH10 Family) 2 port SATA IDE Controller
02:00.0 VGA compatible controller: ATI Technologies Inc RV790 [Radeon HD 4800 Series]
02:00.1 Audio device: ATI Technologies Inc HD48x0 audio
05:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 AHCI Controller (rev 02)
05:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 AHCI Controller (rev 02)
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
07:06.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)

 

 

 

ok I can't read error (I don't understand it)

what kind of error am I giving

kernel

video

audio

???

as if I upgrade to 10.4 I don't get crash but I get 4 annoying bugs so I want to stay on 9.10 (LTS)

I want to try to patch it with few updates from 10.4 and not all so I won't get annoying bugs

 

please help

 

I tryed it with updating opengl but I'm still heaving crash reports

 

libgl1-mesa-dri (version 7.6.0-1ubuntu4.1)

libgl1-mesa-glx (version 7.6.0-1ubuntu4.1)

libglu1-mesa (version 7.6.0-1ubuntu4.1)

mesa-utils (version 7.6.0-1ubuntu4.1)

xscreensaver-gl (version 5.08-0ubuntu5)

 

 

where can I find that open gl to copy paste and change it manually?

to try if that would work

Share this post


Link to post
Share on other sites

...

A few of things you can try:

1) Make sure your system is up to date, especially your video drivers.

2) If the client crashes repeatedly, try changing some settings. Either by directly modifying the configuration file (e.g. gedit ~/.elc/main/el.ini). Or clicking the settings button window at the login screen.

i) Enable the "Poor Man" option in the "Details" tab of the setting window. Or edit the configuration file and set "#poor_man=1".

ii) Disable the "Use animation program" option in the "Adv Video" tab of the setting window. Or edit the configuration file and set "#use_animation_program=0".

iii) Disable the "Custom Looks Updates" option in the "Server" tab of the setting windows. Or edit the configuration file and set "#customupdate=0".

...

where can I find that open gl to copy paste and change it manually?

to try if that would work

That code is already in the client so no need,

 

Have you tried the above changes to settings? ATI cards often have problems with "use_animation_program" so that is definately worth a try. The "poor_man" option turns off several features and if that makes it work you can turn features back on one-by-one until you find out what's wrong. If you can compile your own client from source the you could provide a full back trace from gdb which may help us trace where the problem is. Also you could run the client with the strace tool and post the last 10-20 lines; make sure your user name/password is not included in the text and do not post the full output!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×