Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Phil

Crash in load_bmp8_enhanced_actor

Recommended Posts

I am using MS VS 2005 with Win XP Pro SP2.

 

I can get the cvs client to compile and run (with 636 warnings, but no errors). I can type in my username and password, but after the progress bar finishes, I get this message.

 

Windows has triggered a breakpoint in elc.exe.

 

This may be due to a corruption of the heap, and indicates a bug in elc.exe or any of the DLLs it has loaded.

 

The output window may have more diagnostic information

 

According to the debugger, the last line executed in the client source is in textures.c line 912 free(texture_mem); I have NEW_TEX defined.

 

My error_log.txt file says this:

 

 

 

Log started at 2006-04-18 00:22:33 localtime (Eastern Daylight Time)

 

[00:22:33] Error: Can't open file "./textures/fontv.bmp"

[00:22:52] Error: Can't open file "quest.log"

[00:23:34] Error: Can't open file "`

ÿ_

ÿ] ÿ] ÿ[ÿ[ÿZÿZÿYÿYÿYÿWÿXÿWÿXÿXÿYÿYÿZÿ[ÿZÿVÿ

Rÿ

Rÿ

QÿOÿOÿLÿKÿ

Jÿ

Hÿ

Hÿ

JÿKÿKÿLÿKÿKÿKÿKÿKÿ

JÿLÿ

Pÿ

RÿUÿVÿXÿYÿ[ÿ] ÿ_

ÿ`

ÿ`

ÿaÿ`

ÿ`

ÿbÿbÿdÿcÿbÿ`

ÿ`

ÿ`

ÿaÿcÿfÿgÿgÿgÿgÿfÿdÿfÿgÿhÿlÿlÿlÿlÿlÿj

ÿ"kÿ"

[00:23:34] Error: Can't open file "`

ÿaÿcÿfÿgÿgÿgÿgÿfÿdÿfÿgÿhÿlÿlÿlÿlÿlÿj

ÿ"kÿ"

[00:23:34] Error: Can't open file "gÿeÿcÿ`

ÿ_

ÿ_

ÿ] ÿ] ÿ] ÿ] ÿ] ÿ] ÿ] ÿ] ÿ] ÿ] ÿ[ÿZÿZÿ[ÿ] ÿ] ÿ^ ÿ_

ÿ]

ÿ]

ÿ]

ÿ[ÿZÿXÿVÿVÿYÿYÿZÿ[ÿ] ÿ] ÿ] ÿ_

ÿ] ÿ_

ÿbÿbÿdÿgÿhÿj

ÿj

ÿj

ÿlÿnÿnÿnÿnÿj

ÿhÿgÿfÿdÿdÿbÿaÿbÿdÿeÿgÿgÿfÿfÿgÿgÿhÿj

ÿlÿnÿoÿpÿqÿpÿpÿnÿnÿ#p

ÿ"

[00:23:34] Error: Can't open file "dÿeÿgÿgÿfÿfÿgÿgÿhÿj

ÿlÿnÿoÿpÿqÿpÿpÿnÿnÿ#p

ÿ"

 

Can someone tell me what to do now?

 

Thanks, Phil

Share this post


Link to post
Share on other sites

looks like it's trying to open a filename that hasn't been initialised yet... okay, you are running from your data_dir, right? (if using MSVC's debug/run, have the working dir set right)

the stock client works fine from the data_dir?

what other defines are you using? (the full list)

are you using up-to-date versions of all the libs you need?

Share this post


Link to post
Share on other sites

I checked my working dir, and it is ok.

 

The stock client works fine in there with the cal3d.dll provided with the client. But I am using a cal3d.dll from the cal3d sources because I could not get the cvs client to run with the supplied cal3d.dll.

 

I am using _DEBUG;ELC;WINDOW_CHAT;NEW_TEX defines.

 

I copied the actor_defs and languages folders to the working dir.

 

My libraries I'm using that are different from the stock client are:

oggvorbis-win32sdk-1.0.1 (_d dlls)

cal3d 0.10.0

 

Hope this helps.

Phil

Share this post


Link to post
Share on other sites

I just updated the DLLs to see if that would fix it. It didn't.

 

Now I'm using

ogg vorbis win32sdk 1.0.1

cal3d 0.10.0

SDL 1.2.9

SDL_net 1.2.5

libxml2 2.6.32

 

The rest are the same as the stock client.

 

Phil

Share this post


Link to post
Share on other sites

I doubt this matters, but I accidentally told the wrong operating system. I have Win XP Tablet PC Edition, but it is like XP Pro.

 

Phil

Share this post


Link to post
Share on other sites

your defines line is missing some of the common options, which may be the cause (elc is not good about keeping defines optional). if you'd like to try my list to see if that fixes it, it's

ELC;NDEBUG;NEW_WEATHER;PNG_SCREENSHOT;WIDGETS_FIX;NEW_FRUSTUM;NETWORK_THREAD;BUG_FIX_3D_OBJECTS_MIN_MAX;NEW_TEX;OPTIONS_I18N;USE_FRAMEBUFFER;NEW_ACTOR_ANIMATION;COMMAND_BUFFER;USE_BBOX;ATI_9200_FIX;AUTO_UPDATE

Share this post


Link to post
Share on other sites

OK, I tried your defines, but I got the same result :lipssealed:

 

 

Here's my Call Stack (only showing elc code files), hope this helps

 

elc.exe!load_bmp8_enhanced_actor(enhanced_actor * this_actor=0x15c36448, unsigned char a='ÿ') Line 912 + 0xc bytes C

elc.exe!add_enhanced_actor(enhanced_actor * this_actor=0x15c36448, float x_pos=146.00000, float y_pos=114.00000, float z_pos=0.00000000, float z_rot=135.00000, float scale=1.0000000, int actor_id=1) Line 48 + 0xe bytes C

elc.exe!add_enhanced_actor_from_server(const char * in_data=0x0554d17c, int len=33) Line 681 + 0x73 bytes C

elc.exe!process_message_from_server(const unsigned char * in_data=0x0554d179, int data_length=36) Line 357 + 0x13 bytes C

elc.exe!process_data_from_server() Line 1107 + 0xe bytes C

elc.exe!get_message_from_server() Line 1172 C

elc.exe!start_rendering() Line 129 C

elc.exe!Main(int argc=-1, char * * argv=0x00000000) Line 263 C

elc.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * hPrev=0x00000000, char * lpCmd=0x00151f14, int nShow=1) Line 318 + 0xd bytes C

 

 

