Author Topic: Tweak: Prevent crash with buggy ent file  (Read 1467 times)

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Tweak: Prevent crash with buggy ent file
« on: January 02, 2011, 08:54:17 AM »
A server will crash, if there are bugs in an ent file (like missing { for example). Make, that it will use the normal map entities instead of crashing the whole server.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Tweak: Prevent crash with buggy ent file
« Reply #1 on: February 01, 2011, 10:26:48 AM »
Do you have an example of a crashing ent file?  I don't really see this as something I need to fix - just don't put corrupt files on the server - test them out before uploading. :)

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Tweak: Prevent crash with buggy ent file
« Reply #2 on: February 01, 2011, 11:09:32 AM »
Yes, thats right. It's not really a bug, but it could prevent a crash. So i made it as a tweak.

The two files can make the errors "ERROR: Game Error: ED_ParseEntity: closing brace without data" and "ERROR: Game Error: ED_LoadFromFile: found gamemode when expecting {".

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Tweak: Prevent crash with buggy ent file
« Reply #3 on: February 01, 2011, 01:08:17 PM »
That's not a crash.  That's an error. :)

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Tweak: Prevent crash with buggy ent file
« Reply #4 on: February 01, 2011, 01:26:20 PM »
Oh, but why do the clients get the wrong message "Server crashed: Game Error: ED_LoadFromFile: found gamemode when expecting {" then?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Tweak: Prevent crash with buggy ent file
« Reply #5 on: February 02, 2011, 01:38:45 PM »
That's not really an accurate message, but I guess it depends on how you define "crash".  I generally think of crashing in the sense that the program completely stops running due to a segfault or something.  That's just an error that shuts the map down.  I don't think it should be removed, because it lets you know the map (or ent file) is messed up.  All you need to do is test your ent file before uploading it to the server.  If it just loaded the map anyway, things wouldn't be correct, and it would be harder to tell why.

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Tweak: Prevent crash with buggy ent file
« Reply #6 on: February 03, 2011, 10:43:54 AM »
Ok, this can be closed then.