LOG: Index outside array boundaries

Post Reply
User avatar
Site Admin
Posts: 1826
Joined: December 15th, 2018, 3:25 am

LOG: Index outside array boundaries

Post by Arayas » September 21st, 2019, 12:05 pm

Many problems posted here are related to JUST one thing:

Game crash for no aprent reason.
First thing you have to do is go to MyDocuments/Euro Truck Simulator2 and open the file named "game.log.txt"
Scroll to the bottom of the file all the way to the last line. If your line is similar to this:
<ERROR> f:\build_bot\ssd_win_slave\final_build_ets2_135_windows_bin_steam_x64\build\prism\src\p3core\collections/arrays/arrays_base_impl.h(491): ??A?$array_t@PEAVnode_item_t@prism@@@prism@@QEAAAEAPEAVnode_item_t@1@_K@Z:
Index outside array boundaries.

you need to read this carefuly.

LET"S MAKE ONE THING CLEAR: THIS IS NOT RELATED TO THE FACT YOU HAVE A NASA COMPUTER! The game engine makes the game flow, your PC just offers the base.

Your game didn't crashed because of one mod, map or other type, your game engine crashed because the new game engine for 1.35, under DX11 or DX9, is weak.
Before 1.35 all the aspects i will describe now was translated as a simple FPS drop. Now, that's history. You will have FPS drop, but when the things got real heavy, the game engine shuts down itself.
Remember how a laptop got very hot during game playing? And how the laptop shuts down when the temperature was too high? This is similar.
How do we know that? Here are some reasons:
-a simple zoom in a combo of 2-3 maps leads to crash with the error posted above (Superzoom reduced the quality of the map for this to work)
-you can't play the game using the same mods as before without random crashes.
-the error posted above was very rare in previous versions and usualy before that error there was a explanation: a pmd file is malformed, or can't create texture, or a definition with wrong syntax.

So, you must understand a simple thing: ETS2 under new 1.35 is no longer fit to support alot of tasks like in the past. SCS did something to the game engine for DX11 implementation. This is why big games are changing the game engine from scratch.
For example, sience 2012, FIFA is on 3th generation of game engines to fit modern game demands.
SCS implemented DX11 to a game engine released in 19 October 2012!

NOW, about our problem: my game crashed and in my log the last line looks like the one posted above. Why?
This is the point you need to understand something: even seeing the game.log.txt, a second person can't help you! Because YOUR game crashed for YOUR reasons.
Another thing you need to understand is simple: in this stage the game can handle just a limited number of operations. By mods, everyone add suplimentary operations for the game engine:
apart from regular game, in the background the engine must convert the pmd files of outdated mods. If you see something like this (similar, not exact one) in your game.log.txt
00:04:22.448 : <WARNING> [model] Model geometry '/vehicle/trailer_cs/livestock/livestock_cs.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...
00:04:22.449 : <WARNING> [model] Model geometry '/vehicle/trailer_cs/livestock/cows.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...
00:04:22.748 : <WARNING> [model] Model geometry '/vehicle/trailer_rpl/fuel_cistern/petrol.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...
00:04:22.781 : <WARNING> [model] Model geometry '/vehicle/trailer_rpl/fuel_cistern/petrol_lod.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...
00:04:26.881 : <WARNING> [model] Model geometry '/vehicle/trailer_cs/flatuks/ribb_pipes.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...
00:04:26.884 : <WARNING> [model] Model geometry '/vehicle/trailer_cs/flatuks/ribb_pipes_lod.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...

is a sign one or many of your mods are outdated. As you see, the game engine has a suplimentary task: converting materials.

Many people create materials for the game, included in maps or standalone mods, but not everybody has the knowledge how to do an optimized material. Maybe it look nice and is already converted, but under the hood lays a redendering monster.
Huge number of polygons or huge textures for a simple model is suplimentary task for your game engine everytime the game uses that model. Adding huge number of bad models, most common AI traffic (trucks, trailers, other AI vehicles) is more likely to add a huge list of suplimentary tasks for your game engine.
More than that, if the truck you use is not a stock one, you must keep in mind there are very few mods who are well optimized (very-very few!!) mostly because their creators wants to make the truck look amaizing (a good thing) but with BIG redendering costs (a bad thing).
This is already a permanent suplimentary task for your game engine and this without leaving the garage!

sure, it looks real and nice but....

Graphic mods: changing a tree texture (and shadowing) from a 315kb file to a 5Mb file is not a easy task. Is like someone will tell you: "if you can carry this 2 litre bottle of juice up stairs means you can carry also this 200 litre barrel of oil on your way up." No, you can't.
A SCS sky texture is 10mb, a moded one can be 80mb. Did your game looks 8 times better? Because the engine works 8 times harder to do it. Same for everything changed by this mods: road, vegetation, buildings and so on...

Traffic mods: sure SCS traffic is sparse. But from there to a limit of 200 AI vehicles spawned at once is a looooong way. Do you see from your truck 200 AI vehicles? No, but the game struggle to fullfill your wish spawning AI in all places, more than 80% of it you dont get to even see.

Sound mods: more sounds, more problems. Custom sounds needs a Windows codec to work, so not only is more tasks for the game, but also it needs to ask Windows for help.

Other small mods: mods including lights, graphic rain and thunder effects, or any other mod who add textures bigger than the game needs is a suplimentary task.

Map mods: many maps are optimized, but also every map has some hot-spots. This are areas filled with too much detail or with wide long distance view or both.
Example, some extreme ones: parts of Spain in Promods, YKSRSK-Roex The Gates border, Kiev, St.Petersburg and so on. Crashes near Rzeszow are in this category also.
Every area with more than usual materials (and those are many in many maps) will add everytime a tone of suplimentary tasks to the game engine list. Keep in mind, the game is not redendering the area you are in, in the background the game is working on textures placed 1.5-0.7 km from your actual position.
So despite the fact you see just a road and a hill and you ask yourself why your FPS drops in such area, you dont know that your game is probably redendering the materials from a city placed in the other side of the hill already.
Getting close to another country on the map will trigger a suplimentary set of textures (licence plates, fonts and so on). Many maps will trigger also custom AI vehicles (police, trucks and so on) but many of them are old. Some are maintained, some are not.
Lately SCS upgraded their old vegetation, a good thing, but, for example, an area containing old spruces was lite on your FPS, the same area now with updated spruces textures will put a suplimentary task on your game.

A good example of "good" crash and game engine crash:
In the latest 3 episode stream from Wombat Trucker of a delivery from Norway to Jordan we had both examples
In episode 1 he had a "good" crash in Denmark. I'm calling it "good" because the game log told us there is a problem with some old MAT files from YKSRSK. I fixed that and all went well. That's an old good crash.
In episode 3 he had a "bad" crash in The Gates border between Turkey and Bulgaria. Reloading the game, all went smooth and the stream goes as usual. This is a sign of a "bad" crash. It acts just as an episode. That area is a "hard" detailed one, and to add on top of it, after the border hill is the city of Edirne, the border is the entry in a new country, so turkish fonts and licence plates are triggered. He thinks going 20 meters to the left helped the game go forward. False. The game is redendering materials in his view distance anything present in the area of 100-1500 meters, so if a bad material was crashing the game, it will crash the game the second time also, despite the small 20 meters detour. The reason this was worked well the second time is restarting the game, and the game engine cleared his task list to a smaller one.
SO, what can i do?
-you can do the buffer_size trick and set it to 20, 60 or whatever, or the pool_size or whatever. It helps, but is not the cure.

I can't use any mod? Yes, you can use many mods.
Most important is to select your mods. The maps are mostly the same, some are optimized in general but some are not. Despite the fact you want to travel all over the globe, some selection must be made. Is not up to me to point what maps are good or bad. We all know something about everything.

Custom trucks and trailers for the user (not AI packs) must be also selected. Is a simple way to check on them:
enble console and write in it "g_minicon 1" or
open the config file end modify <uset g_minicon "0"> to 1. View the truck in dealer AFTER you add all accesories you want, both from outside and inside cabin view. Watch in the upper-left corner a value named "tc:".

This are some examples of a stock truck and a custom truck:
stock truck (no accesories in my case)

Custom truck (no accesories in my case)

as you see in this case nothing bad hapened. But adding accesories may change the situation, this is why you must do this AFTER adding all tuning.
Use the stock truck values as values for comparition. 1mil tc for outside and 1,5-2 mil for inside seams to be ok. But keep in mind, that TC is the weight you are carrying with you in the game without leaving the dealer.

Select your AI mods. If an AI mod has unconverted materials (like in my example above, it must GO!) In my example the mod containing this file
Model geometry '/vehicle/trailer_cs/livestock/livestock_cs.pmg' has incorrect file version 506d6714 - expected version 506d6715. Converting...
is doomed, i must remove it.

Traffic mods. No matter what traffic mod you use it's better for you to edit it.
locate your traffic mod, and open the file def/traffic_data.sii
edit the value of <<<max_vehicle_count: xxx >>> to a smaller number, this is the number of maximum AI vehicles spawned in roads. 40 is ok but you can increase/decrease this in steps by 10.

This are general things. The real solution is individual. REPET: INDIVIDUAL!
you can clean your mod folder by your taste. If a mod with 500 AI trucks is more important to you versus a map, remove the map. Or other way around. But keeping a soup of companies, trailers, trucks, cars, maps, graphics and all the mods you can find online, is on you.
If you crash and your game log say:
<ERROR> f:\build_bot\ssd_win_slave\final_build_ets2_135_windows_bin_steam_x64\build\prism\src\p3core\collections/arrays/arrays_base_impl.h(491): ??A?$array_t@PEAVnode_item_t@prism@@@prism@@QEAAAEAPEAVnode_item_t@1@_K@Z: Index outside array boundaries.

don't ask for help. Nobody can clean your mod folder other than you. Good Luck!
Editor of Romania Extended Map
User avatar
Posts: 326
Joined: September 3rd, 2019, 3:44 pm
Location: S.W.WALES

Re: LOG: Index outside array boundaries

Post by Dogbert » September 21st, 2019, 2:59 pm

Brilliant post Arayas and thank you so much for taking the time to explain it all.

Yourself and Bengt are both really helpful in explaining the good and bad, in the game.

Even when it is nothing to do with RoEx or Turkey. 8-) 8-) 8-)

Time to get rid of the 15 jazzycat mods i have installed.

I prefer map mods to anything, because 1:19 scale makes everything so compressed. I like the map combo install to have more interesting and long drives.

Thanks again buddy.
Cymru Am Byth
Post Reply