Assertion Failed sceneId < _scenes.size() \Horde3DEngine\egScene.cpp:1505

Summary:
Playing a game for several hours, attempt to roll back to the latest save. Assertion Failed error crash. Save loads fine after re-launching the game.

Error log:

2016-05-29 14:54:34.249000 | client |  0 |                      client.core | loading save "auto_save":
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | {
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 	"name" : "Auto save: ",
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 	"town_name" : "Kittenford",
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 	"game_date" : {
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 		"day" : 5,
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 		"month" : 5,
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 		"year" : 1000,
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 		"hour" : 4,
2016-05-29 14:54:34.249000 | client |  0 |                      client.core | 		"minute" : 8
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	},
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	"timestamp" : 1464558705353,
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	"time" : "5/29/2016, 2:51:45 PM",
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	"jobs" : {
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 		"crafters" : 6,
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 		"workers" : 9,
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 		"soldiers" : 9
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	},
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	"version" : "0.16.0.559",
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | 	"save_version" : 10
2016-05-29 14:54:34.249500 | client |  0 |                      client.core | }
2016-05-29 14:54:34.752566 | server |  1 |         simulation.remote_client | started buffering client updates. (seq:131970 ack:131960)
2016-05-29 14:54:36.105236 | client |  1 |                         lua.code | Shutting down script host.
2016-05-29 14:54:36.189753 | client |  0 |                              app | Assertion Failed: sceneId < _scenes.size()(C:\rb\ihome\root\SH-OB0-BUILD\stonehearth\source\horde3d\Source\Horde3DEngine\egScene.cpp:1505)

Attachments:
crash.dmp, stonehearth.log and save game: link

Versions and Mods:
Vanilla A16 R559 x64 w/ debug tools

System Information:
Windows 10 x64 w/ 8GB RAM
AMD FX-8350 CPU
Radeon R9 270X GPU on an Acer X193HQL LCD

From my limited experience this type of error has usually been associated with my graphics driver. I recently had to update my NVidia drivers due to an openGL issue.

I also saw this error in your log. I have been receiving this as well during combat. It seems to happen after I have paused the game and re-focused targets. Especially the Kobolds, I have to focus down those archers. Unsure if the two errors are related.

– Script Error (lua) Begin -------------------------------
2016-05-29 14:54:08.153683 | server | 0 | lua.code | start thinking called from non-stopped state "ready"
2016-05-29 14:54:08.153683 | server | 0 | lua.code | stack traceback:
2016-05-29 14:54:08.153683 | server | 0 | lua.code | [C]: ?
2016-05-29 14:54:08.153683 | server | 0 | lua.code | [C]: in function 'set_think_output’
2016-05-29 14:54:08.153683 | server | 0 | lua.code | …ctions/combat/move_to_targetable_location_action.lua:94: in function '_update_think_output’
2016-05-29 14:54:08.154183 | server | 0 | lua.code | …ctions/combat/move_to_targetable_location_action.lua:27: in function '_changed_cb’
2016-05-29 14:54:08.154183 | server | 0 | lua.code | radiant/modules/filtered_trace.lua:12: in function <radiant/modules/filtered_trace.lua:7>
2016-05-29 14:54:08.154183 | server | 0 | lua.code | – Lua Error End -------------------------------

@Geokhan I’ve tried and gotten the error on two different computers with two different graphic cards. The error is actually internally a part of the Horde3d engine which isn’t technically made by the Stonehearth authors; they use it in the game, though.

1 Like

@megashub, @ChickenNuggers (welcome to the forum, btw) are you using the latest drivers for your graphic cards?

@not_owen_wilson do you remember an error like this one?

Updated about a week ago on this computer, a month ago on the other computer. Pretty sure they’re all the most recent versions.

2 Likes

Yep. Same as @ChickenNuggers.

Also please note that this happens – at least for me – only when I load up a save. Never had it happen elsewhere.

Quick update: Just had this happen again on A17 D3002:

2016-06-10 17:48:59.629862 | client |  0 |                      client.core | loading save "auto_save":
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | {
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"name" : "Auto save: ",
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"town_name" : "Kittenford",
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"game_date" : {
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"day" : 29,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"month" : 5,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"year" : 1000,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"hour" : 12,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"minute" : 1
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	},
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"timestamp" : 1465605854802,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"time" : "6/10/2016, 5:44:14 PM",
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"jobs" : {
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"crafters" : 8,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"workers" : 8,
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 		"soldiers" : 9
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	},
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"version" : "0.17.0.3002",
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | 	"save_version" : 10
2016-06-10 17:48:59.630363 | client |  0 |                      client.core | }
2016-06-10 17:49:00.166930 | server |  1 |         simulation.remote_client | started buffering client updates. (seq:37063 ack:37053)
2016-06-10 17:49:01.256070 | client |  1 |                         lua.code | Shutting down script host.
2016-06-10 17:49:01.454617 | client |  1 |                         lua.code | Script host destroyed.
2016-06-10 17:49:01.479597 | client |  0 |                  physics.navgrid | subspace pathfinder is enabled
2016-06-10 17:49:01.667621 | server |  0 |                  simulation.core | Restarting game.
2016-06-10 17:49:01.938156 | server |  1 |                  simulation.core | Shutting down traces.
2016-06-10 17:49:01.957160 | server |  1 |                  simulation.core | Shutting down game objects.
2016-06-10 17:49:02.389713 | server |  1 |                  simulation.core | All entities and datastores have been destroyed.
2016-06-10 17:49:02.446720 | server |  1 |                         lua.code | Shutting down script host.
2016-06-10 17:49:02.881776 | server |  1 |                         deferred | [deferred 853 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.881776 | server |  1 |                         deferred | [deferred 23248 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.881776 | server |  1 |                         deferred | [deferred 966 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.881776 | server |  1 |                         deferred | [deferred 25214 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.881776 | server |  1 |                         deferred | [deferred 48003 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 38244 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 30617 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 30636 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 38323 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 48009 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 49384 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 51740 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:02.882276 | server |  1 |                         deferred | [deferred 51773 'set game speed']  caught exception in Reject: bad_weak_ptr
2016-06-10 17:49:03.303829 | server |  1 |                         lua.code | Script host destroyed.
2016-06-10 17:49:03.890904 | server |  1 |                  simulation.core | Shutting down data objects.
2016-06-10 17:49:03.910407 | server |  0 |                  physics.navgrid | subspace pathfinder is enabled
2016-06-10 17:49:03.917906 | server |  0 |                  simulation.core | Loading save
2016-06-10 17:49:06.000173 | server |  1 |                         dm.store |  load progress 53%...
2016-06-10 17:49:06.041177 | client |  0 |                          sysinfo | Memory Stats: Fatal Exception
2016-06-10 17:49:06.041177 | client |  0 |                          sysinfo |  Total System Memory:     7.965 GB (8552861696 bytes)
2016-06-10 17:49:06.041177 | client |  0 |                          sysinfo |  Current Memory Usage:    2.058 GB (2210271232 bytes)
2016-06-10 17:49:06.041177 | client |  0 |                          sysinfo |  Total Address Space:     128.000 TB (140737488224256 bytes)
2016-06-10 17:49:06.041177 | client |  0 |                          sysinfo |  Available Address Space: 127.996 TB (140733537198080 bytes)
2016-06-10 17:49:06.041177 | client |  0 |                          sysinfo |  Used Address Space:      3.680 GB (3951026176 bytes)
2016-06-10 17:49:08.000243 | server |  1 |                         dm.store |  load progress 77%...

Attachments:
dmp, log, save

Pointers… x__x

Thanks for the files, @megashub!

Pinging: @Albert / @not_owen_wilson

1 Like

Wouldn’t it give an error about compiling if you were trying to compare a pointer to an integer-based type? O.o

Don’t know. I googled for bad_weak_ptr and it says it’s an error that happens when you try to reference already deleted objects ._.

This log looks different than the first one anyway.

1 Like

Indeed it does. I put it here because the end user game experience was the same (symptom-wise).

1 Like

Seems like dynamic memory allocation done wrong? O.o Anyways this is more an error in the Horde 3D engine, isn’t it?

got the same thing:

stonehearth.log (1.4 MB)
crash.dmp (159.7 KB)

also occurs on load

1 Like

I just encountered this. Same as @megashub and @jjjshab, the error occurred while attempting to roll back to a previous save mid-game. This occurred in A19 release 3181.

stonehearth.log (26.6 KB)
crash.dmp (291.9 KB)

1 Like

Hmm. What version are you playing?

1 Like

Whoops, sorry! Post updated.