Perforce Plugin 0.8.7 exception

I just pressed enter on one of the lines in a file that has already been edited earlier and got exception below. I could not reproduce it.

Error message: Original exception:
java.lang.NullPointerException

at com.perforce.api.FileEntry.parseFstat(FileEntry.java:1234)

at com.perforce.api.FileEntry.getFiles(FileEntry.java:524)

at com.devbrat.vcs.perforce.FileEntryProvider.loadFileEntries(FileEntryProvider.java:270)

at com.devbrat.vcs.perforce.FileEntryProvider.getFileEntry(FileEntryProvider.java:106)

at com.devbrat.vcs.perforce.PerforceStatusProvider.getStatus(PerforceStatusProvider.java:95)

at com.intellij.openapi.vcs.impl.e.b(e.java:21)

at com.intellij.openapi.vcs.impl.e.fileStatusChanged(e.java:49)

at com.intellij.openapi.vcs.impl.e$g_.documentChanged(e$g_.java:0)

at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.intellij.util.EventDispatcher.a(EventDispatcher.java:35)

at com.intellij.util.EventDispatcher.a(EventDispatcher.java:55)

at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:71)

at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:7)

at $Proxy5.documentChanged(Unknown Source)

at com.intellij.openapi.editor.b.k.a(k.java:131)

at com.intellij.openapi.editor.b.k.insertString(k.java:132)

at com.intellij.codeInsight.m.s.executeWriteAction(s.java:86)

at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:2)

at com.intellij.openapi.application.a.b.runWriteAction(b.java:85)

at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(EditorWriteActionHandler.java:1)

at com.intellij.codeInsight.h.c.m$c_.executeWriteAction(m$c_.java:2)

at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:2)

at com.intellij.openapi.application.a.b.runWriteAction(b.java:85)

at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(EditorWriteActionHandler.java:1)

at com.intellij.execution.f.i$d_.execute(i$d_.java:0)

at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:2)

at com.intellij.openapi.command.impl.a.executeCommand(a.java:73)

at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:25)

at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:2)

at com.intellij.openapi.a.a.d.a(d.java:104)

at com.intellij.openapi.a.a.d.b(d.java:134)

at com.intellij.openapi.a.a.d.a(d.java:115)

at com.intellij.ide.q.a(q.java:64)

at com.intellij.ide.q.dispatchEvent(q.java:71)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

7 comments
Comment actions Permalink

Thanks for reporting this. Somehow the output p4 fstat is not what the P4
Java API expects. If this happens again, it would be interesting to see the
output of that command.

I will fix the NullPointerException in the next release anyway.

-Dash.

"Adam" <no_mail@jetbrains.com> wrote in message
news:15477377.1074616365777.JavaMail.itn@is.intellij.net...

I just pressed enter on one of the lines in a file that has already been

edited earlier and got exception below. I could not reproduce it.
>

Error message: Original exception:
java.lang.NullPointerException

>

at com.perforce.api.FileEntry.parseFstat(FileEntry.java:1234)

>

at com.perforce.api.FileEntry.getFiles(FileEntry.java:524)

>

at

com.devbrat.vcs.perforce.FileEntryProvider.loadFileEntries(FileEntryProvider
.java:270)
>

at

com.devbrat.vcs.perforce.FileEntryProvider.getFileEntry(FileEntryProvider.ja
va:106)
>

at

com.devbrat.vcs.perforce.PerforceStatusProvider.getStatus(PerforceStatusProv
ider.java:95)
>

at com.intellij.openapi.vcs.impl.e.b(e.java:21)

>

at com.intellij.openapi.vcs.impl.e.fileStatusChanged(e.java:49)

>

at com.intellij.openapi.vcs.impl.e$g_.documentChanged(e$g_.java:0)

>

at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)

>

at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
>

at java.lang.reflect.Method.invoke(Method.java:324)

>

at com.intellij.util.EventDispatcher.a(EventDispatcher.java:35)

>

at com.intellij.util.EventDispatcher.a(EventDispatcher.java:55)

>

at com.intellij.util.EventDispatcher.access$100(EventDispatcher.java:71)

>

at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:7)

>

at $Proxy5.documentChanged(Unknown Source)

>

at com.intellij.openapi.editor.b.k.a(k.java:131)

>

at com.intellij.openapi.editor.b.k.insertString(k.java:132)

>

at com.intellij.codeInsight.m.s.executeWriteAction(s.java:86)

>

at

com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(Edit
orWriteActionHandler.java:2)
>

at com.intellij.openapi.application.a.b.runWriteAction(b.java:85)

