#451 Smoothing settings causes ArrayIndexOutOfBoundsException

None
closed-invalid
nobody
None
5
2015-01-19
2012-06-02
Anonymous
No

Symptom: Trying to enable smoothing (subdivision) in editor makes it unusable due to
ArrayIndexOutOfBoundsException.

Version used: 2.9.1 (Note: not new the issue is present in earlier versions as well.)

Reproducability: Not always. Only on some specific objects of certain complexity.

Steps to replicate:
Open an obj file of decent complexity (usually > 1 MB)
Select a complex object/group to edit by using menu Object -> Edit object (or press Ctrl +e)
Inside the editor select menu item Mesh -> Smoothing method -> anything other than 'None'.
The editor shows nothing and the console spews out ArrayIndexOutOfBoundsExceptions.
As stated above: not always able to reproduce it.

Additional info:
I will look for an object that causes this and has an acceptable license so I may sent it to
you if you need it and wish to look into this further.

Full stacktrace from the first exception:

java.lang.ArrayIndexOutOfBoundsException: 23804
at artofillusion.object.TriangleMesh.doSubdivide(TriangleMesh.java:2421)

at artofillusion.object.TriangleMesh.subdivideLoop(TriangleMesh.java:169
0)
at artofillusion.object.TriangleMesh.getRenderingMesh(TriangleMesh.java:
783)
at artofillusion.object.ObjectInfo.getPreviewMesh(ObjectInfo.java:312)
at artofillusion.TriMeshViewer.updateImage(TriMeshViewer.java:49)
at artofillusion.view.SoftwareCanvasDrawer.paint(SoftwareCanvasDrawer.ja
va:97)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at buoy.internal.EventLinkRecord.dispatchEvent(EventLinkRecord.java:81)
at buoy.event.EventSource.dispatchEvent(EventSource.java:140)
at buoy.widget.Widget.dispatchEvent(Widget.java:326)
at buoy.widget.CustomWidget$CustomWidgetComponent.paintComponent(CustomW
idget.java:102)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown S
ource)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Window.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$700(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.lang.ArrayIndexOutOfBoundsException: 23804
at artofillusion.object.TriangleMesh.doSubdivide(TriangleMesh.java:2421)

at artofillusion.object.TriangleMesh.subdivideLoop(TriangleMesh.java:169
0)
at artofillusion.object.TriangleMesh.getRenderingMesh(TriangleMesh.java:
783)
at artofillusion.object.ObjectInfo.getPreviewMesh(ObjectInfo.java:312)
at artofillusion.TriMeshViewer.updateImage(TriMeshViewer.java:49)
at artofillusion.view.SoftwareCanvasDrawer.paint(SoftwareCanvasDrawer.ja

Discussion

  • Peter Eastman

    Peter Eastman - 2012-06-03

    If you can attach a file that reproduces this problem, that would be a huge help.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-03

    Object in this file will cause this

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-03

    I have added a small file (smallest thing I could make that causes this problem).
    I just used a small existing object from a scene that caused this and randomized
    the vertices so it had nothing in common with the original object.
    The reason was that I had had it for a while and could find nothing on the license
    and if I could share it with you without running foul with regards to copyright violations.
    The object may look odd but there is nothing wrong with the geometry AFAIK.

    ====

    Excuse me I'm a different Anonymous and didn't find a button to start my own post.
    The same bug arises from this little file:
    ---- begin ----

    Produced by Art of Illusion 2.9.2, Tue Nov 26 11:41:25 CET 2013

    s 0
    g Bug451
    v 0 -9.5 0
    v 19 -9.5 0
    v 19 9.5 0
    v 0 9.5 0
    v 0 0 -13.64103
    v -19 9.5 0
    v -19 -9.5 0
    f 1 2 3
    f 3 4 5
    f 1 3 5
    f 4 6 7
    f 7 1 2
    f 2 3 4
    f 4 7 2
    f 7 6 4
    f 4 5 1
    f 7 4 1
    ---- end ----

     
    Last edit: Anonymous 2013-11-26
  • Luke S

    Luke S - 2015-01-19

    The geometry of the original mesh listed is invalid, and since the mesh is randomized, there is no way to tell how it got that way. "Edge with more than two faces." Closing.

     
  • Luke S

    Luke S - 2015-01-19
    • status: open --> closed-invalid
    • Group: -->
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks