Razish / japp

JA++ server and client modification for Jedi Academy
GNU General Public License v2.0
44 stars 30 forks source link

amweather crashes OpenJK dedicated server #357

Closed ghost closed 8 years ago

ghost commented 8 years ago

When using any of the amweather commands on an OpenJK Dedicated server it crashes the dedicated session with a Windows error, normal game stays up fine.

Error in server window:

terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::replace: __pos (which is 4294967295) > this->size() (which is 0)

Then the application requests runtime termination.

ensiform commented 8 years ago

O.o and where is this string located?

Because the weather code isn't even in the server at all. All that it does is set a configstring for clients to see. >.<

ghost commented 8 years ago

It happens immediately after running any amweather effect command in the server console, it's the last thing printed before it force closes.

ensiform commented 8 years ago

Are you running it as a client connected or as the server? And within where does AM_Weather function in g_admin.cpp get to before it crashes if at all?

ensiform commented 8 years ago

I'm betting its related to AM_DrawString(ADMIN_STRING_WEATHER, ent, cmd); as that uses std::strings

ghost commented 8 years ago

It's ran as an admin client which then creates the server crash shutdown immediately after entering. Regarding the g_admin.cpp, I have no idea.

ensiform commented 8 years ago

Stack trace will be required to see the problem :/

ghost commented 8 years ago

Ah unfortunately I don't know how to do that :[

ensiform commented 8 years ago

Are you using a specific build or compiled self?

ghost commented 8 years ago

It's the Windows server build and client build on the japp.jkhub page

Edit: Prior to using that build I had used an earlier version that did not cause the problem. OpenJK is latest windows build.

ensiform commented 8 years ago

Those are quite possibly outdated a while? @Razish

ghost commented 8 years ago

Attached an image of the dedicated server console here: http://i.imgur.com/x18ToDv.png

ensiform commented 8 years ago

Likely means a failure is happening here. https://github.com/Razish/japp/blob/master/game/g_admin.cpp#L265-L266

ghost commented 8 years ago

An update, same crash message appears in dedicated console after using amkick on bots. Latest Windows client (Dec 17th) I will see if any other admin commands cause this.

Blackwolf1337 commented 8 years ago

I think we can close this down, I tried both /amkick on bots per Server Panel and /amweather also, no crashes at all. Try using different OpenJK builds or compile it by yourself.

Exmirai commented 8 years ago

is it shows messages properly?

Blackwolf1337 commented 8 years ago

If you use /amweather on the Serverpanel it won't show any announcement, but that can be fixed. On the clientside it works fine when using it. unbenannt

Exmirai commented 8 years ago

just checked it. Closing