10.2 Migration Issue

2695
16
12-09-2013 06:27 AM
StephenBaier
New Contributor III
I decided to migrate to 10.2 today, hoping it would be smooth and painless because my application doesn't do anything special - simply renders symbols on a graphics layer.

Note: I can run the sample applications without problems - so either the problem is in my project setup or my data. Would there be any reason a tile package that worked for 10.1.1 not work with 10.2?

This code creates the map, if it is commented out I don't receive be below error spewing, but it still seg-faults upon exiting the application.
ArcGISLocalTiledLayer tiledLayer = new ArcGISLocalTiledLayer("/path/to/map.tpk");
tiledLayer.setName("Nautical Chart");
getLayers().add(tiledLayer);


When I start my application (without the above code commented out), it starts continuously spewing:
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
...


When I close the application I get a core dump, regardless of the local tiled layer.

Any helpful hints?

More information:

When the application starts I get this information:
Java version : 1.7.0_25 (Oracle Corporation) amd64
Rendering engine : OpenGL
GLX version 1.4

glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 640/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.49
OpenGL shading language version string: 4.30 NVIDIA via Cg compiler

Core dump that occurs after closing application:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f2ed57f5ea9, pid=8724, tid=139829799008000
#
# JRE version: 7.0_25-b15
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x709ea9]  Monitor::ILock(Thread*)+0x79
#
# Core dump written. Default location: /home/user/core or core.8724
#
# An error report file with more information is saved as:
# /home/user/hs_err_pid8724.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
0 Kudos
16 Replies
CarlosColón-Maldonado
Occasional Contributor III

public class MapDisposeApp {

    private JFrame window;
    private JMap map;

    public MapDisposeApp() {
        window = new JFrame();
        window.setSize(800, 600);
        window.setLocationRelativeTo(null); // center on screen
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        window.getContentPane().setLayout(new BorderLayout(0, 0));

        window.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent windowEvent) {
                super.windowClosing(windowEvent);
//                map.dispose();
            }
        });

        map = new JMap();
        window.getContentPane().add(map);

//        ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer(
//            "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
//        map.getLayers().add(tiledLayer);
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
          
            @Override
            public void run() {
                try {
                    MapDisposeApp application = new MapDisposeApp();
                    application.window.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }
}



Are you getting the spewing-offs mentioned on this thread?
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
...
0 Kudos
JeremieJoalland1
Occasional Contributor II
no sorry, I found nothing related to "Frame_buffer_OGL" in my crach log file.
0 Kudos
CarlosColón-Maldonado
Occasional Contributor III
no sorry, I found nothing related to "Frame_buffer_OGL" in my crach log file.


Thanks, Jeremie. I tried your code is not happening on me, either. It's on my app which uses some AWT components over the map which might be causing the issue.
0 Kudos
JohnWass
New Contributor III
I ran into the same spewing of messages ('Frame_buffer_OGL::init_ FAILED to create_ FramebufferName') when my migrated app started up.  Things were working fine 15 minutes prior in 10.1.1, but then stopped after swapping the libraries.

In my case I found the remedy was to run the application on the event dispatch thread (ie. SwingUtilities.invokeLater).  I wasnt doing so in 10.1 without issue, but it appears something in 10.2 is more sensitive in that regard.

hth

john
0 Kudos
ColinAnderson1
Esri Contributor
Yes, all use of JMap (including creation and disposing) should be carried out on the EDT. JMap being a Swing component has the same restrictions you would find with the standard Swing components - http://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html#threading

This was also a restriction for the previous release but it might have been a bit more robust to people not following the EDT requirement.
0 Kudos
StephenBaier
New Contributor III
John - Thanks for the information. I no longer need to use my workaround by opening my map on the Swing EDT.

Colin - Thanks for the additional information. Not disposing on the EDT was causing problems after creating on the EDT.
0 Kudos
CarlosColón-Maldonado
Occasional Contributor III
In my case I found the remedy was to run the application on the event dispatch thread (ie. SwingUtilities.invokeLater).  I wasnt doing so in 10.1 without issue, but it appears something in 10.2 is more sensitive in that regard.


Thank you, John. I got it to work as well.
0 Kudos