Comments (4)
Android Studio had set the file to Read-only mode as it was confused as to the state of it's own buffer, compared to the file on disk. Once I cleared this read-only state by refreshing Studio's buffer by reading the file from disk into the buffer, this exception also went away.
from comrade.
Hmm, what was the file that AndroidStudio set it o readonly?
Android Studio had set the file to Read-only mode as it was confused as to the state of it's own buffer, compared to the file on disk.
Is there any other process tries to change that file?
When Comrade connect to the AndroidStudio, it won't save to disk anymore to avoid this kind of situation. Instead, it will just sync the changes to AndroidStudio's buffer.
Is there any way that i can reprodcue the issue? thanks!
from comrade.
Let me look into reproducing for you. This happened I think in the following order:
- Open file foo.java in vim-Comrade
- Open same file, foo.java, in regular vim
- Make a change in foo.java using regular vim and write to disk
- Switch to vim-comrade and attempt to make changes (cloberring the old changes) and attempt to write the buffer
- Navigating to studio, which was alerted to the buffer change made in step 3.
from comrade.
I've been able to reproduce something like what I saw, but not exactly.
Essentially you need two editors open on the same file in the project. One editor is Comrade enabled, the other one is regular vanilla nvim. If non-comrade instances write to the file, and then the comrade-enabled instance writes to the same file, clobbering over each other. causes (sometimes) an IllegalStateException.
Here's another Exception I saw
java.lang.IllegalStateException
at com.intellij.codeInsight.daemon.impl.quickfix.AddMethodQualifierFix.getText(AddMethodQualifierFix.java:59)
at com.intellij.codeInsight.daemon.impl.HighlightInfo$IntentionActionDescriptor.toString(HighlightInfo.java:883)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.intellij.openapi.util.Pair.toString(Pair.java:81)
at java.lang.String.valueOf(String.java:2994)
at java.util.Arrays.toString(Arrays.java:4571)
at com.intellij.util.containers.LockFreeCopyOnWriteArrayList.toString(LockFreeCopyOnWriteArrayList.java:779)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.intellij.codeInsight.daemon.impl.HighlightInfo.toString(HighlightInfo.java:375)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at org.beeender.comradeneovim.insight.InsightItem.(InsightItem.kt:26)
at org.beeender.comradeneovim.insight.InsightProcessor$process$1$itemMap$2.invoke(InsightProcessor.kt:78)
at org.beeender.comradeneovim.insight.InsightProcessor$process$1$itemMap$2.invoke(InsightProcessor.kt:34)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
at kotlin.collections.MapsKt__MapsKt.putAll(Maps.kt:372)
at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:540)
at kotlin.collections.MapsKt__MapsKt.toMap(Maps.kt:534)
at org.beeender.comradeneovim.insight.InsightProcessor$process$1.run(InsightProcessor.kt:80)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:757)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:706)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:375)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
from comrade.
Related Issues (20)
- NCM2 completion support? HOT 13
- use nvim as backend for jetbrains HOT 2
- coc.nvim support HOT 1
- Line synchronization HOT 1
- add support for coc.nvim ? HOT 2
- [CLion/C++] Errors and warnings from included files
- Fix internal API and deprecated API usages
- Feature Request: Sync Buffers with IDE editor tabs AND cursor location
- Complete information is not complete HOT 2
- A feedback loop caused 120000 lines to be written HOT 2
- neovim hangs while doing `:%s` HOT 2
- Invoke basic completion and second basic completion from Neovim
- Too many non-block events
- Index out of bounds exception
- Buffer already relesesed
- Integration with nvim LSP? HOT 5
- Installation Problems HOT 3
- Comrade for neovim conflicts with gitgutter navigation HOT 5
- Once comrade connects to Studio impossible to write to another file
- Opening files with duplicate names causes vim-Comrade to hang HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comrade.