>

at

com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(Ed
itorWriteActionHandler.java:1)
>

at com.intellij.codeInsight.h.c.m$c_.executeWriteAction(m$c_.java:2)

>

at

com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(Edit
orWriteActionHandler.java:2)
>

at com.intellij.openapi.application.a.b.runWriteAction(b.java:85)

>

at

com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(Ed
itorWriteActionHandler.java:1)
>

at com.intellij.execution.f.i$d_.execute(i$d_.java:0)

>

at

com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.jav
a:2)
>

at com.intellij.openapi.command.impl.a.executeCommand(a.java:73)

>

at

com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(Editor
Action.java:25)
>

at

com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(Editor
Action.java:2)
>

at com.intellij.openapi.a.a.d.a(d.java:104)

>

at com.intellij.openapi.a.a.d.b(d.java:134)

>

at com.intellij.openapi.a.a.d.a(d.java:115)

>

at com.intellij.ide.q.a(q.java:64)

>

at com.intellij.ide.q.dispatchEvent(q.java:71)

>

at

java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:201)
>

at

java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:151)
>

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

>

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

>

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

>
>



0
Comment actions Permalink

This is first time I got this exception.
I would like to help you with tracking it.
How can I see the output of p4 fstat? I do not know P4 command line at all, I am just a lame user :-).
I have enabled "Log perforce Commands" in IDEA perforce configuration.


By the way - I noticed several things that might work better. Your plugin is great of course, but it still could be improved :-).


1. When I press CTRL+K - I would like to have focus in comment area (with the cursor just at the end of last comment) to be able to write it right away without using mouse at all.

2. When I check Revisions - the descriptions are cut very short - just 25-30 characters, and I have plenty of screen space to use. Especially the other columns could be much shorter, than the description could be more than 100 characters. But this is probably p4 client limitation?

3. Sometimes I do not want to check out file from p4 but want to test some stupid ideas.
I just double click the "locker" at the bottom to remove read only attribute and edit the file.

Whan I finish and want to revert to version form perforce - there is no way t do this.
Revert - says the file has not been checked out,
Refresh - does nothing?
Sync - disappears from menu....

Your plugin should notice the difference beetween checkin out and just switching to read-write.

0
Comment actions Permalink

Oops, another exception.
I was in the IDEA settings window, I have just enabled "log perforce commands" and switched to "plugins" tab and pressed "Synchronize with plugin repository".

I got the exception below. One again I cannot reproduce it. Where should be the p4 log that I just enabled?
I attach whole idea.log, because there are a lot of exceptions from perforce :)

Error message: Assertion failed: Access is allowed from event dispatch thread only.
java.lang.Throwable

at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:50)

at com.intellij.openapi.application.a.b.assertIsDispatchThread(b.java:326)

at com.intellij.openapi.wm.impl.o.registerToolWindow(o.java:360)

at com.devbrat.vcs.perforce.ui.PerforceToolWindowManager.getP4LogWindow(PerforceToolWindowManager.java:65)

at com.devbrat.vcs.perforce.PerforceVcs.command(PerforceVcs.java:453)

at com.perforce.api.P4Process.notifyCommandListener(P4Process.java:253)

at com.perforce.api.P4Process.exec(P4Process.java:203)

at com.perforce.api.FileEntry.getFiles(FileEntry.java:542)

at com.devbrat.vcs.perforce.FileEntryProvider.loadFileEntries(FileEntryProvider.java:212)

at com.devbrat.vcs.perforce.FileEntryProvider.refreshCache(FileEntryProvider.java:165)

at com.devbrat.vcs.perforce.FileEntryProvider$2.run(FileEntryProvider.java:52)

at com.intellij.openapi.application.a.b.runReadAction(b.java:319)

at com.devbrat.vcs.perforce.FileEntryProvider$1.run(FileEntryProvider.java:50)

at java.util.TimerThread.mainLoop(Timer.java:432)

at java.util.TimerThread.run(Timer.java:382)



Attachment(s):
log.zip
0
Comment actions Permalink

After Idea restart, everything seems to be back to normal.

Where should be the p4 log that I just
enabled?

Now I see - it is a new tab on the main window.

0
Comment actions Permalink

Exception once again, it seems to be the log window, so I will disable it, and stop bugging you for a while :)))

Error message: Assertion failed: Access is allowed from event dispatch thread only.
java.lang.Throwable

at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:50)

at com.intellij.openapi.application.a.b.assertIsDispatchThread(b.java:326)

at com.intellij.openapi.wm.impl.o.registerToolWindow(o.java:360)

