Opened 11 years ago
Closed 11 years ago
#8900 closed defect (fixed)
reverter plugin crashing when starting JOSM (r6081)
Reported by: | rickmastfan67 | Owned by: | Upliner |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Plugin reverter | Version: | latest |
Keywords: | Cc: |
Description (last modified by )
I just downloaded the new update to the reverter plugin ([o29769]), and then restarted JOSM. The plugin crashed. Looks like the update needed to have the minversion bumped up so that you couldn't download it without [6082] or higher..
loading plugin 'reverter' (version 29769) An error occurred in plugin reverter java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:295) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:523) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:592) at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:631) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:351) Caused by: java.lang.IllegalArgumentException: illegal component position at java.awt.Container.addImpl(Unknown Source) at java.awt.Container.add(Unknown Source) at org.openstreetmap.josm.gui.MainMenu.addMenu(MainMenu.java:423) at org.openstreetmap.josm.gui.MainMenu.addMenu(MainMenu.java:417) at reverter.ReverterPlugin.<init>(ReverterPlugin.java:22) ... 9 more
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2013-07-24 01:34:52 Last Changed Author: Don-vip Revision: 6081 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2013-07-24 00:12:04 +0200 (Wed, 24 Jul 2013) Last Changed Rev: 6081 Identification: JOSM/1.5 (6081 en) Windows 7 64-Bit Memory Usage: 218 MB / 2730 MB (116 MB allocated, but free) Java version: 1.7.0_25, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM VM arguments: [-Xmx3072M] Plugin: ImageryCache (29690) Plugin: OpeningHoursEditor (29435) Plugin: buildings_tools (29596) Plugin: mapdust (29525) Plugin: measurement (29750) Plugin: mirrored_download (29643) Plugin: openstreetbugs (29435) Plugin: osmarender (29639) Plugin: reverter Plugin: turnrestrictions (29435) Plugin: undelete (29555) Plugin: utilsplugin2 (29769)
Attachments (0)
Change History (18)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
follow-up: 4 comment:3 by , 11 years ago
oops, will the old josm get the previous non-working jar? Can someone delete it from svn or replace with the untouched one?
( I forgot to do 2-step updating.)
comment:4 by , 11 years ago
comment:5 by , 11 years ago
I noticed the link was fixed ("external source") and no error appear for older JOSM.
Unfortunately, reverter's History menu does not appear too... We need revision [o29664] of reverter jar for old JOSM and [o29772] for newer one.
follow-up: 9 comment:7 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I am afraid on older JOSM (I testd on 6062) we have rather big problem:
reverter, LiveGPS and CommandLine jars are broken, they do not start because of exceptions...
I do not know the way to fix older plugin jar but Stoecker said this is possible. This is really needed.
comment:8 by , 11 years ago
JOSM server manages a list of each SVN/plugin to JOSM main version. If I should remove any old release from the table, please tell me which releases are defective.
comment:9 by , 11 years ago
Replying to akks:
I am afraid on older JOSM (I testd on 6062) we have rather big problem:
reverter, LiveGPS and CommandLine jars are broken, they do not start because of exceptions...
Yes, this can be a big problem with the "tested" build people. If they are upgraded to the "bad" versions, then the bug tracker here will get flooded with reports.
comment:10 by , 11 years ago
I removed "29769 => 29770" for reverter and livegps. For commandline there is no newer josm.main version entry than 5960.
comment:11 by , 11 years ago
Thank you!
The nontrivial problem was that newly created menu tries to use the position constant it has at compilation time (=11), so if there are <11 items in main menu, it crashes. I tested with all plugins installed and did not notice it.
So [o29769] / [o29770] were crashing.
Reverter and LiveGPS are fixed, Utilsplugin2 was not broken, but CommandLine still tries to use position "11" and crash when there are few plugins installed.
Later (this evening) I will compile CommandLine with older JOSM, commit it and then recompile under JOSM 6082 and recommit with minimal JOSM version 6082 to close this bug.
comment:12 by , 11 years ago
We have one potential problem too: is someone will recompile any other plugin with menu (3D, Scripting, ....) and commit the changes, it will be broken for all older JOSM versions due to the constant "11". Should we put
public final int defaultMenuPos = 7;
again to avoid such problem? (then only one recommitting of CommandLine will close the bug, but the menu entries will start "jumping" after base version change)
comment:13 by , 11 years ago
How about something like
-
src/org/openstreetmap/josm/gui/MainMenu.java
250 250 public JMenu audioMenu = null; 251 251 public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 11, ht("/Menu/Help")); 252 252 253 public final int defaultMenuPos = 11; 253 private final int defaultMenuPos = 11; 254 255 public int getDefaultMenuPos() { 256 return defaultMenuPos; 257 } 254 258 255 259 public final JosmAction moveUpAction = new MoveAction(MoveAction.Direction.UP); 256 260 public final JosmAction moveDownAction = new MoveAction(MoveAction.Direction.DOWN);
It should avoid any such future problems.
If they have old JOSM version, it compiles and runs on old JOSM OK.
If they have new JOSM version, it fails to compile, forcing them to bump minimum JOSM version.
comment:14 by , 11 years ago
Sounds good. If we spot such issues we should prevent them in future releases.
comment:16 by , 11 years ago
I tried to fix CommandLine and VideoMapping on older JOSM and then forced them and 8 more plugins to use [6088] with the new function.
Now it should be impossible to get an exception.
(Scripting and 3D plugin menus are still inserted on position 7)
comment:18 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
should be fixed now in [o29771]