{"action":"opened","issue":{"url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/602","repository_url":"https://api.github.com/repos/redhat-developer/vscode-java","labels_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/602/comments","events_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/602/events","html_url":"https://github.com/redhat-developer/vscode-java/issues/602","id":346897064,"node_id":"MDU6SXNzdWUzNDY4OTcwNjQ=","number":602,"title":"Extension hangs with org.eclipse.jface.text.BadLocationException","user":{"login":"lashchev","id":10738657,"node_id":"MDQ6VXNlcjEwNzM4NjU3","avatar_url":"https://avatars3.githubusercontent.com/u/10738657?v=4","gravatar_id":"","url":"https://api.github.com/users/lashchev","html_url":"https://github.com/lashchev","followers_url":"https://api.github.com/users/lashchev/followers","following_url":"https://api.github.com/users/lashchev/following{/other_user}","gists_url":"https://api.github.com/users/lashchev/gists{/gist_id}","starred_url":"https://api.github.com/users/lashchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lashchev/subscriptions","organizations_url":"https://api.github.com/users/lashchev/orgs","repos_url":"https://api.github.com/users/lashchev/repos","events_url":"https://api.github.com/users/lashchev/events{/privacy}","received_events_url":"https://api.github.com/users/lashchev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-02T07:46:29Z","updated_at":"2018-08-02T07:46:29Z","closed_at":null,"author_association":"NONE","body":"Pretty often when I am refactoring my code and there (one or two files contain pretty broken code) - extension hangs and all it's features stop working.\r\n\r\nRestarting VSCode fixes the issue.\r\n\r\nMy project is super simple (5 classes), has rudimentary pom.xml.\r\n\r\nOutput window for Language Support for Java shows this error:\r\n```\r\n[Error - 9:07:53 PM] Aug 1, 2018 9:07:02 PM \r\nnull\r\norg.eclipse.jface.text.BadLocationException\r\n\tat org.eclipse.jface.text.TreeLineTracker.fail(TreeLineTracker.java:1051)\r\n\tat org.eclipse.jface.text.TreeLineTracker.lineByOffset(TreeLineTracker.java:265)\r\n\tat org.eclipse.jface.text.TreeLineTracker.getLineNumberOfOffset(TreeLineTracker.java:1119)\r\n\tat org.eclipse.jface.text.AbstractLineTracker.getLineNumberOfOffset(AbstractLineTracker.java:151)\r\n\tat org.eclipse.jface.text.AbstractDocument.getLineOfOffset(AbstractDocument.java:868)\r\n\tat org.eclipse.core.internal.filebuffers.SynchronizableDocument.getLineOfOffset(SynchronizableDocument.java:331)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.JsonRpcHelpers.toLine(JsonRpcHelpers.java:60)\r\n\tat org.eclipse.jdt.ls.core.internal.JDTUtils.toRange(JDTUtils.java:466)\r\n\tat org.eclipse.jdt.ls.core.internal.JDTUtils.toLocation(JDTUtils.java:380)\r\n\tat org.eclipse.jdt.ls.core.internal.JDTUtils.toLocation(JDTUtils.java:342)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.DocumentSymbolHandler.collectChildren(DocumentSymbolHandler.java:75)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.DocumentSymbolHandler.collectChildren(DocumentSymbolHandler.java:68)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.DocumentSymbolHandler.getOutline(DocumentSymbolHandler.java:52)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.DocumentSymbolHandler.documentSymbol(DocumentSymbolHandler.java:44)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$12(JDTLanguageServer.java:532)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$23(JDTLanguageServer.java:732)\r\n\tat java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)\r\n\tat java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)\r\n\tat java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)\r\n\tat java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)\r\n\tat java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)\r\n\tat java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)\r\n\tat java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)\r\n```\r\nSame error and stack dump can be found in the log that I open with \"Java: Open Java Language Server log file\".\r\n\r\n(related?) Dev Tools console log contains quite a lot copies of this warning:\r\n```\r\n WARN Error: listener failed\r\n    at workbench.main.js:sourcemap:4061\r\n    at Object.g [as _notify] (workbench.main.js:sourcemap:150)\r\n    at Object.enter (workbench.main.js:sourcemap:154)\r\n    at n.Class.derive._oncancel._run (workbench.main.js:sourcemap:155)\r\n    at n.Class.derive._oncancel._completed (workbench.main.js:sourcemap:155)\r\n    at e.resolveOk (workbench.main.js:sourcemap:3060)\r\n    at e._receiveReply (workbench.main.js:sourcemap:3127)\r\n    at e._receiveOneMessage (workbench.main.js:sourcemap:3126)\r\n    at workbench.main.js:sourcemap:3125\r\n    at workbench.main.js:sourcemap:3128\r\n    at e.fire (workbench.main.js:sourcemap:171)\r\n    at c (workbench.main.js:sourcemap:302)\r\n    at Socket.<anonymous> (workbench.main.js:sourcemap:303)\r\n    at emitOne (events.js:96)\r\n    at Socket.emit (events.js:191)\r\n    at readableAddChunk (_stream_readable.js:178)\r\n    at Socket.Readable.push (_stream_readable.js:136)\r\n    at Pipe.onread (net.js:560)\r\n```\r\nI was experiencing the same issue with the previous version of the extension.\r\n\r\nWhen extension hangs, VSCode status bar usually says \"Validating document - 0%\"\r\n\r\n##### Environment\r\n- Operating System: Win10 v1803\r\n- JDK version: 1.8.0_181\r\n- Visual Studio Code version: 1.25.1\r\n- Java extension version: 0.29.0\r\n\r\n##### Steps To Reproduce\r\nNot quite sure about the pattern or repro yet, but happens like every hour (=pretty often).\r\n\r\n"}}
{"actor":{"display_login":"lashchev"}}