93place
0 votes Vote

Running into Thread Failed

Hey, this error sometimes occurs when I'm generating tiles. I believe it's caused by generating objects on the tile that have their Terrain Normals checked. It's not a common issue, but it can cause my game to not work properly. This error also causes the tile to never return true when I check if the tile has finished generating. This can be a problem when I'm waiting to spawn my player until the starting tiles have finished generating, but if one of the starting tiles throws this error, my player will never spawn.

I've detailed this problem in his video here, so feel free to watch this:
https://www.youtube.com/watch?v=akW8HktihTM

I've also attached my sample project which I used in the video to demonstrate how I can replicate this problem. Here is the project:
https://drive.google.com/file/d/1yO71vtoEofd0P2UYpwkLmZgUEPUfRy1g/view?usp=sharing

Steps I took in the video, and how I was able to reproduce this.
1. I created a new Unity project.
2. I imported MapMagic 2 Bundle (version 2.1.4)
3. Created a simple graph that generates a basic terrain, and scatters objects across the terrain with their Terrain Normals CHECKED. (The object I used to spawn was just a simple unity cube prefab)
4. Created a MapMagic object and assigned its graph data.
5. Set tile size to 32, since that's what my game will be doing.
6. Started pinning tiles until a thread failed error arises.

You can watch the video I linked to watch the steps I took to reproduce.

Also, I'm using Unity version 2020.2.1f1

cmooref17, 17.05.2021, 04:49
Idea status: under consideration

Comments

Denis, 18.05.2021, 19:48
Thanks for reporting such clear steps to reproduce!
I will look into this issue on bugfix for 2.1.5
Denis, 01.06.2021, 00:50
Same, still can't reproduce. It might be related with the number of tiles - despite of their size each has a full-scale resolution of 513, and pinning 10*10 tiles will generate 100 of them - it does not matter whether they are 1000 or 32. Anyways it's worth reducing the map size.

However it doesn't neglect that there is an issue.
Wraith, 01.06.2021, 18:14
Tried to reproduce these two bugs (http://mm2.idea.informer.com/proj/?ia=136412) the whole day. Seems that I'm missing something. Now I'm not even sure it worked once.

It's the deadline for submitting 2.1.5. Will try to reproduce it for 2.1.6, but it seems to be something machine-specific or something.
¯\_(ツ)_/¯

BTW: could you please try disabling the c++ native code in window -> mm settings? C# should work absolutely similar on all machines, but it is significantly slower. But at least it can give a clue.
Calandryll, 06.06.2021, 02:38
I reported this issue on the Unity forums and posting more info as requested.

I'm seeing this issue now even with a 5x5 terrain. Link to my graph is below:

https://drive.google.com/file/d/1q8TPjPQ5mg5BvpZVuJdI9Df_X7EgIK8t/view?usp=sharing

Leave a comment