at com.devbrat.vcs.perforce.ui.PerforceToolWindowManager.getP4LogWindow(PerforceToolWindowManager.java:65)

at com.devbrat.vcs.perforce.PerforceVcs.command(PerforceVcs.java:453)

at com.perforce.api.P4Process.notifyCommandListener(P4Process.java:253)

at com.perforce.api.P4Process.exec(P4Process.java:203)

at com.perforce.api.FileEntry.getFiles(FileEntry.java:542)

at com.devbrat.vcs.perforce.FileEntryProvider.loadFileEntries(FileEntryProvider.java:212)

at com.devbrat.vcs.perforce.FileEntryProvider.refreshCache(FileEntryProvider.java:165)

at com.devbrat.vcs.perforce.FileEntryProvider$2.run(FileEntryProvider.java:52)

at com.intellij.openapi.application.a.b.runReadAction(b.java:319)

at com.devbrat.vcs.perforce.FileEntryProvider$1.run(FileEntryProvider.java:50)

at java.util.TimerThread.mainLoop(Timer.java:432)

at java.util.TimerThread.run(Timer.java:382)

0
Comment actions Permalink

Yes this is the log window causing all the problem. I will post a fix for
this soon.

-Dash.

"Adam" <no_mail@jetbrains.com> wrote in message
news:15249375.1074681745211.JavaMail.itn@is.intellij.net...

Exception once again, it seems to be the log window, so I will disable it,

and stop bugging you for a while :)))
>

Error message: Assertion failed: Access is allowed from event dispatch

thread only.

java.lang.Throwable

>

at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:50)

>

at com.intellij.openapi.application.a.b.assertIsDispatchThread(b.java:326)

>

at com.intellij.openapi.wm.impl.o.registerToolWindow(o.java:360)

>

at

com.devbrat.vcs.perforce.ui.PerforceToolWindowManager.getP4LogWindow(Perforc
eToolWindowManager.java:65)
>

at com.devbrat.vcs.perforce.PerforceVcs.command(PerforceVcs.java:453)

>

at com.perforce.api.P4Process.notifyCommandListener(P4Process.java:253)

>

at com.perforce.api.P4Process.exec(P4Process.java:203)

>

at com.perforce.api.FileEntry.getFiles(FileEntry.java:542)

>

at

com.devbrat.vcs.perforce.FileEntryProvider.loadFileEntries(FileEntryProvider
.java:212)
>

at

com.devbrat.vcs.perforce.FileEntryProvider.refreshCache(FileEntryProvider.ja
va:165)
>

at

com.devbrat.vcs.perforce.FileEntryProvider$2.run(FileEntryProvider.java:52)
>

at com.intellij.openapi.application.a.b.runReadAction(b.java:319)

>

at

com.devbrat.vcs.perforce.FileEntryProvider$1.run(FileEntryProvider.java:50)
>

at java.util.TimerThread.mainLoop(Timer.java:432)

>

at java.util.TimerThread.run(Timer.java:382)

>
>



0
Comment actions Permalink


Thanks for using the plugin and thanks for all the suggesions. My comments
are inline.

How can I see the output of p4 fstat? I do not know P4 command line at

all, I am just a lame user :-).

I have enabled "Log perforce Commands" in IDEA perforce configuration.


This should help, but as you said later it doesn't work at all. In the
meanwhile all the p4 commands issued from the plugin are printed in the
console window. You could use them too.

>

1. When I press CTRL+K - I would like to have focus in comment area (with

the cursor just at the end of last comment) to be able to write it right
away without using mouse at all.

I will look into this. May need help from Olesya to get it done though.

>

2. When I check Revisions - the descriptions are cut very short - just

25-30 characters, and I have plenty of screen space to use. Especially the
other columns could be much shorter, than the description could be more than
100 characters. But this is probably p4 client limitation?

This is me just being lazy :) There is no limitation on the p4 client.

3. Sometimes I do not want to check out file from p4 but want to test some

stupid ideas.

I just double click the "locker" at the bottom to remove read only

attribute and edit the file.
>

Whan I finish and want to revert to version form perforce - there is no

way t do this.

Revert - says the file has not been checked out,
Refresh - does nothing?
Sync - disappears from menu....


I am going to enable the "Sync" option from the plugin when the file is
writable.

BTW refresh is just to refresh the file in idea and get the status
uptodate. It doesn't fetch the file from perforce. That is needed when idea
doesn't recognize external changes and keeps reporting a file with the old
status.


0

Please sign in to leave a comment.