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

IJ 2023.3 EAP: Read access is allowed from inside read-action or EDT only #447

Closed
h0tk3y opened this issue Sep 26, 2023 · 1 comment
Closed
Labels

Comments

@h0tk3y
Copy link

h0tk3y commented Sep 26, 2023

Describe the bug
AceJump 3.8.16 throws an exception on triggering the jump actions in IntelliJ IDEA 2023.3.
Beside the exception reported, the plugin seems to be functioning normally, at least for my usage scenario.
The exception stacktrace is:

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action or Event Dispatch Thread (EDT) only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[AWT-EventQueue-0,6,main] 1017902281 (EventQueue.isDispatchThread()=true)
SystemEventQueueThread: (same)
	at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:149)
	at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:107)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at com.intellij.openapi.editor.impl.view.EditorView.assertIsReadAccess(EditorView.java:700)
	at com.intellij.openapi.editor.impl.view.EditorView.logicalPositionToOffset(EditorView.java:177)
	at com.intellij.openapi.editor.impl.EditorImpl.logicalPositionToOffset(EditorImpl.java:2276)
	at org.acejump.boundaries.EditorOffsetCache$Uncached.xyToOffset(EditorOffsetCache.kt:66)
	at org.acejump.boundaries.EditorOffsetCache$Cache.xyToOffset(EditorOffsetCache.kt:46)
	at org.acejump.boundaries.StandardBoundaries$VISIBLE_ON_SCREEN.getOffsetRange(StandardBoundaries.kt:17)
	at org.acejump.view.TagCanvas.paintChildren(TagCanvas.kt:68)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at org.acejump.view.TagCanvas.paint(TagCanvas.kt:56)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at com.intellij.openapi.editor.impl.EditorComponentImpl.paint(EditorComponentImpl.java:145)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JViewport.paint(JViewport.java:736)
	at com.intellij.ui.components.JBViewport.paint(JBViewport.java:235)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at com.intellij.openapi.fileEditor.impl.EditorTabs.paintChildren(EditorTabbedContainer.kt:613)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5319)
	at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:247)
	at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1347)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1101)
	at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
	at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:75)
	at java.desktop/sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:112)
	at java.desktop/java.awt.Container.paint(Container.java:2005)
	at java.desktop/java.awt.Window.paint(Window.java:3988)
	at com.intellij.openapi.wm.impl.IdeFrameImpl.paint(IdeFrameImpl.kt:122)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:893)
	at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:865)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:838)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:787)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1909)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:677)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:579)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:579)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:70)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:350)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:344)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:989)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:989)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:344)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:381)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

To Reproduce
Steps to reproduce the behavior:
Install AceJump in IntelliJ IDEA 2023.3 EAP and trigger one of the jump actions.
Note: the exception is not thrown every time, but it did so quite regularly during normal use.

Desktop (please complete the following information):

  • OS: macOS Ventura & Sonoma
  • IDE and version: 2023.3 EAP, Build #IU-233.6745.305, built on September 21, 2023
  • AceJump version: 3.8.16
@h0tk3y
Copy link
Author

h0tk3y commented Oct 16, 2023

I think this is the menton of the threading model change in the docs.

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

No branches or pull requests

2 participants