otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.61k stars 1.07k forks source link

Server closes on non-existing map name #3254

Closed slawkens closed 3 years ago

slawkens commented 3 years ago

Before creating an issue, please ensure:

Steps to reproduce (include any configuration/script required to reproduce)

  1. Change default mapName in config.lua to something that doesn't exist

Expected behaviour

Console should give at least some info what have gone wrong. For example: couldn't find map file.

Actual behaviour

The server closes unexpectedly without giving any info. Screenshot included: image

nekiro commented 3 years ago

Is it crashing? https://github.com/otland/forgottenserver/blob/master/src/otserv.cpp#L291

SaiyansKing commented 3 years ago

Yes, it is crashing: https://github.com/otland/forgottenserver/blob/master/src/fileloader.cpp#L35 throws here but https://github.com/otland/forgottenserver/blob/master/src/iomap.cpp#L72 doesn't catch any throwed exception.

slawkens commented 3 years ago

enhancement? Its a bug! :sweat_smile:

nekiro commented 3 years ago

enhancement? Its a bug! 😅

Honestly, this does not affect anything so I would say it's an enhancement, but I guess it's matter of opinion.