{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/pfff/issues/72","labels_url":"https://api.github.com/repos/facebook/pfff/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/facebook/pfff/issues/72/comments","events_url":"https://api.github.com/repos/facebook/pfff/issues/72/events","html_url":"https://github.com/facebook/pfff/issues/72","id":27880329,"number":72,"title":"Stack overflow when running codegraph -build","user":{"login":"weirdan","id":57403,"avatar_url":"https://avatars.githubusercontent.com/u/57403?v=3","gravatar_id":"","url":"https://api.github.com/users/weirdan","html_url":"https://github.com/weirdan","followers_url":"https://api.github.com/users/weirdan/followers","following_url":"https://api.github.com/users/weirdan/following{/other_user}","gists_url":"https://api.github.com/users/weirdan/gists{/gist_id}","starred_url":"https://api.github.com/users/weirdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weirdan/subscriptions","organizations_url":"https://api.github.com/users/weirdan/orgs","repos_url":"https://api.github.com/users/weirdan/repos","events_url":"https://api.github.com/users/weirdan/events{/privacy}","received_events_url":"https://api.github.com/users/weirdan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-02-19T14:55:08Z","updated_at":"2015-10-12T23:31:12Z","closed_at":"2014-03-13T02:09:03Z","body":"> OCAMLRUNPARAM='b,s=64M' ~/src/pfff/codegraph -lang php -derived_data -build .\r\n\r\nfails with\r\n```\r\n  nb nodes = 141231, nb edges = 452232\r\n  parse errors = 145\r\n  lookup fail = 12524\r\n  unresolved method calls = 107673\r\n  (resolved method calls = 166339)\r\n  unresolved field access = 22414\r\n  (resolved field access) = 115687)\r\n  unresolved class access = 3551\r\n  unresolved calls = 2629\r\n  Fatal error: exception Stack_overflow\r\n  Raised by primitive operation at file \"hashtbl.ml\", line 135, characters 16-31\r\n  Called from file \"graph_code.ml\", line 356, characters 15-27\r\n  Called from file \"layer_graph_code.ml\", line 52, characters 19-40\r\n  Called from file \"list.ml\", line 55, characters 20-23\r\n  Called from file \"list.ml\", line 55, characters 32-39\r\n  Called from file \"list.ml\", line 55, characters 32-39\r\n  Called from file \"list.ml\", line 55, characters 32-39\r\n  ....\r\n```\r\npfff version is 7f93e68c0654b3b25e50d996a92a7d191a513891\r\n\r\nIncreasing stack size with OCAMLRUNPARAM doesn't help (tried with 512MB)."},"comment":{"url":"https://api.github.com/repos/facebook/pfff/issues/comments/147548590","html_url":"https://github.com/facebook/pfff/issues/72#issuecomment-147548590","issue_url":"https://api.github.com/repos/facebook/pfff/issues/72","id":147548590,"user":{"login":"krishnavaidy","id":3193954,"avatar_url":"https://avatars.githubusercontent.com/u/3193954?v=3","gravatar_id":"","url":"https://api.github.com/users/krishnavaidy","html_url":"https://github.com/krishnavaidy","followers_url":"https://api.github.com/users/krishnavaidy/followers","following_url":"https://api.github.com/users/krishnavaidy/following{/other_user}","gists_url":"https://api.github.com/users/krishnavaidy/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnavaidy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnavaidy/subscriptions","organizations_url":"https://api.github.com/users/krishnavaidy/orgs","repos_url":"https://api.github.com/users/krishnavaidy/repos","events_url":"https://api.github.com/users/krishnavaidy/events{/privacy}","received_events_url":"https://api.github.com/users/krishnavaidy/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T23:31:12Z","updated_at":"2015-10-12T23:31:12Z","body":"I faced the same issue when running codegraph on the android codebase. I was able to run codegraph on subdirectories, but when running on the entire codebase I got a stack overflow. A very imperfect solution I tried was: run it on subdirectories creating separate graphs, and then merge them outside pfff. The connections between the separate graph were not perfect, but it had to do.\r\n\r\nI wasn't able to find out why the stack overflow happened. I thought it was because pfff is mainly used to find the architecture of a codebase, and may not perhaps play nice with very huge codebases.\r\n\r\nIf you have any clues as to why this is happening, I would be very interested. "}}