naddison36 / sol2uml

Solidity contract visualisation tool
MIT License
1.12k stars 257 forks source link

Maximum call stack size exceeded #183

Open Nabeel-javaid opened 6 months ago

Nabeel-javaid commented 6 months ago

i've installed sol2uml using the command given in the readMe. but the issue is that when I try to generate a diagram it shows it error

image

I've tried both command

sol2uml contracts/ sol2uml contracts/Curve.sol

but still both of these command are giving me this eror

naddison36 commented 6 months ago

is there a repo I can test the Curves contract?

Nabeel-javaid commented 6 months ago

is there a repo I can test the Curves contract?

https://github.com/code-423n4/2024-01-curves

veljkoTNFT commented 6 months ago

I'm having the same error, but I can't share the repo.

deltartificial commented 5 months ago

same error with node v21.6.1

naddison36 commented 5 months ago

I added extra functionality to handle imports from imports and multi-level inheritance. Unfortunately, the recursive findAssociatedClass is not handling larger code bases.

I'm currently looking at rewriting the association logic with a graph library.

0xHristo commented 5 months ago

I found workaround. The problem as @naddison36 said is with the larger code bases but if you flatten the code base using some tool as hardhat's flatten or solidity-flattener you can run the sol2uml on the generated file and everything works properly.

CJ42 commented 4 months ago

Running sol2uml on the flattened file solved the issue for me!

nicksinch commented 4 months ago

I also tried running solidity-flattener and then ran sol2uml on the output file but this couldn't solve the issue for me (I still get the same call stack size exceeded error) (~913 sloc). I think it is got to do something with the circular dependecies imports of the smart contract repo.

MajdT51 commented 1 month ago

up

unboxedtype commented 1 month ago

Using solidity-flattener didn't work for me, it failed with the same stack overflow error. But the Hardhat flattener succeeded, and after that the tool worked.

moribus-single commented 3 weeks ago

Having the same issue