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

java.lang.NullPointerException: Cannot invoke "java.awt.dnd.DropTarget.getFlavorMap()" because "this.currentDT" is null #3585

Closed
EnderSim opened this issue Jun 18, 2024 · 1 comment
Labels
crash-report Reports of crashes that popped up in IDEA. external Issue is submitted elsewhere as it is (most likely) not a TeXiFy issue

Comments

@EnderSim
Copy link

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

PyCharm 2024.2 EAP (build PY-242.16677.12)

Operating System

Windows 10.0 (amd64)

TeXiFy IDEA version

0.9.6

Description

Stacktrace

java.lang.NullPointerException: Cannot invoke "java.awt.dnd.DropTarget.getFlavorMap()" because "this.currentDT" is null
	at java.desktop/sun.awt.dnd.SunDropTargetContextPeer.isDataFlavorSupported(SunDropTargetContextPeer.java:214)
	at java.desktop/sun.awt.datatransfer.TransferableProxy.isDataFlavorSupported(TransferableProxy.java:68)
	at java.desktop/java.awt.dnd.DropTargetContext$TransferableProxy.isDataFlavorSupported(DropTargetContext.java:366)
	at nl.hannahsten.texifyidea.util.files.FilesKt.extractFiles(Files.kt:262)
	at nl.hannahsten.texifyidea.util.files.FilesKt.extractFile(Files.kt:273)
	at nl.hannahsten.texifyidea.editor.GraphicsDragAndDropHandler.canHandle(GraphicsDragAndDropHandler.kt:30)
	at com.intellij.openapi.editor.CustomFileDropHandlerBridge$handleDrop$2$1.invoke(FileDropManager.kt:142)
	at com.intellij.openapi.editor.CustomFileDropHandlerBridge$handleDrop$2$1.invoke(FileDropManager.kt:140)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:308)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:201)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:200)
	at com.intellij.openapi.editor.CustomFileDropHandlerBridge$handleDrop$2.invokeSuspend(FileDropManager.kt:140)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:43)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:419)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1156)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:697)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$13(IdeEventQueue.kt:591)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:591)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:359)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:358)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:358)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:353)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$8(IdeEventQueue.kt:353)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:396)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDis
@EnderSim EnderSim added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Jun 18, 2024
@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Sep 18, 2024
@PHPirates
Copy link
Collaborator

Thanks for reporting! Unfortunately, the real exception is hidden. This should be fixed in IntelliJ 2024.3, see https://youtrack.jetbrains.com/issue/IJPL-156019/Drag-and-drop-does-not-open-file-if-an-exception-happens-in-plugin-CustomFileDropHandler

@PHPirates PHPirates added the external Issue is submitted elsewhere as it is (most likely) not a TeXiFy issue label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash-report Reports of crashes that popped up in IDEA. external Issue is submitted elsewhere as it is (most likely) not a TeXiFy issue
Projects
None yet
Development

No branches or pull requests

2 participants