sol2uml icon indicating copy to clipboard operation
sol2uml copied to clipboard

Maximum call stack size exceeded

Open Nabeel-javaid opened this issue 1 year ago • 11 comments

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

Nabeel-javaid avatar Jan 13 '24 09:01 Nabeel-javaid

is there a repo I can test the Curves contract?

naddison36 avatar Jan 15 '24 00:01 naddison36

is there a repo I can test the Curves contract?

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

Nabeel-javaid avatar Jan 16 '24 09:01 Nabeel-javaid

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

veljkoTNFT avatar Jan 19 '24 14:01 veljkoTNFT

same error with node v21.6.1

deltartificial avatar Jan 24 '24 16:01 deltartificial

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.

naddison36 avatar Feb 12 '24 00:02 naddison36

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.

0xHristo avatar Feb 21 '24 13:02 0xHristo

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

CJ42 avatar Feb 23 '24 23:02 CJ42

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.

nicksinch avatar Mar 13 '24 12:03 nicksinch

up

MajdT51 avatar Jun 17 '24 12:06 MajdT51

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.

unboxedtype avatar Jun 20 '24 09:06 unboxedtype

Having the same issue

moribus-single avatar Jun 28 '24 14:06 moribus-single