Better handling of missing content

Better handling of missing content

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Better handling of missing content

Post by SpliFF »

Been doing some testing with a very minimal mod using Dummy Mod as a starting point. I've noticed that the engine seems to handle missing content and definitions in 5 ways:

1.) In some cases it ignores the problem (may crash later though).
2.) In some cases it ignores and logs a warning.
3.) In some cases it crashes with a popup message and log line.
4.) In some cases it simply crashes with an unhelpful (to a content dev) stacktrace.
5.) In rare cases Spring becomes "non responsive" and must be killed.

Unfortunately 4 is far too common and 3 happens in cases where 2 would be better. For instance missing unittextures should have a gray fallback texture it can load from the spring base content.

I would say that as it stands the system presents a considerable barrier to new content developers trying to debug units and would therefore be worth the time to fix. There may also be legitimate reasons to be missing a resource (it hasn't been made yet or it's added later via some custom lua).

To make replicating these errors easier I've attached a simple mod as an sdd archive. Try deleting a sound, unittexture, explosion, cursor, cob file etc to see the resulting error or crash. I've also left an error in it (game crash on unit death due to missing dead unit).

EDIT: Damn you forum! Stop deleting my attachments!
http://warriorhut.org/spring/mods/crashspring
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Better handling of missing content

Post by smoth »

bear in mind that when a ceg or ceg related something errors out you get crashes.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Better handling of missing content

Post by imbaczek »

put it on mantis plz.
Post Reply

Return to “Feature Requests”