Closed Bug 319346 Opened 19 years ago Closed 12 years ago

disable-xul build mozilla with bugs, not showed <INPUT type="text"> + scrollbars, crashes

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

ARM
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: romaxa, Assigned: mpgritti)

Details

(Keywords: crash, helpwanted)

Attachments

(6 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Debian package 1.0.7-1)
Build Identifier: Mozilla/5.0 (X11; U; Linux armv5tel; en-US; rv:1.9a1) Gecko/20051206

After building of mozilla engine (see Build Indentifier) with option  "--disable-xul" appears some bugs and crashes:
1) './run-mozilla.sh ./TestGtkEmbed about:blank' crashed with log

...................
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsCSSLoader.cpp, line 1913
###!!! ASSERTION: Could not load xulscrollbars.css.:
'gStyleCache->mScrollbarsSheet', file nsLayoutStylesheetCache.cpp,
line 94
Break: at file nsLayoutStylesheetCache.cpp, line 94
Note: styleverifytree is disabled
Note: frameverifytree is disabled
###!!! ASSERTION: Must be a box frame!:
'mScrollCornerBox->IsBoxFrame()', file nsGfxScrollFrame.cpp, line 2421
Break: at file nsGfxScrollFrame.cpp, line 2421
###!!! ASSERTION: A box layout method was called but InitBoxMetrics
was never called: 'metrics', file nsFrame.cpp, line 5596
Break: at file nsFrame.cpp, line 5596
./run-mozilla.sh: line 131: 22915 Segmentation fault      "$prog" ${1+"$@"}
....................................

replacing of this line
http://lxr.mozilla.org/seamonkey/source/embedding/browser/gtk/src/EmbedPrivate.cpp#449
 with this "scrollbars->SetVisible(PR_FALSE);" or putting "xulscrollbars.css" directly into chrome directory, can fix this crash, but scrollbars not showed.

also doesn't work "about:" url, and not showed any <INPUT type="text"> on layout.

.mozconfig in first attachment
configure in second attachment

Reproducible: Always

Steps to Reproduce:
1. checkout latest trunk sources
2. put .mozconfig and configure files from attachments into root build directory
3. ./configure; make; make install
4. cd /usr/lib..../
5. ./run-mozilla.sh ./TestGtkEmbed about:

Actual Results:  
It crashed

Expected Results:  
About page showed.
Attached file Mozconfig
mozconfig file with option --disable-xul
part of configure file with added disabled xul variables
MOZ_XUL=
MOZ_XUL_APP=
Attachment #205164 - Attachment mime type: application/octet-stream → text/plain
Attachment #205165 - Attachment mime type: application/octet-stream → text/plain

*** This bug has been marked as a duplicate of 318041 ***
Severity: major → critical
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Keywords: crash
Resolution: --- → DUPLICATE
No, this is NOT a duplicate.  This is a separate bug on a separate issue.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
I suspect we're failing to export the scrollbar stylesheets or something when MOZ_XUL is off (and then crashing because the styles we expect are not applied).

Benjamin, I know you're going to say that we should just remove the MOZ_XUL ifdef, but we support it on the 1.8 branch last I checked, and on an embedded device I can see how it would be useful...
Status: UNCONFIRMED → NEW
Component: Layout: Form Controls → XP Miscellany
Ever confirmed: true
QA Contact: layout.form-controls → brendan
The --disable-xul build option exists, but we do *not* support it (even minimo doesn't use it!). I'm happy to accept patches but I am not going to spend any time on it.
xpmisc is really not to be used...
Component: XP Miscellany → Widget: Gtk
Keywords: helpwanted
QA Contact: brendan → gtk
Hardware: Other → PocketPC
Presumably the second assertion is the result of roc's scrollcorner landing.
This is NOT a GTK issue. It's a build issue, most likely.  Given that the build config people have disowned this option, of the components we have, XP Misc is closest.
Component: Widget: Gtk → XP Miscellany
QA Contact: gtk → brendan
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.12)
> Gecko/20050922 Firefox/1.0.7 (Debian package 1.0.7-1)
> Build Identifier: Mozilla/5.0 (X11; U; Linux armv5tel; en-US; rv:1.9a1)
> Gecko/20051206
> 
> After building of mozilla engine (see Build Indentifier) with option 
> "--disable-xul" appears some bugs and crashes:
> 1) './run-mozilla.sh ./TestGtkEmbed about:blank' crashed with log
> 
> ...................
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
> nsCSSLoader.cpp, line 1913
> ###!!! ASSERTION: Could not load xulscrollbars.css.:
> 'gStyleCache->mScrollbarsSheet', file nsLayoutStylesheetCache.cpp,
> line 94
> Break: at file nsLayoutStylesheetCache.cpp, line 94
> Note: styleverifytree is disabled
> Note: frameverifytree is disabled
> ###!!! ASSERTION: Must be a box frame!:
> 'mScrollCornerBox->IsBoxFrame()', file nsGfxScrollFrame.cpp, line 2421
> Break: at file nsGfxScrollFrame.cpp, line 2421
> ###!!! ASSERTION: A box layout method was called but InitBoxMetrics
> was never called: 'metrics', file nsFrame.cpp, line 5596
> Break: at file nsFrame.cpp, line 5596
> ./run-mozilla.sh: line 131: 22915 Segmentation fault      "$prog" ${1+"$@"}
> ....................................
> 
> replacing of this line
> http://lxr.mozilla.org/seamonkey/source/embedding/browser/gtk/src/EmbedPrivate.cpp#449
>  with this "scrollbars->SetVisible(PR_FALSE);" or putting "xulscrollbars.css"
> directly into chrome directory, can fix this crash, but scrollbars not showed.
> 
> also doesn't work "about:" url, and not showed any <INPUT type="text"> on
> layout.
> 
> .mozconfig in first attachment
> configure in second attachment
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. checkout latest trunk sources
> 2. put .mozconfig and configure files from attachments into root build
> directory
> 3. ./configure; make; make install
> 4. cd /usr/lib..../
> 5. ./run-mozilla.sh ./TestGtkEmbed about:
> 
> Actual Results:  
> It crashed
> 
> Expected Results:  
> About page showed.
> 

Romaxa and I have made it work! I don't know if our changes are valid ones. We added some lines on configure.in. You can see it below:

dnl ========================================================
dnl disable xul
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xul,
[  --disable-xul           Disable XUL],
    MOZ_XUL= )
if test "$MOZ_XUL"; then
  AC_DEFINE(MOZ_XUL)
else
  dnl remove extensions that require XUL
  MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//' -e 's/tasks//'`
  dnl disable minimo features those require XUL
  if test "$MINIMO"; then
     MOZ_XUL_APP=
     MINIMO=
     NECKO_PROTOCOLS_DEFAULT="about data file ftp http res"
     MOZ_THUNDERBIRD=
     MOZ_SUNBIRD=
     MOZ_ENABLE_XREMOTE=
     MOZ_MOVEMAIL=
  fi
fi

Our mozconfig is:
ac_add_options --enable-application=minimo

ac_add_options --prefix=/usr/

# use GTK+-2 widget set with XFT font rendering
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2

ac_add_options --disable-xul
ac_add_options --disable-libxul

ac_add_options --enable-optimize=-Os
ac_add_options --enable-strip
ac_add_options --disable-debug
ac_add_options --enable-reorder
#ac_add_options --enable-elf-dynstr-gc
ac_add_options --disable-xpfe-components
ac_add_options --enable-crypto

# enable static build
#ac_add_options --disable-shared
#ac_add_options --enable-static

# remove link dependency on libstdc++.so
LIBS=-lsupc++
CXX=gcc

