{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1463","labels_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1463/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1463/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1463/events","html_url":"https://github.com/ceylon/ceylon-ide-eclipse/issues/1463","id":104741464,"number":1463,"title":"StackOverflowError when refining formal members","user":{"login":"bjansen","id":281528,"avatar_url":"https://avatars.githubusercontent.com/u/281528?v=3","gravatar_id":"","url":"https://api.github.com/users/bjansen","html_url":"https://github.com/bjansen","followers_url":"https://api.github.com/users/bjansen/followers","following_url":"https://api.github.com/users/bjansen/following{/other_user}","gists_url":"https://api.github.com/users/bjansen/gists{/gist_id}","starred_url":"https://api.github.com/users/bjansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjansen/subscriptions","organizations_url":"https://api.github.com/users/bjansen/orgs","repos_url":"https://api.github.com/users/bjansen/repos","events_url":"https://api.github.com/users/bjansen/events{/privacy}","received_events_url":"https://api.github.com/users/bjansen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/labels/high%20priority","name":"high priority","color":"d7e102"},{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/labels/WAITING_FOR_ANSWER","name":"WAITING_FOR_ANSWER","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"davidfestal","id":686586,"avatar_url":"https://avatars.githubusercontent.com/u/686586?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfestal","html_url":"https://github.com/davidfestal","followers_url":"https://api.github.com/users/davidfestal/followers","following_url":"https://api.github.com/users/davidfestal/following{/other_user}","gists_url":"https://api.github.com/users/davidfestal/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfestal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfestal/subscriptions","organizations_url":"https://api.github.com/users/davidfestal/orgs","repos_url":"https://api.github.com/users/davidfestal/repos","events_url":"https://api.github.com/users/davidfestal/events{/privacy}","received_events_url":"https://api.github.com/users/davidfestal/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/milestones/11","html_url":"https://github.com/ceylon/ceylon-ide-eclipse/milestones/1.2","labels_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/milestones/11/labels","id":822285,"number":11,"title":"1.2","description":"","creator":{"login":"gavinking","id":579974,"avatar_url":"https://avatars.githubusercontent.com/u/579974?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinking","html_url":"https://github.com/gavinking","followers_url":"https://api.github.com/users/gavinking/followers","following_url":"https://api.github.com/users/gavinking/following{/other_user}","gists_url":"https://api.github.com/users/gavinking/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinking/subscriptions","organizations_url":"https://api.github.com/users/gavinking/orgs","repos_url":"https://api.github.com/users/gavinking/repos","events_url":"https://api.github.com/users/gavinking/events{/privacy}","received_events_url":"https://api.github.com/users/gavinking/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":259,"state":"open","created_at":"2014-10-11T14:48:54Z","updated_at":"2015-09-24T13:36:20Z","due_on":"2014-11-23T23:00:00Z","closed_at":null},"comments":5,"created_at":"2015-09-03T17:11:46Z","updated_at":"2015-09-25T17:27:30Z","closed_at":null,"body":"This only happens in projects that have a lot of dependencies (think ceylon-ide-eclipse and ceylon-ide-intellij).\r\n\r\n- create a class or an object that satisfies a random interface, say `IdeCompletionManager` in ceylon-ide-common\r\n- call the quick fix \"Refine inherited formal members of xyz\"\r\n- observe the following error:\r\n\r\n```\r\njava.lang.StackOverflowError\r\n\tat org.eclipse.jdt.internal.core.JavaModelManager.getInfo(JavaModelManager.java:1970)\r\n\tat org.eclipse.jdt.internal.core.ClassFile.existsUsingJarTypeCache(ClassFile.java:200)\r\n\tat org.eclipse.jdt.internal.core.NameLookup.seekTypesInBinaryPackage(NameLookup.java:1051)\r\n\tat org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:1019)\r\n\tat org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:804)\r\n\tat com.redhat.ceylon.eclipse.core.model.JDTModelLoader$ModelLoaderNameEnvironment.findTypeInNameLookup(JDTModelLoader.java:576)\r\n\tat com.redhat.ceylon.eclipse.core.model.JDTModelLoader$ModelLoaderNameEnvironment.findTypeInNameLookup(JDTModelLoader.java:542)\r\n\tat com.redhat.ceylon.eclipse.core.model.JDTModelLoader.toType(JDTModelLoader.java:1053)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTType.<init>(JDTType.java:201)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTType.toTypeMirror(JDTType.java:125)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTType.<init>(JDTType.java:159)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTType.toTypeMirror(JDTType.java:125)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTTypeParameter.<init>(JDTTypeParameter.java:50)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTTypeParameter.<init>(JDTTypeParameter.java:40)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTClass$6.doWithBinding(JDTClass.java:472)\r\n\tat com.redhat.ceylon.eclipse.core.model.JDTModelLoader.doWithReferenceBinding(JDTModelLoader.java:928)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTClass.doWithBindings(JDTClass.java:393)\r\n\tat com.redhat.ceylon.eclipse.core.model.mirror.JDTClass.getTypeParameters(JDTClass.java:466)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.applyTypeArguments(AbstractModelLoader.java:4572)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.getNonPrimitiveType(AbstractModelLoader.java:4541)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.applyTypeArguments(AbstractModelLoader.java:4668)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.obtainTypeParameterBound(AbstractModelLoader.java:4702)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.applyTypeArguments(AbstractModelLoader.java:4616)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.getNonPrimitiveType(AbstractModelLoader.java:4541)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.applyTypeArguments(AbstractModelLoader.java:4668)\r\n\tat com.redhat.ceylon.model.loader.AbstractModelLoader.obtainTypeParameterBound(AbstractModelLoader.java:4702)\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/comments/143294961","html_url":"https://github.com/ceylon/ceylon-ide-eclipse/issues/1463#issuecomment-143294961","issue_url":"https://api.github.com/repos/ceylon/ceylon-ide-eclipse/issues/1463","id":143294961,"user":{"login":"bjansen","id":281528,"avatar_url":"https://avatars.githubusercontent.com/u/281528?v=3","gravatar_id":"","url":"https://api.github.com/users/bjansen","html_url":"https://github.com/bjansen","followers_url":"https://api.github.com/users/bjansen/followers","following_url":"https://api.github.com/users/bjansen/following{/other_user}","gists_url":"https://api.github.com/users/bjansen/gists{/gist_id}","starred_url":"https://api.github.com/users/bjansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjansen/subscriptions","organizations_url":"https://api.github.com/users/bjansen/orgs","repos_url":"https://api.github.com/users/bjansen/repos","events_url":"https://api.github.com/users/bjansen/events{/privacy}","received_events_url":"https://api.github.com/users/bjansen/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T17:27:30Z","updated_at":"2015-09-25T17:27:30Z","body":"`RefineFormalMembersProposal` basically operates in two steps:\r\n\r\n- first, it calls code completion in the child class' body (`ci`), and for each proposal `d`, it adds a refinement if:\r\n```\r\nd.isFormal() && ci.isInheritedFromSupertype(d)\r\n```\r\n- then it loops over `ci.getSupertypeDeclarations()`, and adds a refinement for each `shared` member in this supertype if it wasn't already added in the first step\r\n\r\nNow, I'm not really sure why the first step exists... And I don't know which of the two steps throws the SOE, I haven't debugged that yet and the stack trace is cut."}}