Buggy code:
int rc = XPCOMInit . GRE_GetGREPathWithProperties ( range , 1 , propertiesPtr , 0 , greBuffer , length ) ; if ( rc != ( XPCOM . NS_OK ) ) { C . free ( lower ) ; bytes = MozillaDelegate . wcsToMbcs ( null , Mozilla . GRERANGE_LOWER_FALLBACK , true ) ; lower = C . malloc ( bytes . length ) ; C . memmove ( lower , bytes , bytes . length ) ; range . lower = lower ; rc = XPCOMInit . GRE_GetGREPathWithProperties ( range , 1 , propertiesPtr , 0 , greBuffer , length ) ; } C . free ( lower ) ; C . free ( upper ) ; C . free ( propertiesPtr ) ; if ( rc == ( XPCOM . NS_OK ) ) { length = C . strlen ( greBuffer ) ; bytes = new byte [ length ] ; C . memmove ( bytes , greBuffer , length ) ; mozillaPath = new String ( MozillaDelegate . mbcsToWcs ( null , bytes ) ) ; IsXULRunner = ( mozillaPath . length ( ) ) > 0 ; if ( IsXULRunner ) { byte [ ] path = MozillaDelegate . wcsToMbcs ( null , mozillaPath , true ) ; rc = XPCOMInit . XPCOMGlueStartup ( path ) ; if ( rc != ( XPCOM . NS_OK ) ) { IsXULRunner = false ; mozillaPath = mozillaPath . substring ( 0 , mozillaPath . lastIndexOf ( Mozilla . SEPARATOR_OS ) ) ; if ( Device . DEBUG ) System . out . println ( ( "cannot<seq2seq4repair_space>use<seq2seq4repair_space>detected<seq2seq4repair_space>XULRunner:<seq2seq4repair_space>" + mozillaPath ) ) ; } else { Mozilla . XPCOMInitWasGlued = true ; } } } C . free ( greBuffer ) ; } if ( IsXULRunner ) { if ( Device . DEBUG ) System . out . println ( ( "XULRunner<seq2seq4repair_space>path:<seq2seq4repair_space>" + mozillaPath ) ) ; try { Library . loadLibrary ( "swt-xulrunner" ) ; } catch ( UnsatisfiedLinkError e ) { SWT . error ( ERROR_NO_HANDLES , e ) ; } byte [ ] path = MozillaDelegate . wcsToMbcs ( null , mozillaPath , true ) ; int rc = XPCOM . XPCOMGlueStartup ( path ) ; if ( rc != ( XPCOM . NS_OK ) ) { browser . dispose ( ) ; Mozilla . error ( rc ) ; } Mozilla . XPCOMWasGlued = true ; mozillaPath = mozillaPath . substring ( 0 , mozillaPath . lastIndexOf ( Mozilla . SEPARATOR_OS ) ) ; } else { if ( ( style & ( SWT . MOZILLA ) ) != 0 ) { browser . dispose ( ) ; String errorString = ( ( mozillaPath != null ) && ( ( mozillaPath . length ( ) ) > 0 ) ) ? ( "<seq2seq4repair_space>[Failed<seq2seq4repair_space>to<seq2seq4repair_space>use<seq2seq4repair_space>detected<seq2seq4repair_space>XULRunner:<seq2seq4repair_space>" + mozillaPath ) + "]" : "<seq2seq4repair_space>[Could<seq2seq4repair_space>not<seq2seq4repair_space>detect<seq2seq4repair_space>registered<seq2seq4repair_space>XULRunner<seq2seq4repair_space>to<seq2seq4repair_space>use]" ; SWT . error ( ERROR_NO_HANDLES , null , errorString ) ; } int ptr = C . getenv ( MozillaDelegate . wcsToMbcs ( null , MOZILLA_FIVE_HOME , true ) ) ; if ( ptr != 0 ) { int length = C . strlen ( ptr ) ; byte [ ] buffer = new byte [ length ] ; C . memmove ( buffer , ptr , length ) ; mozillaPath = new String ( MozillaDelegate . mbcsToWcs ( null , buffer ) ) ; } else { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , null , "<seq2seq4repair_space>[Unknown<seq2seq4repair_space>Mozilla<seq2seq4repair_space>path<seq2seq4repair_space>(MOZILLA_FIVE_HOME<seq2seq4repair_space>not<seq2seq4repair_space>set)]" ) ; } if ( Device . DEBUG ) System . out . println ( ( "Mozilla<seq2seq4repair_space>path:<seq2seq4repair_space>" + mozillaPath ) ) ; if ( Compatibility . fileExists ( mozillaPath , "components//libwidget_gtk.so" ) ) { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , null , "<seq2seq4repair_space>[Mozilla<seq2seq4repair_space>GTK2<seq2seq4repair_space>required<seq2seq4repair_space>(GTK1.2<seq2seq4repair_space>detected)]" ) ; } try { Library . loadLibrary ( "swt-mozilla" ) ; } catch ( UnsatisfiedLinkError e ) { try { Library . loadLibrary ( "swt-mozilla-gcc3" ) ; } catch ( UnsatisfiedLinkError ex ) { browser . dispose ( ) ; <START_BUG> SWT . error ( ERROR_NO_HANDLES , e ) ; <END_BUG> } } } if ( ! ( Mozilla . Initialized ) ) { int [ ] retVal = new int [ 1 ] ; nsEmbedString pathString = new nsEmbedString ( mozillaPath ) ; int rc = XPCOM . NS_NewLocalFile ( pathString . getAddress ( ) , true , retVal ) ; pathString . dispose ( ) ; if ( rc != ( XPCOM . NS_OK ) ) { browser . dispose ( ) ; Mozilla . error ( rc ) ; } if ( ( retVal [ 0 ] ) == 0 ) { browser . dispose ( ) ; Mozilla . error ( NS_ERROR_NULL_POINTER ) ; } Mozilla . LocationProvider = new AppFileLocProvider ( mozillaPath ) ; Mozilla . LocationProvider . AddRef ( ) ; nsIFile localFile = new nsILocalFile ( retVal [ 0 ] ) ; rc = XPCOM . NS_InitXPCOM2 ( 0 , localFile . getAddress ( ) , Mozilla . LocationProvider . getAddress ( ) ) ; localFile . Release ( ) ; if ( rc != ( XPCOM . NS_OK ) ) { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , null , ( ( ( ( "<seq2seq4repair_space>[MOZILLA_FIVE_HOME<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>point<seq2seq4repair_space>at<seq2seq4repair_space>an<seq2seq4repair_space>embeddable<seq2seq4repair_space>GRE]<seq2seq4repair_space>[NS_InitEmbedding<seq2seq4repair_space>" + mozillaPath ) + "<seq2seq4repair_space>error<seq2seq4repair_space>" ) + rc ) + "]" ) ) ; } System . setProperty ( Mozilla . GRE_INITIALIZED , "true" ) ; if ( IsXULRunner ) { System . setProperty ( Mozilla . XULRUNNER_PATH , mozillaPath ) ; } } if ( IsXULRunner ) { try { Class clazz = Class . forName ( "org.mozilla.xpcom.Mozilla" ) ; Method method = clazz . getMethod ( "getInstance" , new Class [ 0 ] ) ; Object mozilla = method . invoke ( null , new Object [ 0 ] ) ; method = clazz . getMethod ( "getComponentManager" , new Class [ 0 ] ) ; try { method . invoke ( mozilla , new Object [ 0 ] ) ; }

Fix:
SWT . error ( ERROR_NO_HANDLES , e , ( ( "<seq2seq4repair_space>[MOZILLA_FIVE_HOME='" + mozillaPath ) + "']" ) ) ;