Jump to content
Eternal Lands Official Forums
ZootNerper

Ubuntu Magic leveling up crash

Recommended Posts

Hi Folks,

 

I run Ubuntu Intrepid Ibix 8.10 with all the latest updates. The version of EL I don't know. It's from Launchpad pjbroad.

 

Whenever I level up in magic the program crashes. The firework effects might just start when, crash. Happens every time. Luckily it remembers I've leveled up.

 

I think that's all I need say.

 

-- Zoot

Share this post


Link to post
Share on other sites
I run Ubuntu Intrepid Ibix 8.10 with all the latest updates. The version of EL I don't know. It's from Launchpad pjbroad.

 

Whenever I level up in magic the program crashes. The firework effects might just start when, crash. Happens every time. Luckily it remembers I've leveled up.

I might be useful to know what graphics card and driver you are using. The output from the #glinfo command might help with this. Also if you are using a 32 or 64 bit CPU.

 

What would be really nice is to get a debug back-trace from the crash. To do this you would need to compile the client from source and run some simple debug commands. If you don't know how to do that then I or someone else around here can help. Alternatively, as I also run Ubuntu 8.10 (32-bit) I could provide a pre-built, debug version of the client for you to try. The good news is that using a debug build, we can enabled an eye-candy debug window to generate the eye-candy effects on demand, rather and waiting for your next magic level.

 

P.S. That launchpad account is mine. :)

Edited by bluap

Share this post


Link to post
Share on other sites

Hi,

 

Sorry, I wasn't thinking. Ubuntu is the 64bit version.

 

The input from the command #glinfo

 

Video card: GeForce 8600 GT/PCI/SSE2

Vendor ID: NVIDIA Corporation

OpenGL Version: 2.1.2 NVIDIA 180.11

 

I used to program many years ago, but haven't done any in a while. If you want that debug back trace, could you point me towards some instructions which I can follow (at least for the compiling). The back trace...I won't know the debugger, but if it's easy, I'll give it a go.

 

Nice to neet you :)

 

-- ZootNerper

Share this post


Link to post
Share on other sites

I'm afraid that's a 64bit problem. FP-math works differently when in 64bit mode. (in 32bit mode it returns 0, in 64bit mode it returns NaN)

Can you provide backtraces from gdb?

Share this post


Link to post
Share on other sites

Hi,

 

Sorry Florian, I don't know how to do a backtrace from gdb. If you point in the direction of a guide I maybe able to help. (I don't even know what gdb is, sorry)

 

I haven't done any leveling with tailoring, ranging or summoning. All the others lvl up no problems.

 

Programming - it's all a long time ago for me. :}

 

-- ZootNerper

Share this post


Link to post
Share on other sites

Add the following package sources line using the software sources application (in the admin menu):

deb-src http://ppa.launchpad.net/pjbroad/ppa/ubuntu intrepid main

 

Open a terminal.

 

Install the packages required to build and debug:

sudo apt-get build-dep eternallands

sudo apt-get install build-essential

 

Create and enter a temp directory:

mkdir $HOME/tempel

cd $HOME/tempel

 

Download the package source and enter the new el directory:

apt-get source eternallands

cd eternallands-1.8.0/

 

Edit the file make.defaults by removing the start of line "#" from the line that starts "#FEATURES += ECDEBUGWIN", save the file.

 

Build the client:

make -f Makefile.linux

 

Run the client in the gdb debugger:

gdb ./el.x86.linux.bin

 

At the "(gdb)" prompt, enter "run", keep pressing enter at any the prompts until the client starts.

 

Once you are logged in, open the eye-candy debug window by pressing CTRL+ALT+C. Find the level effects tab and press the "MAG" button. If the client crashes, (it will appear to be frozen), the terminal window running gdb enter "bt full". This will produce the backtrack information. Please post that information here.

 

Edited to include the final, important "bt full"!

Edited again as you need to have the build packages installed before you can install the source package.

Edited by bluap

Share this post


Link to post
Share on other sites

There's no difference between the official 1.8 release and the CVS regarding Eye Candy.

 

It does not always happen, only if particles fly right throught the effect's center, and the distance between the center and the particle is lower than the accuracy of calculation and is very very near to zero. In 32bit mode, that's 0. In 64bit mode, that's NaN.

I don't have an AMD64 to test and debug it, sorry.

 

/EDIT: does ubuntu 64bit define X86_64?

Edited by Florian

Share this post


Link to post
Share on other sites

Hi Folks,

 

Sorry for the delay.

 

I followed your instructions Bluap (thanks) and found the level up tab and ran the magic one many times with no crash. I tried all the others for good measure and still no crash.

 

What to do next? I guess it's not the effects that are causing the crash. Or maybe i was just unlucky with the particles passing through the centre of whatever :P

 

-- ZootNerper

Share this post


Link to post
Share on other sites
I followed your instructions Bluap (thanks) and found the level up tab and ran the magic one many times with no crash. I tried all the others for good measure and still no crash.

OK, thanks ZootNerper. The instructions were a little out of sequence if you did not have the build packages already installed but I've edited the text now. I have now managed to reproduce the crash booting my sons machine from a Ubuntu 64-bit live CD. As you found, a default compile does not crash. However, when I compiled a release version (optimised) I got the crash using the EC debug window. To compile the release version you simply use "make -f Makefile.linux clean && make -f Makefile.linux release".

 

The problem now is that we do not have any debug symbols but it does tell us the function that crashed. The crash is happening in MathCache::powf_0_1_rough_close() in eye_candy/math_cache.cpp and is a segmentation fault. I added some debug printing the index values for the arrays and they are sometimes negative and sometimes higher than the array limits. What's more, the same index value problems occur for a non release build and on my 32-bit machine too; they just don't crash the client.

 

I'll investigate further and see if I can fix the bug, someone more familiar with the EC code, please feel free to jump in. :P

Share this post


Link to post
Share on other sites

I've just committed a hacky fix for this problem. As Florian suggested, the problem is down to the a value being nan. I was hoping to be able to use the std::isnan() test (which does work on my compiler) but it is not yet in the C++ standard. Other comparison based check did not work. Instead I have added some array bound checking. I have another bug to chase but when I have done that I will update the Ubuntu/Debian packages to include this "fix".

Edited by bluap

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×