[SOLVED] Wrong cubemitter path can crash game

Just an observation of mine during some experiments with cubemitters:
If one creates his own effect and addresses the according cubemitter wrong (i.e. wrong file path), the renderer crashes completely.

Log excerpt for details (I arbitrarily used a wrong path to demonstrate error):

2016-10-25 19:17:11.076659 | server | 0 | ai.execution_frame | (4309 Mard Berall) [stonehearth:top] ai slow start is 0
2016-10-25 19:17:11.142185 | server | 2 | simulation.core | game loop exhausted before any jobs processed!
2016-10-25 19:17:11.205870 | server | 2 | simulation.core | game loop exhausted before any jobs processed!
2016-10-25 19:17:12.232955 | server | 2 | simulation.core | game loop exhausted before any jobs processed!
2016-10-25 19:17:27.633165 | client | 0 | renderer.renderer | failed to find render resource bbq/data/horde/particles/fire/smoke_plume_large.cubemitter.json reason: invalid file path ‘stonehearth/data/horde/bbq/data/horde/particles/fire/smoke_plume_large.cubemitter.json’.
2016-10-25 19:17:27.633165 | client | 2 | horde.general | Resource ‘bbq/data/horde/particles/fire/smoke_plume_large.cubemitter.json’ of type 14: No data loaded (file not found?)
2016-10-25 19:17:27.633165 | client | 0 | sysinfo | Memory Stats: Fatal Exception
2016-10-25 19:17:27.633165 | client | 0 | sysinfo | Total System Memory: 15.944 GB (17119956992 bytes)
2016-10-25 19:17:27.633165 | client | 0 | sysinfo | Current Memory Usage: 361.680 MB (379248640 bytes)
2016-10-25 19:17:27.633165 | client | 0 | sysinfo | Total Address Space: 128.000 TB (140737488224256 bytes)
2016-10-25 19:17:27.633165 | client | 0 | sysinfo | Available Address Space: 127.999 TB (140736157278208 bytes)
2016-10-25 19:17:27.633165 | client | 0 | sysinfo | Used Address Space: 1.240 GB (1330946048 bytes)
2016-10-25 19:17:28.222619 | server | 1 | simulation.remote_client | started buffering client updates. (seq:311 ack:301)

I just wanted to bring this to attention, in case someone at TR wants to add some try/catch to the engine (or wherever that problem actually hits), to prevent an incorrect effect from loading and crashing the whole game. Don’t know, how important that might be. If not, please just close and forget :slight_smile:

Regards
Chris

1 Like

Hi,
I’ve made a fix for this. Look for it in the next release.
Thanks
-Yang

4 Likes

That’s nice. Better than beeing scolded for breaking the game (on purpose) :smile:

Cheers
Chris

2 Likes

@yshan did this make it into release 687?

I think it made it, but @BarbeQ might be able to confirm faster.

Yes, I can confirm. Using an invalid json just doesn’t render the cubemitter, now. No crash anymore :smiley:
@jomaxro, @Relyss

3 Likes