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

Crash on opening/navigating any Swift file #36

Open
VVVHawk opened this issue Nov 26, 2024 · 2 comments
Open

Crash on opening/navigating any Swift file #36

VVVHawk opened this issue Nov 26, 2024 · 2 comments

Comments

@VVVHawk
Copy link

VVVHawk commented Nov 26, 2024

Hey there, I have a React Native application that I need to modify some files of the native iOS app of. I tried the Switft plugin, but every time I open any Swift file or try to do any action - navigate, go to declaration, find usages of symbols etc, it crashes with this error:

CopyTBXReferenceProvider#presentation@MainMenu (CopyTBXReferenceProvider), actionId=CopyTBXReference, text='Toolbox URL'

java.lang.IllegalStateException: SSMSW
	at swift.z.h(z.java:114)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at swift.z.l(z.java:97)
	at swift.z.E(z.java:46)
	at swift.dy.<init>(dy.java:4498)
	at swift.im.e(im.java:1107)
	at swift.dc.B(dc.java:11)
	at swift.si.S(si.java:135)
	at swift.si.D(si.java:123)
	at swift.si.L(si.java:99)
	at swift._p.invokeSuspend(_p.java:42)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:111)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$BuildersKt__BuildersKt(Builders.kt:84)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:52)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at swift.si.I(si.java:41)
	at swift.si.s(si.java:32)
	at swift.ar.N(ar.java:81)
	at swift.ar.h(ar.java:71)
	at swift.ar.R(ar.java:33)
	at swift.ar.s(ar.java:24)
	at swift._9.multiResolve(_9.java:48)
	at swift._9.resolve(_9.java:39)
	at com.intellij.ide.actions.FqnUtil.elementToFqn(FqnUtil.java:41)
	at com.intellij.ide.actions.CopyTBXReferenceAction.createJetBrainsLink$lambda$1(CopyTBXReferenceAction.kt:48)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:791)
	at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:830)
	at com.intellij.ide.actions.CopyTBXReferenceAction.createJetBrainsLink(CopyTBXReferenceAction.kt:51)
	at com.intellij.ide.actions.CopyTBXReferenceProvider.getQualifiedName(CopyPathProvider.kt:148)
	at com.intellij.ide.actions.CopyPathProvider.update(CopyPathProvider.kt:47)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate$lambda$2(ActionUtil.kt:226)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.kt:244)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$success$1$1$1.invoke(ActionUpdater.kt:501)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$success$1$1$1.invoke(ActionUpdater.kt:500)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$2$1.invoke(ActionUpdater.kt:145)
	at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:114)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable$lambda$4(InternalReadAction.kt:104)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$3$lambda$2$lambda$1(cancellableReadAction.kt:32)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:351)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:971)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$3$lambda$2(cancellableReadAction.kt:30)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:28)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:103)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:87)
	at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:74)
	at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:16)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invokeSuspend(InternalReadAction.kt:36)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
	at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:35)
	at com.intellij.openapi.application.rw.PlatformReadWriteActionSupport.executeReadAction(PlatformReadWriteActionSupport.kt:38)
	at com.intellij.openapi.application.ReadWriteActionSupport.executeReadAction$default(ReadWriteActionSupport.kt:15)
	at com.intellij.openapi.application.CoroutinesKt.constrainedReadActionUndispatched(coroutines.kt:86)
	at com.intellij.openapi.application.CoroutinesKt.readActionUndispatched(coroutines.kt:73)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$$inlined$useWithScope$1.invokeSuspend(trace.kt:61)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$$inlined$useWithScope$1.invoke(trace.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$$inlined$useWithScope$1.invoke(trace.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.kt:882)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.access$callAction(ActionUpdater.kt:77)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$success$1$1.invokeSuspend(ActionUpdater.kt:500)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$success$1$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$success$1$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$$inlined$retryOnAwaitSharedData$1.invokeSuspend(ActionUpdater.kt:831)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$$inlined$retryOnAwaitSharedData$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateAction$$inlined$retryOnAwaitSharedData$1.invoke(ActionUpdater.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateAction(ActionUpdater.kt:933)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.access$updateAction(ActionUpdater.kt:77)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$iterateGroupChildren$1$tree$1.invokeSuspend(ActionUpdater.kt:447)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$iterateGroupChildren$1$tree$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$iterateGroupChildren$1$tree$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$iterateGroupChildren$1.invokeSuspend(ActionUpdater.kt:463)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$iterateGroupChildren$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$iterateGroupChildren$1.invoke(ActionUpdater.kt)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:226)
	at kotlinx.coroutines.flow.FlowKt__CollectionKt.toCollection(Collection.kt:22)
	at kotlinx.coroutines.flow.FlowKt.toCollection(Unknown Source)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$expandedChildren$1.invokeSuspend(ActionUpdater.kt:594)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$expandedChildren$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$expandedChildren$1.invoke(ActionUpdater.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$1$1$invokeSuspend$$inlined$useWithScope$1.invokeSuspend(trace.kt:59)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$1$1$invokeSuspend$$inlined$useWithScope$1.invoke(trace.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$1$1$invokeSuspend$$inlined$useWithScope$1.invoke(trace.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$1$1.invokeSuspend(ActionUpdater.kt:882)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
Caused by: java.lang.ClassNotFoundException: swift.SSMSW PluginClassLoader(plugin=PluginDescriptor(name=Swift Support, id=dev.j-a.swift, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/WebStorm2024.3/plugins/swift-plugin-private, version=1.2.0.365-243, package=null, isBundled=false), packagePrefix=null, state=active, parents=PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.impl, descriptorPath=intellij.platform.vcs.impl.xml, path=/Applications/WebStorm.app/Contents/lib, version=243.21565.180, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.log.impl, descriptorPath=intellij.platform.vcs.log.impl.xml, path=/Applications/WebStorm.app/Contents/lib, version=243.21565.180, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.dvcs.impl, descriptorPath=intellij.platform.vcs.dvcs.impl.xml, path=/Applications/WebStorm.app/Contents/lib, version=243.21565.180, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.collaborationTools, descriptorPath=intellij.platform.collaborationTools.xml, path=/Applications/WebStorm.app/Contents/lib, version=243.21565.180, package=null, isBundled=true), )
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:157)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:534)
	at java.base/java.lang.Class.forName(Class.java:513)
	at java.base/java.lang.invoke.MethodHandles$Lookup.findClass(MethodHandles.java:2869)
	at swift.z.h(z.java:104)
	... 111 more

M3 MBP on MacOS 15.0,
WebStorm version is 2024.3,
Xcode is 16.0

Let me know if I can provide any other useful information.

@VVVHawk VVVHawk changed the title Crash on opening/navigating any .swift file Crash on opening/navigating any Swift file Nov 26, 2024
@YouHaveToDo
Copy link

I have same problem..

@jansorg
Copy link
Owner

jansorg commented Dec 3, 2024

I've identified the cause and I'm preparing a new release with a fix. It should be available this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants