Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Assertion `self' failed" crash #9

Closed
eponymous opened this issue Feb 24, 2013 · 13 comments
Closed

"Assertion `self' failed" crash #9

eponymous opened this issue Feb 24, 2013 · 13 comments

Comments

@eponymous
Copy link
Contributor

Trying to run the latest git checkout fails with:

el.x86.linux.bin: io/cal3d_io_wrapper.cpp:261: int CalCoreModel_ELLoadCoreAnimation(CalCoreModel_, const char_, float): Assertion `self' failed.

The backtrace:
#0 0x00000037dfa35ba5 in raise () from /lib64/libc.so.6
#1 0x00000037dfa37358 in abort () from /lib64/libc.so.6
#2 0x00000037dfa2e972 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00000037dfa2ea22 in __assert_fail () from /lib64/libc.so.6
#4 0x000000000058c0df in CalCoreModel_ELLoadCoreAnimation (self=0x0,

strFilename=0x7fffffffdad0 "./animations/emotes/player_waveleft_stand.caf", scale=0) at io/cal3d_io_wrapper.cpp:261

#5 0x0000000000441621 in cal_load_anim (act=0xb11e00 <actors_defs>,

str=0x7fffffffdc30 "./animations/emotes/player_waveleft_stand.caf 1", 
sound=0x656867 "", sound_scale=0x656867 "", duration=-1) at cal.c:408

#6 0x00000000004221a1 in parse_actor_frames (act=0xb11e00 <actors_defs>,

cfg=0x2095e80, defaults=0x0) at actor_scripts.c:3930

#7 0x000000000041d880 in parse_emotes_defs (node=0x20766b0)

at actor_scripts.c:2755

#8 0x000000000041db8a in read_emotes_defs (dir=0x660180 "",

index=0x660175 "emotes.xml") at actor_scripts.c:2803

#9 0x000000000048c06b in init_stuff () at init.c:884
#10 0x00000000004b45ec in main (argc=1, argv=0x7fffffffe2c8) at main.c:444

I tried it with/without EXT_ACTOR_DICT set and/or the actor_defs directory in git.

AFAICT act->coremodel is never getting set (parse_actor_nodes() doesn't get called) before calling cal_load_anim() so a NULL value is passed in to CalCoreModel_ELLoadCoreAnimation().

@Sir-Odie
Copy link
Collaborator

The actor_defs in git are ancient (maybe they should be removed or updated to a current version?) and EXT_ACTOR_DICT is out of development since 2008 (is there any interest in further developing that or should it be removed?).
I can't reproduce that problem, the client works fine for me on Windows and Mac (with emotes) and was also tested on Linux...

@pjbroad
Copy link
Collaborator

pjbroad commented Feb 24, 2013

This may be related, it starts with a failure in the same place at least: I've been trying out a build on Ubuntu 13.04 and I'm having the same problem using the proper data files. If you comment out the emotes load (in init.c), the client loads OK. However, there is no 3d rendered scene, just black. All the 2d panels, windows, console and textures work, just no scene. There are errors loading the the actor definition files which I'm investigating now.

@pjbroad
Copy link
Collaborator

pjbroad commented Feb 24, 2013

I've not found the issue yet but my most recent static build from http://twinmoons.org.uk/el/rel/193/ works fine. This points to a library issue with an updated package on Ubuntu.

@eponymous
Copy link
Contributor Author

On Sun, Feb 24, 2013 at 8:54 AM, Paul Broadhead (aka bluap) <
notifications@github.com> wrote:

I've not found the issue yet but my most recent static build from
http://twinmoons.org.uk/el/rel/193/ works fine. This points to a library
issue with an updated package on Ubuntu.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-14010403.

I'm on fedora 18 myself.

The problem does seem to be the xml parsing is failing so the model never
gets its skeleton data initialized which leads to the NULL 'self'
assertion. Kinda seems like the xml file structure has changed since the
last release.

@pjbroad
Copy link
Collaborator

pjbroad commented Feb 24, 2013

The EL data files are unchanged. I suspect the xml libraries are not reading them properly. This could be a bug in the version of the library shipped with newer distros, or some stricter parsing that now means the files are invalid. On Ubuntu 13.04 libxml2 is version 2.9.0. On 12.10 which worked fine, the version id 2.8.0.

@Sir-Odie
Copy link
Collaborator

according to a quick google search, fedora18 also uses libxml 2.9 and there are some compatibility issues with that libxml-version

@pjbroad
Copy link
Collaborator

pjbroad commented Feb 24, 2013

Yep, I downgraded the package to the 2.8.0 version and everything is fine.

@eponymous
Copy link
Contributor Author

Ok, tracked it down to this -->
http://www.mail-archive.com/xml@gnome.org/msg09044.html

...now just need to figure out how to get it to load external entities
again.

@eponymous
Copy link
Contributor Author

As a (semi-bogus) workaround one can run:

xmllint --noent actor_defs.xml > actor_defs.xml.new

and replace the original actor_defs.xml file with the generated file.

@pjbroad
Copy link
Collaborator

pjbroad commented Mar 2, 2013

Yep, that works. Well found! I guess we need a proper fix though.....

@pjbroad
Copy link
Collaborator

pjbroad commented Mar 2, 2013

Is the solution to specify XML_PARSE_NOENT in the call to xmlReadFile() as shown here:
http://xmlsoft.org/examples/reader2.c
This certainly works but I am a bit of an libxml2 beginner.

@pjbroad pjbroad closed this as completed Jun 25, 2013
@pjbroad
Copy link
Collaborator

pjbroad commented Jun 25, 2013

Closing as my fix appears to have, er fixed, the issue.

@vaurelios
Copy link

This issue is yet occurring with me, on Arch Linux

$ pacman -Q libxml2
libxml2 2.9.1-2

the eponymous's workaround works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants