Modify ↓
Opened 4 years ago
#20693 new defect
StringIndexOutOfBoundsException: begin 0, end -1, length 4
Reported by: | naoliv | Owned by: | maripogoda |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin EasyPresets | Version: | |
Keywords: | Cc: |
Description
If I run JOSM with pt_BR
as my locale, I can see this while JOSM is trying to load EasyPresets:
2021-03-30 00:17:58.064 INFORMAÇÕES: carregando plugin 'EasyPresets' (versão 1616852928) 2021-03-30 00:17:58.120 GRAVE: org.openstreetmap.josm.plugins.PluginException: Um erro ocorreu com o plugin EasyPresets. Causa: java.lang.reflect.InvocationTargetException. Causa: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 4 org.openstreetmap.josm.plugins.PluginException: Um erro ocorreu com o plugin EasyPresets at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:379) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:808) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:893) at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:945) at org.openstreetmap.josm.gui.MainApplication.loadLatePlugins(MainApplication.java:1200) at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:950) at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:280) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:737) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:374) ... 7 more Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 4 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3734) at java.base/java.lang.String.substring(String.java:1903) at org.maripo.josm.easypresets.data.EasyPresets.load(EasyPresets.java:155) at org.maripo.josm.easypresets.data.EasyPresets.load(EasyPresets.java:140) at org.maripo.josm.easypresets.EasyPresetsPlugin.<init>(EasyPresetsPlugin.java:35)
If I set LC_ALL=C
or run it with josm --language=en
, JOSM properly loads the plugin.
My system locale:
LANG=pt_BR.UTF-8 LANGUAGE=pt_BR:pt:en LC_CTYPE="pt_BR.UTF-8" LC_NUMERIC="pt_BR.UTF-8" LC_TIME="pt_BR.UTF-8" LC_COLLATE="pt_BR.UTF-8" LC_MONETARY="pt_BR.UTF-8" LC_MESSAGES="pt_BR.UTF-8" LC_PAPER="pt_BR.UTF-8" LC_NAME="pt_BR.UTF-8" LC_ADDRESS="pt_BR.UTF-8" LC_TELEPHONE="pt_BR.UTF-8" LC_MEASUREMENT="pt_BR.UTF-8" LC_IDENTIFICATION="pt_BR.UTF-8" LC_ALL=
JOSM:
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-03-29 23:05:59 +0200 (Mon, 29 Mar 2021) Revision:17687 Build-Date:2021-03-30 01:30:56 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17687 pt_BR) Linux Debian GNU/Linux bullseye/sid Memory Usage: 682 MB / 2048 MB (302 MB allocated, but free) Java version: 15.0.2+7-Debian-1, Debian, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 1920×1080 (scaling 1,00×1,00) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→16×16, 32×32→32×32 Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-2 Environment variable LANG: pt_BR.UTF-8 libcommons-compress-java: libcommons-compress-java:all-1.20-1 libcommons-logging-java: libcommons-logging-java:all-1.2-2 VM arguments: [-Dawt.useSystemAAFontSettings=gasp] Plugins: + EasyPresets + FastDraw (35640) + OpeningHoursEditor (35640) + SimplifyArea (35640) + apache-commons (35524) + buildings_tools (35669) + ejml (35458) + geotools (35458) + http2 (35427) + jaxb (35543) + jogl (1.2.3) + jts (35458) + log4j (35458) + measurement (35640) + opendata (35640) + reverter (35688) + tageditor (35640) + tagging-preset-tester (35640) + todo (30306) + turnlanes-tagging (288) + turnrestrictions (35640) + undelete (35640) + utilsplugin2 (35691) + wikipedia (1.1.4) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Industrial&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Playground_Equipment&zip=1 + /tmp/saida.xml Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Noname&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features_ryg&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Highway_Nodes&zip=1 - /tmp/newnodes.mapcss - https://github.com/OSMBrasil/mapnik-brasil/archive/master.zip + https://raw.githubusercontent.com/<user.name>/osm-gambi/master/fixme.mapcss - /tmp/a.mapcss - https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 - <josm.pref>/styles/sit.mapcss Validator rules: + ${HOME}/git/validador-josm/Rules_Brazilian-Specific.validator.mapcss + ${HOME}/git/validador-josm/staging.validator.mapcss - /tmp/caray.validator.mapcss + ${HOME}/git/validador-josm/nome-ruas-numeros.validator.mapcss + ${HOME}/git/osm-gambi/local.validator.mapcss Last errors/warnings: - 00009,716 W: Not a single layer for the name 'Imagem Premium da DigitalGlobe': [] - 00009,725 W: Falha ao carregar estilos Mappaint de '/tmp/newnodes.mapcss'. A exceção foi: java.nio.file.NoSuchFileException: /tmp/newnodes.mapcss - 00009,726 E: java.nio.file.NoSuchFileException: /tmp/newnodes.mapcss - 00009,754 W: Falha ao carregar estilos Mappaint de '/tmp/a.mapcss'. A exceção foi: java.nio.file.NoSuchFileException: /tmp/a.mapcss - 00009,755 E: java.nio.file.NoSuchFileException: /tmp/a.mapcss - 00011,615 E: java.nio.file.NoSuchFileException: /tmp/saida.xml - 00011,615 E: /tmp/saida.xml - 00014,273 E: org.openstreetmap.josm.plugins.PluginException: Um erro ocorreu com o plugin EasyPresets. Causa: java.lang.reflect.InvocationTargetException. Causa: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 4 - 00014,304 W: Desabilitar plugin - Não foi possível carregar plugin 'EasyPresets'. Apagar das preferências?
Attachments (0)
Note:
See TracTickets
for help on using tickets.