當我保存時,PyCharm正在拋出此異常。PyCharm - 無法保存設置 - 保存設置失敗。請重新啓動PyCharm社區版
WARN - mponents.impl.stores.StoreUtil - Save settings failed
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
at com.intellij.configurationStore.ApplicationStorageManager.expandMacros(ApplicationStoreImpl.kt:108)
at com.intellij.configurationStore.StateStorageManagerImpl.createStateStorage(StateStorageManagerImpl.kt:194)
at com.intellij.configurationStore.StateStorageManagerImpl.getOrCreateStorage(StateStorageManagerImpl.kt:150)
at com.intellij.configurationStore.StateStorageManagerImpl.getStateStorage(StateStorageManagerImpl.kt:133)
at com.intellij.configurationStore.StateStorageManagerImpl$startExternalization$1.setState(StateStorageManagerImpl.kt:342)
at com.intellij.configurationStore.ComponentStoreImpl.commitComponent(ComponentStoreImpl.kt:199)
at com.intellij.configurationStore.ComponentStoreImpl.save(ComponentStoreImpl.kt:124)
at com.intellij.openapi.components.impl.stores.StoreUtil.save(StoreUtil.java:49)
at com.intellij.openapi.application.impl.ApplicationImpl.saveSettings(ApplicationImpl.java:1433)
at com.intellij.ide.SaveAndSyncHandlerImpl.doSaveDocumentsAndProjectsAndApp(SaveAndSyncHandlerImpl.java:150)
at com.intellij.ide.SaveAndSyncHandlerImpl.saveProjectsAndDocuments(SaveAndSyncHandlerImpl.java:134)
at com.intellij.ide.SaveAndSyncHandlerImpl$4.onFrameDeactivated(SaveAndSyncHandlerImpl.java:104)
at com.intellij.ide.FrameStateManagerImpl.fireDeactivationEvent(FrameStateManagerImpl.java:87)
at com.intellij.ide.FrameStateManagerImpl.access$500(FrameStateManagerImpl.java:32)
at com.intellij.ide.FrameStateManagerImpl$2$1.run(FrameStateManagerImpl.java:72)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:352)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:337)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:866)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
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)
並給我這個錯誤信息。
我不認爲它是在.idea
文件或類似的東西權限的問題,但我真的不知道。
我在堆棧跟蹤中發現了一些其他的錯誤和警告,但這是我在嘗試保存項目時重複出現的錯誤和警告。
此問題仍然存在,當我運行PyCharm CE像這樣 sudo -u [username] /Applications/PyCharm\ CE.app/Contents/MacOS/pycharm
任何人有任何想法須藤?
OS:MacOS的埃爾卡皮坦 Pycharm:PyCharm社區版5.0.5 JRE:1.8.0_76釋放-B162 x86_64的 JVM:OpenJDK的64位服務器VM通過JetBrains的s.r.o.
我有同樣的問題。不知何故,當我刪除'.idea'目錄時,我發現錯誤消失了。但經過一段時間再次使用它,錯誤又回來了。 – dashmug
它可能是'.idea'目錄的權限問題嗎? – ramsey0
我與WebStorm有同樣的錯誤。 (堆棧跟蹤具有'java.lang.StringIndexOutOfBoundsException:String索引超出範圍:0' - 更改.idea目錄上的權限不會幫助我。 – knowuh