Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Maximum call stack size exceeded #183

Open
Nabeel-javaid opened this issue Jan 13, 2024 · 12 comments
Open

Maximum call stack size exceeded #183

Nabeel-javaid opened this issue Jan 13, 2024 · 12 comments

Comments

@Nabeel-javaid
Copy link

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
Copy link
Owner

is there a repo I can test the Curves contract?

@Nabeel-javaid
Copy link
Author

is there a repo I can test the Curves contract?

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

@veljkoTNFT
Copy link

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

@deltartificial
Copy link

same error with node v21.6.1

@naddison36
Copy link
Owner

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
Copy link

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
Copy link

CJ42 commented Feb 23, 2024

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

@nicksinch
Copy link

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
Copy link

MajdT51 commented Jun 17, 2024

up

@unboxedtype
Copy link

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
Copy link

Having the same issue

@sambacha
Copy link

you could also try creating a dummy contract that just imports the contract you want to work with as well if flattening did not work.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests