Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Maximum call stack size exceeded #5

Closed
nyvs opened this issue Jan 13, 2022 · 2 comments
Closed

Maximum call stack size exceeded #5

nyvs opened this issue Jan 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nyvs
Copy link

nyvs commented Jan 13, 2022

RangeError: Maximum call stack size exceeded at readFile (/usr/lib/node_modules/cpp-merge/lib/parse/utils.js:31:15) at CppFileMerger.parseFile (/usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:44:50) at CppFileMerger.parseIncludedFile (/usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:68:21) at /usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:49:25 at Array.map (<anonymous>) at CppFileMerger.parseFile (/usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:48:59) at CppFileMerger.parseIncludedFile (/usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:68:21) at /usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:49:25 at Array.map (<anonymous>) at CppFileMerger.parseFile (/usr/lib/node_modules/cpp-merge/lib/parse/CppFileMerger.js:48:59)

@FastAlien
Copy link
Owner

Hi, this error could be caused by circular includes. But it's only a guess. Without access to source files which caused this problem there not much I can do. Could you please attach example allowing to reproduce this issue?

@FastAlien
Copy link
Owner

FastAlien commented Jan 13, 2022

I've reproduced and fixed this issue (bd4d4db). Reported error shouldn't occur anymore but I can't guarantee that generated file will compile. This tool is not analyzing content of header and source files so it doesn't "understand" source code. You should fix circular dependencies in your project by moving common parts to separate header file. Thank you for reporting this problem.

@FastAlien FastAlien added the bug Something isn't working label Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants