Menu

Polymesh throws Exception plus keyboard shortcut problem

Developers
2015-03-10
2015-03-20
  • Arnab Chakraborty

    Hi,

    I installed the Polymesh plugin today. However, I am unable to use the keyboard shortcuts
    v, e and f as mentioned in the manual. I tried "Reload polymesh keystrokes" but nothing happened. Wondering if I am hitting some Exception somewhere I relaunched AoI from commandline (ubuntu 12.10, JDK 1.7). When I create just a single polymesh object (the cube)
    and open the editor I get a slew of Exceptions all like

       4:06:32 PM IST [AWT-EventQueue-0] in Statement$1.exceptionThrown() (Statement.java:64)
       java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
    
    4:06:32 PM IST [AWT-EventQueue-0] in Statement$1.exceptionThrown() (Statement.java:66)
       Continuing ...
    ~~~~~~
    However I do not get any message when I "Reload polymesh keystrokes". 
    
    Also I get the error
    

    java.lang.NoSuchMethodError: artofillusion.math.Vec3.equals(Lartofillusion/math/Vec3;)Z
    at nik777.aoi.hologram.RTHologram.checkIntersection(RTHologram.java:127)
    at artofillusion.raytracer.Ray.findIntersection(Ray.java:97)
    at artofillusion.raytracer.Raytracer.traceRay(Raytracer.java:605)
    at artofillusion.raytracer.RaytracerRenderer.spawnEyeRay(RaytracerRenderer.java:1265)
    at artofillusion.raytracer.RaytracerRenderer$7.execute(RaytracerRenderer.java:850)
    at artofillusion.util.ThreadManager$1.run(ThreadManager.java:93)

    Reported 1 time(s).
    ~~~~~
    Any help would be greatly appreciated.

    Thanks.

    Arnab.

     

    Last edit: Arnab Chakraborty 2015-03-10
  • Luke S

    Luke S - 2015-03-10

    First, based on the NoSuchMethodError you are using an old version of the hologram plugin. I've got an updated one over here

    Not in the repository, so you will need to install manually. Try that first, and see if your other error is fixed.

     
  • Arnab Chakraborty

    Thanks, Luke, I manually installed the Hologram plugin, and the Hologram error was resolved. But the Polymesh error still persists. I looked inside the source that got downloaded from the repo. It does look dated, as it uses the deprecated ModellingApp class. This leads to my next question:

    What is the best way to download plugins to ensure compatibility? I have no problem compiling java codes, if that is what I need to do.

    Thanks

    Arnab.

     
  • Arnab Chakraborty

    I downloaded PolyMesh_2.9.jar from aoisp.sourceforge.net, but I am still getting the same errors:

    1) No keyboard shortcuts (v,e,f)
    2) The following exceptions

    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
    
    Reported 66 time(s).
    

    and

    ~~~~~~

    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:604)
    at java.util.ArrayList.get(ArrayList.java:382)
    at artofillusion.polymesh.PolyMesh.addFaceFromPoints(PolyMesh.java:12118)
    at artofillusion.polymesh.PMCreateFaceTool.addFace(PMCreateFaceTool.java:207)
    at artofillusion.polymesh.PMCreateFaceTool.mouseReleased(PMCreateFaceTool.java:168)
    at artofillusion.polymesh.PolyMeshViewer.mouseReleased(PolyMeshViewer.java:1157)
    at artofillusion.ViewerCanvas.processMouseReleased(ViewerCanvas.java:198)
    at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    Reported 3 time(s).
    ~~~~~~~

    Any help?

     
  • Luke S

    Luke S - 2015-03-11

    The code for polymesh is dated. The binary version that you get through the manager should be newer in this case.

    What is the best way to download plugins to ensure compatibility? I have no problem compiling java codes, if that is what I need to do.

    Current best practice is to use the repo except for a few special cases. (Hologram is one) Getting that sorted out is something that I'll be looking at in the next few weeks.

    Back to trying to fix your error messages:

    I'm a little stumped. I've tried with polymesh as currently listed in the repo, and I have not been able to reproduce your issue. Could you tell me a little about how things are currently set up when you work with AOI?

    • What exact version of AOI do you have? Which download link?
    • What are the rendering modes that are set in your various views? (Especially when you open the polymesh window)
    • What other plugins may you have installed? (This might be a plugin conflict)
    • And just for good measure, what OS is your system, just in case it turns out to be relevant.

    As a bit of an aside, if you are comfortable with compiling, would you be willing to set up a build of the Current AOI head? Most IDEs, such as eclipse and netbeans, can handle the SVN stuff internally, and can handle the ant builds as well. It is then pretty simple to update every time there is a new commit. The purpose of this would be to get another set of eyes on new features/bugfixes early, so that they can be improved before a major release.

     
  • Luke S

    Luke S - 2015-03-11

    Okay, I was typing when your last post came in. Two Separate things, and with the further description, I was able to duplicate both.

    1) No keyboard shortcuts (v,e,f)

    This one, I think, is due to the way that <alt> is overloaded. Holding down <alt> is used when moving the view, but when you release, the editor window still sees it as a keypress, which activates/deactivates the main menu bar. If the menu bar is active, any key-presses are processed by the menu-bar as menu shortcodes.

    • If you see any of the upper menu-bar options active, (look like they have been clicked) try tapping <alt> again, and then try your keyboard shortcuts.

    I'm going to see if anything can be done about this, as it also affects Trimesh editor.

    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 &tc.

    I managed to reproduce this one as well.

    • Don't try to loop back to the first vertex you've selected.
    • Also, don't try to loop to other vertices in the original mesh (No harm, but does nothing)

    I'm not sure if this is expected behavior or a bug. Some tutorials, including a rather detailed Polymesh tutorial, have disappeared from the internet. I'll have to dig to see if I have a copy on my spare HD.

    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double

    This one, I'm not so sure about. I think it is unrelated to the things you are dealing with in Polymesh.

    This is almost certainly not a compatibility or System issue, so feel free to ignore most of the questions in the last post!

     

    Last edit: Luke S 2015-03-11
  • Arnab Chakraborty

    Hi Luke,

    Thanks for helping me out. However, I should point out the exact steps that led me to this problem:

    1. I just created a PM cube.
    2. Selected "Edit Object" from the right click menu.
    3. The PME opened and the original window showed a flashing red menu bar with an alert showing the exceptions.

    Thus I am getting the error before trying to do any edit at all!

    I have installed all the available plugins via the manager (except Physics and another pre-alpha one).

    Thanks.

    Arnab.

     
  • Luke S

    Luke S - 2015-03-12

    Okay, back to the drawing board.

    First:

    I have installed all the available plugins via the manager (except Physics and another pre-alpha one).

    Might want to re-think this. There are a couple of plugins that are rather rarely used:

    • HIDPlugin and HIDPlugin-drivers are only useful if you have a SpaceNavigator 3d mouse
    • Meta-Data and Meta-Data manger are defunct, and should probably be removed from the repository. their functionality has been taken over by AOI core, and they have not been re-compiled in a long time. Good chance of causing issues.

    Next:

    The PME opened and the original window showed a flashing red menu bar with an alert showing the exceptions.

    I take it that it was at this point that your keyboard shortcuts didn't work? Please Check:

    • Does the PolyMesh window have focus at this time?
    Plan of action:

    First, get rid of Meta-data & Meta-data manager. If this fixes things, great. If not:

    I'm going to suggest that you remove all plugins that you installed other than Polymesh. Try your sequence again. Does it work this time?

    • If so, add the plugins back in one at a time, until your issue re-appears. Most recent plugin is the culprit.
    • If not, please post Your OS and exact AOI version number.
     
  • Arnab Chakraborty

    Hi Luke,

    I shall follow your suggested steps and report.

    Just quick answers to some of the points you raised:

    The PME shortcuts f v e do not work after the alert. However, as the alert comes right at the start of the PME. So there is no question of f,v,e working before
    the alert. Also shortcuts like b for Bevel do work even after the alert. I looked inside the polymesh properties file as well as the ky shortcut xml file. Both these files show that b (66) is for bevel etc. All these keys do work. I do not see the f,e,v key shortcuts defined anywhere in those files!

    I am using ubuntu 12.10 and AoI 3.0 downloaded from sourceforge.

    Arnab

     
  • Luke S

    Luke S - 2015-03-13

    Best way to see what keyboard shortcuts you have active is to go Edit>Preferences>Shortcuts The v,e,f shortcuts are not added by Polymesh, but rather are part of AOI core. Adding a pic of what you are looking for. If you don't see these shortcuts, something got changed, but it's probably easy to fix. Look for the descriptions in the name field, "Selection Mode:Face" etc. You should be able to see what the current shortcut key is for each. You can change it by clicking "Edit."

     
  • Arnab Chakraborty

    Hi Luke,

    Thanks for not losing patience with me :-)

    I removed all plugins. f,e,v not working. Reinstalled PM. Same problem. Attached are some screenshots that might help.

    But it is a huge relief to learn from your post that f,e,v are provided by AoI core, because I have a compilable source for the
    core that I can sprinkle with System.err.println's :-)

    Arnab.

     

    Last edit: Arnab Chakraborty 2015-03-13
  • Luke S

    Luke S - 2015-03-13

    Okay, looks like something monkeyed with your preferences. None of the core shortcuts seem to be there. Before we do brain surgery on AOI, could you check something for me?

    Go into you user home directory. There should be a sub-directory labeled .artofillusion (the dot is important) It may be a hidden directory, so be sure to check that. Inside, there will be a file called Keystrokes.xml Rename this file so that AOI does not see it. AOI will then try to rebuild from default the next time you open it. does this fix your shortcut issue? Check for more shortcuts than you currently have.

     
  • Luke S

    Luke S - 2015-03-13

    Also, why 3.0? Did you install before 3.1 was released? Once we get these issues figured out, you might want to consider updating, as there were several bugfixes in the 3.0 release. (Not matching the problems you are experiencing.)

     
  • Arnab Chakraborty

    At last...at last...it has worked! Deleting the pesky keystrokes.xml under ~/.artofillusion did the trick.

    Thank you so much for your continued support. By the way, I learned quite a bit about the innards of AoI while searching through the source code for possible workarounds!

    Thanks again.

    Arnab.

     
  • Luke S

    Luke S - 2015-03-14

    Wait --- That fixed all of the issues that we have been discussing? Or just the shortcut key stuff?

    Glad to help.

     
  • Arnab Chakraborty

    Sorry for the delay. I was busy with other things.

    I can now work with PME with the keyboard short cuts working. However, the
    following error message still persists:

    ~~~~~~
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
    Continuing ...
    ~~~~~~~

    Otherwise, everything else is working fine!

    Arnab.

     

Log in to post a comment.