Thread problem moving from 3.0.10 to 3.1.0

Hello all,
I have just recompiled a project with 3.1.0 which has been working perfectly with 3.0.10 and I am now getting the following error
OGL: Enter showing state.
Mar 19, 2017 2:55:30 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
at com.jme3.system.awt.AwtPanel.drawFrameInThread(AwtPanel.java:176)
at com.jme3.system.awt.AwtPanel.onFrameEnd(AwtPanel.java:312)
at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:197)
at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:44)
at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:68)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:156)
at java.lang.Thread.run(Thread.java:745)

I am running JME inside an AWT Panel. Initially I thought that perhaps the JME threading had changed and was somehow affecting the enqueuer process, but the future I have in place waiting on the application start is returning correctly. My application create code is below, but I cannot see how this would work correctly in 3.0.10 and not in 3.1.0; so I am hoping someone has seen something like this before and can shed some light on the problem.

Thanks in advance for any help anyone can give.

Patrick.

public void createApp(String appClass, int viewWidth, int viewHeight,
boolean pauseOnLostFocus, String viewUID) {
AppSettings settings = new AppSettings(true);

    settings.setWidth(viewWidth);
    settings.setHeight(viewHeight);
    settings.setCustomRenderer(AwtPanelsContext.class);
    
            
    try {
            Class<? extends Application> clazz = (Class<? extends Application>) Class.forName(appClass);
        theApp = clazz.newInstance();
    }catch (ClassNotFoundException ex){
        ex.printStackTrace();
    }catch (InstantiationException ex){
        ex.printStackTrace();
    }catch (IllegalAccessException ex){
        ex.printStackTrace();
    }
    
    
    theAppInstance = (SystemModeller3DApp)theApp;
    theAppInstance.setAppMgr(this); //put the AppMgr ref in the app before we start it.
    theAppInstance.setShowSettings(false); //stops the monkey splash page.
    theApp.setPauseOnLostFocus(pauseOnLostFocus);
    theApp.setSettings(settings);
    application_To_View_Mapping.put(viewUID, theApp);
    appRunningState_Map.put(viewUID, Boolean.FALSE);
    startApp(viewUID);
    try {
        fut.get();
    } catch (InterruptedException ex) {
        Logger.getLogger(SystemModellerApplicationManager.class.getName()).log(Level.SEVERE, null, ex);
        ex.printStackTrace();
    } catch (ExecutionException ex) {
        Logger.getLogger(SystemModellerApplicationManager.class.getName()).log(Level.SEVERE, null, ex);
        ex.printStackTrace();
    }
    System.out.println("the startApp future has returned ...");
    ctx = (AwtPanelsContext)theApp.getContext();
    mapViewPanelUID_To_ViewContext(viewUID, ctx);
    Node theAppRootNode = theAppInstance.getAppRootNode();
    theAppRootNode.setName("Scene Root Node for view: " + viewUID);
    SceneManager.INSTANCE.setSceneRootNode(viewUID, theAppInstance.getAppRootNode());
    theAppInstance.getAppMgr().setAssetManager(viewUID, theAppInstance.getAssetManager());
            
}

public void startApp(String _viewUID) {
theApp.start();

    fut = theApp.enqueue(new Callable<Void>(){
        @Override
        public Void call(){
            if (theApp instanceof SimpleApplication){
                SimpleApplication simpleApp = (SimpleApplication) theApp;
                
                System.out.println("The App has started ... call() made ...");
                appRunningState_Map.put(_viewUID, Boolean.TRUE);
            
            }
            return null;
        }
    });
}