wt-io-it / odoo-pycharm-plugin

Plugin to Support Odoo in Pycharm
GNU Affero General Public License v3.0
19 stars 10 forks source link

OdooRecords XML File, java.lang.StringIndexOutOfBoundsException #65

Closed LeVraiDjak closed 2 years ago

LeVraiDjak commented 2 years ago

Plugin Version: 0.6.2 IntelliJ Version: PyCharm 2022.2.3 IntelliJ Build: PC-222.4345.23

Unhandled exception in [StandaloneCoroutine{Cancelling}@4e834101, EDT] ``` java.lang.StringIndexOutOfBoundsException: begin 10, end -1, length 41 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4604) at java.base/java.lang.String.substring(String.java:2707) at at.wtioit.intellij.plugins.odoo.OdooGoToDeclarationHandler.getOdooRecord(OdooGoToDeclarationHandler.java:88) at at.wtioit.intellij.plugins.odoo.OdooGoToDeclarationHandler.getGotoDeclarationTarget(OdooGoToDeclarationHandler.java:72) at com.intellij.codeInsight.navigation.actions.GotoDeclarationHandlerBase.getGotoDeclarationTargets(GotoDeclarationHandlerBase.java:14) at at.wtioit.intellij.plugins.odoo.OdooGoToDeclarationHandler.getGotoDeclarationTargets(OdooGoToDeclarationHandler.java:33) at com.intellij.codeInsight.navigation.impl.GtdProvidersKt.fromGTDProvidersInner(gtdProviders.kt:30) ... at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264) at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:32) ... at com.intellij.codeInsight.navigation.CtrlMouseHandler2$compute$2.invokeSuspend(CtrlMouseHandler.kt:221) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) ... at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) ```
ap-wtioit commented 2 years ago

looks the same as https://github.com/wt-io-it/odoo-pycharm-plugin/issues/61, will work on a fix on the weekend

ap-wtioit commented 2 years ago

this issue is fixed in 0.6.3 (pending jetbrains approval), if you are eager to test it, you can use the jar file from https://github.com/wt-io-it/odoo-pycharm-plugin/tree/v0.6.3

ap-wtioit commented 2 years ago

0.6.3 is approved and now also shown for pycharm in marketplace