Skip to content

Crash on "Maximum call stack size exceeded" on missing file #236

New issue

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

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

Already on GitHub? Sign in to your account

Open
drortirosh opened this issue May 6, 2025 · 0 comments
Open

Crash on "Maximum call stack size exceeded" on missing file #236

drortirosh opened this issue May 6, 2025 · 0 comments

Comments

@drortirosh
Copy link

When some included file is missing, it aborts on endless loop, without even reporting the missing include.
e.g.:

$ git clone [email protected]:eth-infinitism/account-abstraction.git
$ cd account-abstraction
$ sol2uml contracts

RangeError: Maximum call stack size exceeded
    at findChainedImport (/Users/dror/.nvm/versions/node/v20.16.0/lib/node_modules/sol2uml/lib/associations.js:112:27)
    at findAssociatedClass (/Users/dror/.nvm/versions/node/v20.16.0/lib/node_modules/sol2uml/lib/associations.js:19:26)
    at findChainedImport (/Users/dror/.nvm/versions/node/v20.16.0/lib/node_modules/sol2uml/lib/associations.js:133:58)
    ...

This happens even if the file was ignored manually
e.g.:
This works:

 $ sol2uml contracts/interfaces
Generated svg file /Users/dror/IdeaProjects/account-abstraction/classDiagram.svg

But removing an inherited interface:

 $ sol2uml contracts/interfaces/ -i INonceManager.sol
RangeError: Maximum call stack size exceeded
    at findChainedImport (/Users/dror/.nvm/versions/node/v20.16.0/lib/node_modules/sol2uml/lib/associations.js:112:27)
    at findAssociatedClass (/Users/dror/.nvm/versions/node/v20.16.0/lib/node_modules/sol2uml/lib/associations.js:19:26)

crashes...

Suggestion

  • At a minimum, report the name of the missing file.
  • Give an option to skip missing files (e.g. inherited library)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant