#what does RangeError Maximum call stack size exceeded mean

1 messages · Page 1 of 1 (latest)

solar bolt
#

^

iron raptor
#

Hello, do you have a stacktrace and some example where it happens (which file and line) / information about when it happens? E.g. on export or at runtime at a what moment?

solar bolt
#

hi @iron raptor this happens in this screen recording

#

does that mean the file is too big?

solar bolt
#

i downloaded toktx but its still showing the rangeError 😦

#

this is from the console log

iron raptor
#

It sounds like something is calling itself. can you figure out where the original call is made?

#

I mean who makes the "get component in parent" call.

solar bolt
#

it seems like it’s from Three JS?

#

So it’s not from Needle Engine

iron raptor
#

How did you come to that conclusion? Does it always happen in that scene?

solar bolt
#

I only have 1 scene

#

So far

#

give me a second to verify

#

i will try this solution when i get back

iron raptor
#

This will not help here tho since youre not using unity's webgl build but you directly export to Threejs. Unity is not involved in errors at runtime (like the range error exception). So we must figure out whats causing the recursive calls (at least i assume thats the bug).

Some things to try:

  1. You can try looking at the stacktrace of the error in chrome (the arrow to the left of the error message to open it) and see if it contains any other info than this one method call

  2. try disabling parts of your scene and re export to figure out which object or part of the hierarchy is causing the error (when you disable one object and the error is gone it might be that the disabled object / a component on the object or its children is the cause - ideally find the component that causes it)

  3. if above fails please run "Help/Needle Engine/Zip Scene" and send me the zip in a DM. I can try having a look at it after the holidays

solar bolt
#

ah i see thank you so much for the comprehensive reply

#

i will try out those 2 options and let you know

#

happy holidays!

#

could it be due to where the "MyScene" is placed? I had to move around some file hierarchies after importing a Unity Asset Demo (which is the "Day_Demo")

solar bolt
#

Okay so i played around with it, but am running into errors

#

here are the console log

solar bolt
#

Okay I am running into an interesting error. I am able to get one building to render and show on the web page when the file hierarchy looks like the screenshot. But if I remove that building and replace it with the cafe building, i run into the same error of RangeError which means it is happening with the specific asset

#

I dont get why though because they are coming from the same pack

#

it says this

solar bolt
#

Also Im adding my terrain but it doesnt render in the web

#

Is there a special place the terrain has to be added?

#

So problem is 1) when i add some assets from my unity package that i bought, it doesnt show on the website. the website still renders other objects but doesn't render those assets. Im saving the project as well. 2) terrain doesnt render

iron raptor
#

About the terrain: you need to bake the mesh to a mesh renderer. We dont support exporting Unity Terrain out of the box right now

iron raptor
#

Would be great if you could make a scene with only the building that breaks it and then send us the zip using the help menu item (as described in my message from yesterday)

#

Thanks for trying! And wish you happy holidays too 🙂

solar bolt
#

Thanks so much! Here is the zip file of the scene and zip logs in a google drive link. https://drive.google.com/drive/folders/1xnJOeDhqyYAbbaWJNPIjyFhhej8iNNf1?usp=share_link

and

https://drive.google.com/drive/folders/1uzYMstaNS4lKoyuSPNjKn4J1eeBOQMJh?usp=share_link

I included just one building asset that leads to the message: "RangeError: Maximum call stack size exceeded" but there are also other assets that cause the web page to crash and some that don't. The simpler assets such as the traffic lights, vending machines in the same asset pack work and show on the webpage. Maybe it's because the building is too complex? But even then, it's not that much more of a larger asset.

My asset pack was bought from this Unity store: https://assetstore.unity.com/packages/3d/environments/urban/tokyo-street-228474

Elevate your workflow with the Tokyo Street asset from Art Equilibrium. Find this & other Urban options on the Unity Asset Store.

#

@iron raptor

solar bolt
#

hii there just wanted to bump @iron raptor

iron raptor
solar bolt
#

awesome tysm

iron raptor
#

The error reproduces 🙂

iron raptor
#

The error is caused by LODs with multimaterial objects and having a lod component on the mesh directly. It currently only works when the LODGroup component is on an empty parent.

#

e.g. having only this object in the scene breaks it

iron raptor
#

You can try updating to the latest version. LODGroups are not really supported for the models you use right now, but it shouldnt break rendering anymore

solar bolt
#

tysm i will check out this error today

solar bolt
#

Updating as in update to the latest version of Unity?

#

I'm still a bit confused on how to solve this problem. I updated Unity to the latest version but it still doesn't render. Are you saying that the solution for LODs with multimaterial objects is to have them be on an "empty parent" ? How would I do that @iron raptor

#

Thanks for the picture, I know get what an multimaterial object is

#

How do I get the LODgroup to move from being on the mesh directly to being on an empty parent? I am a beginner in unity. If you could show me pictures, that would be super helpful.

#

Appreciate your help debugging this 🙂

#

I tried unclicking LODgroup for every object where there are multiple materials, but it still doesn't render

#

But I don't think that's a solution, just tried playing around

spiral lotus
solar bolt
#

thank you so much it renders!!

solar bolt
# iron raptor About the terrain: you need to bake the mesh to a mesh renderer. We dont support...

re: the baking meshes so the terrain renders, i followed this video's instructions where they baked the mesh together using a plug in https://www.youtube.com/watch?v=UxkcC0uZ6D8 but it doesn't lead to the terrain to render. does it have to do with my file hierarchy (ie do i need to put the terrain file "above" the house level for it to bake?)

Simplest Mesh Baker is a free small plugin that helps you bake several meshes to one in a couple clicks.

Asset Store - https://assetstore.unity.com/packages/tools/utilities/simplest-mesh-baker-118123
Project sources - https://github.com/Kovnir/UnitySimplestMeshBaker
How to Bake Bones using Mesh Backer - https://youtu.be/95zAFspba1E

▶ Play video
#

this is what shows up

#

but when i click on bake meshes for just the terrain (when it doesn't include other files) it says baking 0 meshes. so i tried putting it inside the house asset and baked the two together but it still didnt work

iron raptor
#

What you need in the end is having a renderer (MeshRenderer) component instead of the Terrain component

#

Get the Mesh Terrain Editor Free package from zwcloud and speed up your game development process. Find this & other Terrain options on the Unity Asset Store.

GitHub

A Unity Plugin for Converting Terrain 2 Mesh & Terrain 2 Data for Runtime Virtual Texture. - GitHub - jinsek/MightyTerrainMesh: A Unity Plugin for Converting Terrain 2 Mesh & Terrai...