Unfortunately we can't load "about:config" or "about:" because the first one tries to load a file config.xul and the second one a about.xhtml.
Unfortunately, our browser (not testgtkembed) has not worked since we made the changes... We got a segfault when the page will be shown! It loads the page, but doesn't show it! 
XUL support shouldn't be required for .xhtml files, there must be some other problem.
(In reply to comment #11)
> XUL support shouldn't be required for .xhtml files, there must be some other
> problem.
> 

Problem in broken chrome paths, that has brokened after xul disabling.
I think that the problem is that you might not have the chrome directory setup properly. 

Can you do a ls -alR of the directory you are running from (attach it to a patch), also attach the components/compreg.dat file.  This will aide me in debugging the problem.
Attached file compreg.dat file
Attachment #208717 - Attachment mime type: video/mpeg → text/plain
Attached file chromelist file
(In reply to comment #13)
> I think that the problem is that you might not have the chrome directory setup
> properly. 
> 
> Can you do a ls -alR of the directory you are running from (attach it to a
> patch), also attach the components/compreg.dat file.  This will aide me in
> debugging the problem.
> 

I have attached all files, and also content of chrome list...
Assignee: nobody → mpgritti
Component: XP Miscellany → Embedding: GTK Widget
QA Contact: brendan → pavlov
I think the disable-xul feature is solved. We are able to run TestGtkEmbed fine. Now, the problem is with chromelite (there is no scrollbars and so on...). Doug, is the nsSimpleChromeRegistry.cpp done. We can see just some headers in the LXR:
http://lxr.mozilla.org/seamonkey/source/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp

(In reply to comment #17)
> (In reply to comment #13)
> > I think that the problem is that you might not have the chrome directory setup
> > properly. 
> > 
> > Can you do a ls -alR of the directory you are running from (attach it to a
> > patch), also attach the components/compreg.dat file.  This will aide me in
> > debugging the problem.
> > 
> 
> I have attached all files, and also content of chrome list...
> 
The lack of scrollbars probably has something to do with missing packaging/repackaging: chromelite itself just maps one URI to another.
(In reply to comment #19)
> The lack of scrollbars probably has something to do with missing
> packaging/repackaging: chromelite itself just maps one URI to another.
> 

could you have a look at the following bug and discuss about it? It is a related bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=318041
(In reply to comment #18)
> I think the disable-xul feature is solved. We are able to run TestGtkEmbed
> fine. Now, the problem is with chromelite (there is no scrollbars and so
> on...). Doug, is the nsSimpleChromeRegistry.cpp done. We can see just some
> headers in the LXR:
> http://lxr.mozilla.org/seamonkey/source/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp
> 
> (In reply to comment #17)
> > (In reply to comment #13)
> > > I think that the problem is that you might not have the chrome directory setup
> > > properly. 
> > > 
> > > Can you do a ls -alR of the directory you are running from (attach it to a
> > > patch), also attach the components/compreg.dat file.  This will aide me in
> > > debugging the problem.
> > > 
> > 
> > I have attached all files, and also content of chrome list...
> > 
> 

I could do the scrollbars working in a hard way. I had to copy a libchrome.so
and a librdf.so from the objdir/components and the
objdir/chrome/toolkit.manifest of a enabled xul compilation to the respective
folders of my disabled xul compilation. How could I fix it?
Attached patch BUGFIX patchSplinter Review
BUGFIX:

Has been created patch for fixing this bug.
This patch valid for trunk sources only after applying of BUGFIX from
https://bugzilla.mozilla.org/show_bug.cgi?id=330331
and patch https://bugzilla.mozilla.org/attachment.cgi?id=214900&action=view

Has been added embed-lite crome component
And fixed detecting of path's to crome elements in chromelite component

Works without patch from 330331 on mozilla-cvs-27012005 sources.
Comment on attachment 214901 [details] [diff] [review]
BUGFIX patch

i would rather not check in new files (I am assuming that these files are copied from somewhere else in the source tree.)  Can you instead have a makefile rule that finds and copies the right bits?

I do not understand the nsFrame.cpp change -- are you crashing there?

Could you also use `cvs diff -u10`
I don't understand this patch at all, but I'm certain it's not the correct fix. I'd like to transition away from using chromelite in all cases, now that mozilla/chrome has the RDF bits ifdefed.
(In reply to comment #23)
> (From update of attachment 214901 [details] [diff] [review] [edit])
> i would rather not check in new files (I am assuming that these files are
> copied from somewhere else in the source tree.)  Can you instead have a
> makefile rule that finds and copies the right bits?
> 
> I do not understand the nsFrame.cpp change -- are you crashing there?
> 
> Could you also use `cvs diff -u10`
> 
Yes, if xullscrolbars.css has been missed, then metrics = 0,  we wants to take ->mStyleChange from undefined element.


Please file the frame patch as a different bug; it needs to be reviewed by a layout peer (dbaron or bz, most likely).
(In reply to comment #24)
> I don't understand this patch at all, but I'm certain it's not the correct fix.

This patch should fixed incorrect definition of path's for libchromelite library... and adopt it for using simple crome structure.

skin/...
locale/...
content/...

> I'd like to transition away from using chromelite in all cases, now that
> mozilla/chrome has the RDF bits ifdefed.
> 

I'am not sure about adding ...browser/gtk/chrome.... and may be it can be changed on rules, that will copy needed files to instalation directory from other chrome components.

May be we should't use chrome directory in this case at all? and implement some rules, that defined in *.css directly in source code?
What I'm saying is that by the time we get to 1.9 I want to get rid of "chromelite" completely, and also avoid all the chrome repackaging and embed.jar mess that currently plagues embedders. Instead, we'd build xulrunner --with-embeddig-profile=minimal and the build would ship the correct files (and only the correct files) using ifdefs in the current makefiles/jar.mn files.
(In reply to comment #28)
> What I'm saying is that by the time we get to 1.9 I want to get rid of
> "chromelite" completely, and also avoid all the chrome repackaging and
> embed.jar mess that currently plagues embedders. Instead, we'd build xulrunner
> --with-embeddig-profile=minimal and the build would ship the correct files (and
> only the correct files) using ifdefs in the current makefiles/jar.mn files.
> 

aha... ok...
But in any case, wee need to define somewhere variables, that defined in ua.css, scrollbar.css .... and if you wants to remove chromelite, where you want define it?
Why aren't we shipping "the" ua.css/scrollbars.css?
Comment on attachment 214901 [details] [diff] [review]
BUGFIX patch

this patch is not acceptable for reasons cited in this bug.
Attachment #214901 - Flags: review-
QA Contact: pavlov → gtk-widget
Product: Core → Core Graveyard
AFAIK, GTK embedding in that way has been discontinued, and future embedding efforts will likely go different ways, so this bug is probably not relevant any more.
That said, there's no info here on any recent software versions and code responsible for that probably has changed a lot. If this is still relevant, please reopen with current info and a crash signature.
Status: NEW → RESOLVED
Closed: 19 years ago12 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: