redeclipse / base

Base environment for Red Eclipse and associated source files.
https://redeclipse.net/
431 stars 88 forks source link

Using a custom model for the actor crashes the game. #869

Open SniperGoth opened 5 years ago

SniperGoth commented 5 years ago

Earlier today i was trying out something, a custom mesh to test possibly a new enemy type (something that does a ground slam of sorts when close), but for now, you have to replace the actors/male or actors/female directory to get them to work.

Did that, configured the custom model(it only has a idle and a "smash" anim for the claw), entered in-game.

So far so good.

But the moment you load a onslaught match... since it uses the same model as the player, it crashes, giving a fatal segmentation 11 error.

I wonder what is causing this?

Here's the files:

vrman actor test.zip (added a simple walk anim. ) 20190225152058 This is how he looks like ^

To reproduce, make a backup of the actors/male directory and paste it there, then load a onslaught match in a map that contains it (most of them have, so it shouldn't be a problem). It should crash the moment the actor is loaded up and spawns.

Just in case, i use this guy here to test all my animations, so he's not really part of the game.

SniperGoth commented 5 years ago

I did a debug run wih help from @shacknetisp , and it gave me this :

#0 0x7727a5d1   ?? () (??:??)
#1 0x77228bc5   ?? () (??:??)
#2 0x7728b671   ?? () (??:??)
#3 0x77233422   ?? () (??:??)
#4 0x771e50c1   ?? () (??:??)
#5 0x74e785d5   msvcrt!free() (C:\WINDOWS\SysWOW64\msvcrt.dll:??)
#6 0x2380000    ?? () (??:??)
#7 0x760038 operator delete[](p=0x11afbd50) (C:\redeclipse-git\clone\base\src\shared\tools.cpp:21)
#8 0x4c54c6 skelhitdata::build(this=0x11af7210, g=0x11af9388, ids=0x11af88b0 "\001\001\002\002\001\002\002\001\001") (C:/redeclipse-git/clone/base/src/engine/hitzone.h:828)
#9 0x4c55a4 skelmodel::skelmeshgroup::buildhitdata(this=0x11af9388, hitzones=0x11af88b0 "\001\001\002\002\001\002\002\001\001") (C:/redeclipse-git/clone/base/src/engine/hitzone.h:835)
#10 0x800d8c    skelloader<iqm>::flushpart(this=0x119ebad0) (C:/redeclipse-git/clone/base/src/engine/skelmodel.h:1635)
#11 0x8b71a5    animmodel::load(this=0x119ebad0) (C:/redeclipse-git/clone/base/src/engine/animmodel.h:1659)
#12 0x4c7229    loadmodel(name=0x945d60 <sendmaptypes+3372> "actors/player/female", i=-1, msg=false) (C:\redeclipse-git\clone\base\src\engine\rendermodel.cpp:473)
#13 0x4c90bc    rendermodel(mdl=0x945d60 <sendmaptypes+3372> "actors/player/female", state=..., d=0x11aece08) (C:\redeclipse-git\clone\base\src\engine\rendermodel.cpp:1000)
#14 0x5c4041    game::renderplayer(d=0x11aece08, third=1, size=1, flags=0, color=..., lastoffset=0x0) (C:\redeclipse-git\clone\base\src\game\game.cpp:3556)
#15 0x5c6461    game::render() (C:\redeclipse-git\clone\base\src\game\game.cpp:3750)
#16 0x4b83bd    workinoq() (C:\redeclipse-git\clone\base\src\engine\renderlights.cpp:4581)
#17 0x4fcd25    rendergeom() (C:\redeclipse-git\clone\base\src\engine\renderva.cpp:1830)
#18 0x4ba84f    rendergbuffer(depthclear=true) (C:\redeclipse-git\clone\base\src\engine\renderlights.cpp:4900)
#19 0x49d4c8    gl_drawview() (C:\redeclipse-git\clone\base\src\engine\rendergl.cpp:2303)
#20 0x49dca2    gl_drawframe() (C:\redeclipse-git\clone\base\src\engine\rendergl.cpp:2465)
#21 0x44cbd7    SDL_main(argc=7, argv=0x3b969e8) (C:\redeclipse-git\clone\base\src\engine\main.cpp:1144)
#22 0x505757    WinMain@16(hInst=0x400000, hPrev=hPrev@entry=0x0, szCmdLine=szCmdLine@entry=0x1b53db2 "-hhome -r -df0 -dw800 -dh600 -glog.txt", sw=sw@entry=10) (C:\redeclipse-git\clone\base\src\engine\server.cpp:1283)
#23 0x8e1d7b    main(argc=7, argv=0x2382ce0, __p__environ=0x23816b8) (../mingwrt-4.0.3-1-mingw32-src/src/libcrt/crt/main.c:91)

I wonder what this means?

SniperGoth commented 5 years ago

Just a update: it crashes the game when doing some deathmatches and editing (loading bots ), so it's not exclusive to onslaught actors, but it's more likely to instant-crash there.

Jigoku commented 4 years ago

Have you had any luck with this since? I just had a look, and it still crashes the game. However i also built with debug symbols on Linux, now the game continues to run and results in this horrific nightmare: https://streamable.com/b3bzt (can't get a detailed backtrace without a crash)

qreeves commented 4 years ago

The issue @SniperGoth was having is different to the one you are having, as he was having issues with the skeletal hit system not working due to mismatched bone (tag) definitions. Yours looks like a good old case of exporting in a way the engine doesn't like. From what I remember, you need to do something with how you export the rigging, but I never remember this modelling stuff.