Is there anywhere you would like me to put a breakpoint to check the values of any variables?

 

Thanks for your help so far,

Phil

Share this post


Link to post
Share on other sites

edit: I spoke too quick, I thought I was close to finding the bug.

Edited by Phil_

Share this post


Link to post
Share on other sites

okay, not meaning to call you a liar or anything, but this looks quite similar to the problems I had when not running in the right working directory

are you compiling the client with the .exe in your EL dir? (if not, please copy it there for next step) does it work when run from explorer/whatever there?

have you set the working directory for debug setup and are using release, perhaps? it'll need to be set for both.

of course, check if there may be a typo in the working directory setting

in MSVC 2k3, it's properties->config->debug->working directory and should be set to your EL dir, usually C:\Program Files\Eternal Lands\

to compile into this dir, properties->config->linker->general->output include the full path. for me, it's set to something like C:\Program Files\Eternal Lands\elc_ttlanhil_debug.exe

 

if using the same defines, and still having the problem, I don't know what else could be the cause

Share this post


Link to post
Share on other sites

Found the problem. Visual Studio is saying NEW_TEX isn't defined. Very strange. I know that it is in the command line. I'll have to put the define in my global.h or something.

Share this post


Link to post
Share on other sites

Yes, it looks like a lot of the defines weren't working from the command line. Now that I have them in global.h, they work, but now I have an error.

 

error C2065: 'GL_MAX_RENDERBUFFER_SIZE_EXT' : undeclared identifier

if (use_frame_buffer && have_framebuffer_object) glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE_EXT, &max_size);

 

Do I have a missing GL header or something?

 

Thanks,

Phil

Share this post


Link to post
Share on other sites
Found the problem. Visual Studio is saying NEW_TEX isn't defined. Very strange. I know that it is in the command line. I'll have to put the define in my global.h or something.
ahh! I know what it is. open up MSVC, remove all files from the project, add all files to the project. some of them have custom settings, and hence don't get the global defines, and re-adding them like this will flush all custom settings (just remember to check if cal3d_wrapper.cpp needs to be set as a C++ file after, that should be the only file with anything changed)

 

error C2065: 'GL_MAX_RENDERBUFFER_SIZE_EXT' : undeclared identifier

if (use_frame_buffer && have_framebuffer_object) glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE_EXT, &max_size);

 

Do I have a missing GL header or something?

more likely out of date than missing. if it's undef, then you can safely comment out the relevant lines; you won't be able to use that part of the code anyway

Share this post


Link to post
Share on other sites

Thanks :lipssealed:

 

I can log in now to the point where I can see the interface and my items in the quickbar, but then a debug assertion fails for a vector out of bounds error.

 

I really need to go to sleep though; so I'm not going to mess with it right now. It's 1:45 A.M. and I have to be in class at 8 this morning :lurker:

 

Thanks again,

Phil

Share this post


Link to post
Share on other sites

Hello Phil_,

 

Seems we've been working on the same matter parraler, hehe. :blush: I've managed to compile and run ELC with VC2005 Express yesterday. (although turning on the sounds crashes the client; I need to debug this). I had the same problem with per-file defines as well as the assertion. The assertion is a tricky part. You need to have the cal3d library compiled in the same configuration as the client(Debug or Release). Otherwise they will be using different CRT libraries and client won't see some of the data created in cal3d code (at least that is my explanation). The Debug uses "Multithreaded Debug DLL" and Release "Multithreaded DLL". I had similar problems (heap corruption) at work when mixing these two.

 

Right now I'm working on creating a sln and vcproj for the current code and I'm thinking of posting them into the repository for future use.

Share this post


Link to post
Share on other sites

Ok, I was able to get the music from the client :D

 

I needed to recompile the ogg/vorbis library as the binaries I had did not work (propably the same problem as in previous post). Once done with vorbis I needed to spend some time on OpenAL as the alutInit funtion did not work.. at all. I got newer distribution of OpenAL(which does not have the alut.dll) and combined it with the freealut binaries and... I have sound :P as well as almost complete sollution and project files for VC2005 :mace:

Share this post


Link to post
Share on other sites

Thanks all for your help. I got it to run now. :lurker:

 

Phil

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×