Closed Bug 294436 Opened 20 years ago Closed 20 years ago

XulRunner fails to run simple application and outputs errors under FreeBSD 5.4

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
FreeBSD
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 294405

People

(Reporter: michael_peter_thompson, Assigned: darin.moz)

Details

User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050512 Firefox/1.0.4
Build Identifier: 

Building and running xulrunner from cvs tip under FreeBSD 5.4.  The xulrunner
applicaton seems to build fine, but when used to start the simple application it
produces errors and fails to run.  

Reproducible: Always

Steps to Reproduce:
1. Verify FreeBSD 5.4:

    % uname -a
    FreeBSD hpd530.foo.com 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Fri May 13
22:32:11 PDT 2005     root@hpd530.foo.com:/usr/src/sys/i386/compile/HPD530CMT  i386

2. Checkout the xulrunner application source:

    % setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
    % cvs login
    % cvs checkout mozilla/client.mk
    U mozilla/client.mk
    % cd mozilla
    % gmake -f client.mk checkout MOZ_CO_PROJECT=xulrunner

3. Create a .mozconfig file:

    ---------------------------------------------------
    export MOZILLA_OFFICIAL=1
    mk_add_options MOZILLA_OFFICIAL=1
    ac_add_options --enable-application=xulrunner

    # If you want to build debug, then include these options:
    ac_add_options --enable-debug
    ac_add_options --disable-optimize

    # Following set for Linux/*BSD:
    ac_add_options --enable-default-toolkit=gtk2
    ac_add_options --enable-xft
    ac_add_options --disable-freetype2
    ---------------------------------------------------

4. Build xulrunner

   % gmake -f client.mk build

4. Run the simple application:

    % cd dist/bin
    % ./xulrunner ../xpi-stage/simple/application.ini

Actual Results:  
% ./xulrunner ../xpi-stage/simple/application.ini
---------------------------------------------------------
     Vendor MozillaTest
       Name Simple
    Version 0.1
    BuildID 0000000000
  Copyright Copyright (c) 2004 Mozilla.org
      Flags 00000000
---------------------------------------------------------
No Persistent Registry Found.
Type Manifest File: /home/mike/.mozillatest/simple/p78lj7qy.default/xpti.dat
nsNativeComponentLoader: autoregistering begins.
*** Registering SimpleTestModule components (all right -- a generic module!)
nsNativeComponentLoader: autoregistering succeeded
*** Registering xpcomObsoleteModule components (all right -- a generic module!)
*** Registering CommandLineModule components (all right -- a generic module!)
*** Registering nsImageLib2Module components (all right -- a generic module!)
*** Registering nsLayoutModule components (all right -- a generic module!)
*** Registering xpconnect components (all right -- a generic module!)
*** Registering embedcomponents components (all right -- a generic module!)
*** Registering nsComposerModule components (all right -- a generic module!)
*** Registering nsParserModule components (all right -- a generic module!)
*** Registering docshell_provider components (all right -- a generic module!)
*** Registering nsSoftwareUpdate components (all right -- a generic module!)
*** Registering necko_core_and_primary_protocols components (all right -- a
generic module!)
*** Registering nsJarModule components (all right -- a generic module!)
*** Registering appshell components (all right -- a generic module!)
*** Registering nsTransactionManagerModule components (all right -- a generic
module!)
*** Registering nsMorkModule components (all right -- a generic module!)
*** Registering nsChromeModule components (all right -- a generic module!)
*** Registering necko_secondary_protocols components (all right -- a generic
module!)
*** Registering nsGfxGTKModule components (all right -- a generic module!)
*** Registering nsRDFModule components (all right -- a generic module!)
*** Registering nsEditorModule components (all right -- a generic module!)
*** Registering nsSecurityManagerModule components (all right -- a generic module!)
*** Registering nsCJVMManagerModule components (all right -- a generic module!)
*** Registering nsAccessibilityModule components (all right -- a generic module!)
*** Registering application components (all right -- a generic module!)
*** Registering nsToolkitCompsModule components (all right -- a generic module!)
*** Registering nsWidgetGtk2Module components (all right -- a generic module!)
*** Registering Browser_Embedding_Module components (all right -- a generic module!)
*** Registering nsFindComponent components (all right -- a generic module!)
*** Registering nsI18nModule components (all right -- a generic module!)
*** Registering RemoteServiceModule components (all right -- a generic module!)
*** Registering nsGfxPSModule components (all right -- a generic module!)
*** Registering nsUCvMathModule components (all right -- a generic module!)
*** Registering nsPrefModule components (all right -- a generic module!)
*** Registering nsUConvModule components (all right -- a generic module!)
*** Registering JavaScript_Debugger components (all right -- a generic module!)
*** Registering nsPluginModule components (all right -- a generic module!)
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp,
line 413
Break: at file nsXPConnect.cpp, line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file nsScriptSecurityManager.cpp, line 2911
Break: at file nsScriptSecurityManager.cpp, line 2911
nsNativeComponentLoader: registering deferred (0)
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nsNativeComponentLoader: registering deferred (0)
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nsNativeComponentLoader: registering deferred (0)
pldhash: for the table at address 0x80a0620, the given entrySize of 44 probably
favors chaining over double hashing.
WARNING: Error parsing GRE default preferences. Is this an old-style embedding
app?, file nsPrefService.cpp, line 723
WARNING: Error parsing application default preferences., file nsPrefService.cpp,
line 755
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsChromeRegistry.cpp,
line 1194
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp,
line 413
Break: at file nsXPConnect.cpp, line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file nsScriptSecurityManager.cpp, line 2911
Break: at file nsScriptSecurityManager.cpp, line 2911
WARNING: Cannot create startup observer :
service,@mozilla.org/scriptsecuritymanager;1, file nsAppStartupNotifier.cpp,
line 112
GFX: dpi=96 t2p=0.0666667 p2t=15 depth=16
WARNING: default.xpm not found, file nsWindow.cpp, line 3065
++WEBSHELL == 1
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp,
line 413
Break: at file nsXPConnect.cpp, line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file nsScriptSecurityManager.cpp, line 2911
Break: at file nsScriptSecurityManager.cpp, line 2911
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp,
line 413
Break: at file nsXPConnect.cpp, line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file nsScriptSecurityManager.cpp, line 2911
Break: at file nsScriptSecurityManager.cpp, line 2911
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsContentUtils.cpp, line 153
###!!! ASSERTION: Could not initialize nsContentUtils: 'Error', file
nsLayoutModule.cpp, line 272
Break: at file nsLayoutModule.cpp, line 272
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsWebShellWindow.cpp,
line 265
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsAppShellService.cpp,
line 361
--WEBSHELL == 0
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsAppShellService.cpp,
line 178
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsAppRunner.cpp, line 1938
###!!! ASSERTION: Failed to create nsICloseAllWindows impl.: 'closer', file
nsAppStartup.cpp, line 487
Break: at file nsAppStartup.cpp, line 487
###!!! ASSERTION: Can't veto change!: 'Error', file nsXREDirProvider.cpp, line 612
Break: at file nsXREDirProvider.cpp, line 612
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp,
line 413
Break: at file nsXPConnect.cpp, line 413
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp,
line 413
Break: at file nsXPConnect.cpp, line 413
nsStringStats
 => mAllocCount:            428
 => mReallocCount:           66
 => mFreeCount:             428
 => mShareCount:            309
 => mAdoptCount:            657
 => mAdoptFreeCount:        657
%

Expected Results:  
Run the simple application without warnings.


I did some tracing with gdb of the initial failure with nsScriptSecurityManager
to the method XPCNativeInterface::GetNewOrUsed() around line 200 in
mozilla/js/src/xpconnect/src/xpcwrappednativeinfo.cpp.  

    nsCOMPtr<nsIInterfaceInfo> info;
    ccx.GetXPConnect()->GetInfoForIID(iid, getter_AddRefs(info));
    if(!info)
        return nsnull;

The above method call fails with info == null leading to a cascade of failures
and warnings.

I believe the other failures are similar in nature.
Following a suggestion from Darin Fisher I pulled the source from 4/20/05 and
compiled that under FreeBSD 5.4 -- xulrunner worked fine.  This indicates that
something has changed in the last month that has broken xulrunner.  I suspect
that it is broken in the Linux builds as well because the 4/20 Linux nightly
build worked fine for me under FreeBSD 5.4, but the Linux nightly build didn't
work for me.  

Just for comparison, the output from the 4/20 build when running the "simple"
application is:

% ./xulrunner ../xpi-stage/simple/application.ini
---------------------------------------------------------
     Vendor MozillaTest
       Name Simple
    Version 0.1
    BuildID 0000000000
  Copyright Copyright (c) 2004 Mozilla.org
      Flags 00000000
---------------------------------------------------------
Type Manifest File: /home/mike/.mozillatest/simple/p78lj7qy.default/xpti.dat
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: SelfRegisterDll(libnegotiateauth.so) Load FAILED with
error: /usr/lib/libkrb5.so.7: Undefined symbol "initialize_asn1_error_table_r"
nsNativeComponentLoader: autoregistering succeeded
*** Registering xpcomObsoleteModule components (all right -- a generic module!)
*** Registering CommandLineModule components (all right -- a generic module!)
*** Registering nsImageLib2Module components (all right -- a generic module!)
*** Registering nsLayoutModule components (all right -- a generic module!)
*** Registering xpconnect components (all right -- a generic module!)
*** Registering embedcomponents components (all right -- a generic module!)
*** Registering nsComposerModule components (all right -- a generic module!)
*** Registering nsParserModule components (all right -- a generic module!)
*** Registering docshell_provider components (all right -- a generic module!)
*** Registering nsSoftwareUpdate components (all right -- a generic module!)
*** Registering necko_core_and_primary_protocols components (all right -- a
generic module!)
*** Registering nsJarModule components (all right -- a generic module!)
*** Registering appshell components (all right -- a generic module!)
*** Registering nsTransactionManagerModule components (all right -- a generic
module!)
*** Registering nsMorkModule components (all right -- a generic module!)
*** Registering nsChromeModule components (all right -- a generic module!)
*** Registering necko_secondary_protocols components (all right -- a generic
module!)
*** Registering nsGfxGTKModule components (all right -- a generic module!)
*** Registering nsRDFModule components (all right -- a generic module!)
*** Registering nsEditorModule components (all right -- a generic module!)
*** Registering nsSecurityManagerModule components (all right -- a generic module!)
*** Registering nsCJVMManagerModule components (all right -- a generic module!)
*** Registering nsAccessibilityModule components (all right -- a generic module!)
*** Registering application components (all right -- a generic module!)
*** Registering nsToolkitCompsModule components (all right -- a generic module!)
*** Registering nsWidgetGtk2Module components (all right -- a generic module!)
*** Registering Browser_Embedding_Module components (all right -- a generic module!)
*** Registering nsFindComponent components (all right -- a generic module!)
*** Registering nsI18nModule components (all right -- a generic module!)
*** Registering RemoteServiceModule components (all right -- a generic module!)
*** Registering nsGfxPSModule components (all right -- a generic module!)
*** Registering nsUCvMathModule components (all right -- a generic module!)
*** Registering nsPrefModule components (all right -- a generic module!)
*** Registering nsUConvModule components (all right -- a generic module!)
*** Registering JavaScript_Debugger components (all right -- a generic module!)
*** Registering nsPluginModule components (all right -- a generic module!)
nsNativeComponentLoader: registering deferred (0)
pldhash: for the table at address 0x80d7520, the given entrySize of 44 probably
favors chaining over double hashing.
GFX: dpi=96 t2p=0.0666667 p2t=15 depth=16
++WEBSHELL == 1
++DOMWINDOW == 1
++WEBSHELL == 2
++DOMWINDOW == 2
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
Note: styleverifytree is disabled
Note: frameverifytree is disabled
Note: verifyreflow is disabled
frame: Area(div)(-1) (0x83fdb60) style: 0x83fdad4 :-moz-scrolled-content {}
Wrong parent style context:  style: 0x83fda48 :-moz-scrolled-content {}
should be using:  style: 0x83fd84c {}

frame: Area(div)(-1) (0x83fdb60) style: 0x83fdad4 :-moz-scrolled-content {}
Wrong parent style context:  style: 0x83fda48 :-moz-scrolled-content {}
should be using:  style: 0x83fd84c {}

frame: Area(div)(-1) (0x83fdb60) style: 0x83fdad4 :-moz-scrolled-content {}
Wrong parent style context:  style: 0x83fda48 :-moz-scrolled-content {}
should be using:  style: 0x83fd84c {}

WARNING: Deleting out of flow without tearing down placeholder relationship,
file nsFrame.cpp, line 641
WARNING: requested removal of nonexistent window
, file nsWindowWatcher.cpp, line 946
--WEBSHELL == 1
--DOMWINDOW == 1
WARNING: nsExceptionService ignoring thread destruction after shutdown, file
nsExceptionService.cpp, line 191
--WEBSHELL == 0
--DOMWINDOW == 0
GC Cache:
        hits:    0    0    6    0    0    0    0    0    0    0
        hits: 6, misses: 9, hit percent: 40.000000%
nsStringStats
 => mAllocCount:           5109
 => mReallocCount:          968
 => mFreeCount:            5108  --  LEAKED 1 !!!
 => mShareCount:           3686
 => mAdoptCount:           1585
 => mAdoptFreeCount:       1565  --  LEAKED 20 !!!
%

xulrunner seems also to be broken under Linux (at least on my system). A version
from May 12th, not containing the fix for bug 293461, still works.

I get very similiar error messages running any application, e.g. Darin's
"mybrowser":

---------------------------------------------------------
     Vendor MozillaTest
       Name MyBrowser
    Version 0.2
    BuildID 2005041816
  Copyright Copyright (c) 2004 Mozilla.org
      Flags 00000000
---------------------------------------------------------
Type Manifest File: /home/manfred/.mozillatest/mybrowser/ki8bgn88.default/xpti.dat
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering FAILED
pldhash: for the table at address 0x80da888, the given entrySize of 44 probably
favors chaining over double hashing.
WARNING: Error parsing GRE default preferences. Is this an old-style embedding
app?, file
/home/manfred/download/mozilla/source/mozilla/modules/libpref/src/nsPrefService.cpp,
line 723
WARNING: Error parsing application default preferences., file
/home/manfred/download/mozilla/source/mozilla/modules/libpref/src/nsPrefService.cpp,
line 755
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
/home/manfred/download/mozilla/source/mozilla/chrome/src/nsChromeRegistry.cpp,
line 1194
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
Break: at file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
WARNING: Cannot create startup observer :
service,@mozilla.org/extensions/manager;1, file
/home/manfred/download/mozilla/source/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp,
line 112
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
Break: at file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
WARNING: Cannot create startup observer :
service,@mozilla.org/scriptsecuritymanager;1, file
/home/manfred/download/mozilla/source/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp,
line 112
GFX: dpi=96 t2p=0,0666667 p2t=15 depth=16
++WEBSHELL == 1
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
Break: at file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
Break: at file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
/home/manfred/download/mozilla/source/mozilla/content/base/src/nsContentUtils.cpp,
line 153
###!!! ASSERTION: Could not initialize nsContentUtils: 'Error', file
/home/manfred/download/mozilla/source/mozilla/layout/build/nsLayoutModule.cpp,
line 272
Break: at file
/home/manfred/download/mozilla/source/mozilla/layout/build/nsLayoutModule.cpp,
line 272
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
/home/manfred/download/mozilla/source/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp,
line 265
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
/home/manfred/download/mozilla/source/mozilla/xpfe/appshell/src/nsAppShellService.cpp,
line 361
--WEBSHELL == 0
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
/home/manfred/download/mozilla/source/mozilla/xpfe/appshell/src/nsAppShellService.cpp,
line 178
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
/home/manfred/download/mozilla/source/mozilla/toolkit/xre/nsAppRunner.cpp, line 1938
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
###!!! ASSERTION: Failed to initialize nsScriptSecurityManager:
'NS_SUCCEEDED(rv)', file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
Break: at file
/home/manfred/download/mozilla/source/mozilla/caps/src/nsScriptSecurityManager.cpp,
line 2911
###!!! ASSERTION: Failed to create nsICloseAllWindows impl.: 'closer', file
/home/manfred/download/mozilla/source/mozilla/toolkit/components/startup/src/nsAppStartup.cpp,
line 487
Break: at file
/home/manfred/download/mozilla/source/mozilla/toolkit/components/startup/src/nsAppStartup.cpp,
line 487
###!!! ASSERTION: Can't veto change!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/toolkit/xre/nsXREDirProvider.cpp,
line 612
Break: at file
/home/manfred/download/mozilla/source/mozilla/toolkit/xre/nsXREDirProvider.cpp,
line 612
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
###!!! ASSERTION: This is not supposed to fail!: 'Error', file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
Break: at file
/home/manfred/download/mozilla/source/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,
line 413
nsStringStats
 => mAllocCount:            134
 => mReallocCount:           16
 => mFreeCount:             134
 => mShareCount:            143
 => mAdoptCount:              5
 => mAdoptFreeCount:          5
-> me (for investigation)
Assignee: nobody → darin
This might be a duplicate of bug 294405.  The patch for that bug, which just
landed, fixed a problem where argv[0] would be incorrect.  That might be
screwing over FreeBSD builds.
The problem is fixed now under Linux.
Ok, marking as duplicate.  Please reopen this bug if you can still repro.

*** This bug has been marked as a duplicate of 294405 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.