Skip to content
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

AssertionFailed: assertion failed: (2, 1) #7091

Open
kubukoz opened this issue Jan 8, 2025 · 0 comments
Open

AssertionFailed: assertion failed: (2, 1) #7091

kubukoz opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something that is making a piece of functionality unusable presentation-compiler Something relating to the presentation compiler Scala 2

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Jan 8, 2025

Describe the bug

I don't know how to reproduce this, but I randomly saw this in my logs:

[Error - 23:56:46] Request textDocument/completion failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.util.concurrent.ExecutionException: Boxed Exception
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:708)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194)
	at scala.meta.internal.metals.CancelTokens$.$anonfun$future$1(CancelTokens.scala:40)
	at scala.meta.internal.metals.CancelTokens$.$anonfun$future$1$adapted(CancelTokens.scala:38)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:484)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.util.concurrent.ExecutionException: Boxed Exception
	at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolve(Promise.scala:99)
	at scala.concurrent.impl.Promise$Transformation.handleFailure(Promise.scala:444)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:506)
	... 3 more
Caused by: java.lang.AssertionError: assertion failed: (2,1)
	at scala.reflect.internal.SymbolTable.throwAssertionError(SymbolTable.scala:185)
	at scala.reflect.internal.Symbols$Symbol.updateInfo(Symbols.scala:1593)
	at scala.meta.internal.pc.MetalsGlobal.shortSymbol$1(MetalsGlobal.scala:327)
	at scala.meta.internal.pc.MetalsGlobal.loop$1(MetalsGlobal.scala:409)
	at scala.meta.internal.pc.MetalsGlobal.shortType(MetalsGlobal.scala:538)
	at scala.meta.internal.pc.Signatures$SignaturePrinter.<init>(Signatures.scala:309)
	at scala.meta.internal.pc.completions.Completions.infoString(Completions.scala:288)
	at scala.meta.internal.pc.completions.Completions.infoString$(Completions.scala:285)
	at scala.meta.internal.pc.MetalsGlobal.infoString(MetalsGlobal.scala:36)
	at scala.meta.internal.pc.completions.Completions.detailString(Completions.scala:321)
	at scala.meta.internal.pc.completions.Completions.detailString$(Completions.scala:315)
	at scala.meta.internal.pc.MetalsGlobal.detailString(MetalsGlobal.scala:36)
	at scala.meta.internal.pc.CompletionProvider.$anonfun$completions$2(CompletionProvider.scala:110)
	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
	at scala.collection.Iterator.toStream(Iterator.scala:1417)
	at scala.collection.Iterator.toStream$(Iterator.scala:1416)
	at scala.collection.AbstractIterator.toStream(Iterator.scala:1431)
	at scala.collection.Iterator.$anonfun$toStream$1(Iterator.scala:1417)
	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1173)
	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1163)
	at scala.collection.immutable.StreamIterator.$anonfun$next$1(Stream.scala:1061)
	at scala.collection.immutable.StreamIterator$LazyCell.v$lzycompute(Stream.scala:1050)
	at scala.collection.immutable.StreamIterator$LazyCell.v(Stream.scala:1050)
	at scala.collection.immutable.StreamIterator.hasNext(Stream.scala:1055)
	at scala.collection.convert.Wrappers$IteratorWrapper.hasNext(Wrappers.scala:32)
	at scala.collection.convert.JavaCollectionWrappers$JIteratorWrapper.hasNext(JavaCollectionWrappers.scala:46)
	at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:619)
	at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:617)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:935)
	at scala.meta.internal.metals.AdjustLspData.adjustCompletionListInPlace(AdjustLspData.scala:93)
	at scala.meta.internal.metals.AdjustLspData.adjustCompletionListInPlace$(AdjustLspData.scala:92)
	at scala.meta.internal.metals.AdjustedLspData.adjustCompletionListInPlace(AdjustLspData.scala:110)
	at scala.meta.internal.metals.Compilers.$anonfun$completions$2(Compilers.scala:673)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467)
	... 3 more

Expected behavior

No response

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v.1.42

Extra context or search terms

No response

@kasiaMarek kasiaMarek added bug Something that is making a piece of functionality unusable presentation-compiler Something relating to the presentation compiler Scala 2 labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable presentation-compiler Something relating to the presentation compiler Scala 2
Projects
Status: Triage
Development

No branches or pull requests

2 participants