plugin fails to retrieve information from commit
Hello,
I have a plugin that connects to the git commits and pulls commits information.
this plugin used to work in intellij 2016 versions.
when I try to run it in intellij 2017 it fails to retrieve the information from the commit:
any idea why this could be happening , maybe version og git plugin?
null
java.lang.AssertionError
at com.intellij.vcs.log.data.AbstractDataGetter.getCommitData(AbstractDataGetter.java:98)
at com.intellij.vcs.log.ui.table.GraphTableModel.a(GraphTableModel.java:181)
at com.intellij.vcs.log.ui.table.GraphTableModel.getFullDetails(GraphTableModel.java:170)
at com.intellij.vcs.log.impl.VcsLogImpl$1.get(VcsLogImpl.java:115)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at com.intellij.util.containers.ContainerUtilRt.map2List(ContainerUtilRt.java:380)
at com.intellij.util.containers.ContainerUtil.map2List(ContainerUtil.java:2656)
at com.intellij.util.containers.ContainerUtil.map2Array(ContainerUtil.java:969)
at com.intellij.vcs.log.ui.frame.MainFrame.getData(MainFrame.java:221)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:86)
at com.intellij.ide.impl.DataManagerImpl.access$000(DataManagerImpl.java:58)
at com.intellij.ide.impl.DataManagerImpl$1.getData(DataManagerImpl.java:96)
at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:81)
at com.intellij.openapi.vcs.history.VcsRevisionNumberArrayRule.getRevisionNumbers(VcsRevisionNumberArrayRule.java:54)
at com.intellij.openapi.vcs.history.VcsRevisionNumberArrayRule.getData(VcsRevisionNumberArrayRule.java:42)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:93)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:73)
at com.intellij.ide.impl.DataManagerImpl.access$300(DataManagerImpl.java:58)
at com.intellij.ide.impl.DataManagerImpl$MyDataContext.a(DataManagerImpl.java:400)
at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:377)
at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:59)
at com.intellij.openapi.actionSystem.AnActionEvent.getData(AnActionEvent.java:165)
Please sign in to leave a comment.
According to the stacktrace, the assertion at `AbstractDataGetter:98` fails:
Please share the whole stack trace. Do you initiate this call sequence manually? I don't see any classes from a 3-party plugin in the stack trace.
the full stack trace is:
null
java.lang.AssertionError
at com.intellij.vcs.log.data.AbstractDataGetter.getCommitData(AbstractDataGetter.java:98)
at com.intellij.vcs.log.ui.table.GraphTableModel.a(GraphTableModel.java:181)
at com.intellij.vcs.log.ui.table.GraphTableModel.getFullDetails(GraphTableModel.java:170)
at com.intellij.vcs.log.impl.VcsLogImpl$1.get(VcsLogImpl.java:115)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at com.intellij.util.containers.ContainerUtilRt.map2List(ContainerUtilRt.java:380)
at com.intellij.util.containers.ContainerUtil.map2List(ContainerUtil.java:2656)
at com.intellij.util.containers.ContainerUtil.map2Array(ContainerUtil.java:969)
at com.intellij.vcs.log.ui.frame.MainFrame.getData(MainFrame.java:221)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:86)
at com.intellij.ide.impl.DataManagerImpl.access$000(DataManagerImpl.java:58)
at com.intellij.ide.impl.DataManagerImpl$1.getData(DataManagerImpl.java:96)
at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:81)
at com.intellij.openapi.vcs.history.VcsRevisionNumberArrayRule.getRevisionNumbers(VcsRevisionNumberArrayRule.java:54)
at com.intellij.openapi.vcs.history.VcsRevisionNumberArrayRule.getData(VcsRevisionNumberArrayRule.java:42)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:93)
at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:73)
at com.intellij.ide.impl.DataManagerImpl.access$300(DataManagerImpl.java:58)
at com.intellij.ide.impl.DataManagerImpl$MyDataContext.a(DataManagerImpl.java:400)
at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:377)
at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:59)
at com.intellij.openapi.actionSystem.AnActionEvent.getData(AnActionEvent.java:165)
at com.ritesh.idea.plugin.diff.GitDiffProvider.generateDiff(GitDiffProvider.java:49)
at com.ritesh.idea.plugin.ui.action.ShowReviewBoard$2.throwableCall(ShowReviewBoard.java:73)
at com.ritesh.idea.plugin.ui.action.ShowReviewBoard$2.throwableCall(ShowReviewBoard.java:68)
at com.ritesh.idea.plugin.ui.TaskUtil$3.call(TaskUtil.java:70)
at com.ritesh.idea.plugin.ui.TaskUtil$3.call(TaskUtil.java:66)
at com.intellij.openapi.application.impl.ApplicationImpl$3.call(ApplicationImpl.java:357)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
It's kinda obvious, isn't it? You're calling the method which requires the Event Dispatch Thread from a background thread => the assertion happens.
Btw, it is usually not a good idea to call AnAction manually (especially from the background).
If you tell me, which information do you want to acquire, in which situation and in which context, I might be able to point to a better method.
sorry for the extremely late response.
I am not an intellij developer so it is kind of hard for me to understand.
I am trying to generate the diff content from the git provider once the user presses a specific button in the intellij ui
What should be the source of this diff content? So, you've got a button somewhere on a toolbar. What diff exactly should a user see when he presses the button?
the diff is between two git commit revisions.
it is supposed to take the diff between the commits and push it to a different system.
the thing is that it used to work intellij 2016
Where these two git commit revisions come from? Are they selected from the log?