Opened 15 years ago
Closed 15 years ago
#5871 closed bug (fixed)
Backgrounds prefs crash by open favorites
Reported by: | damoklas | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1/alpha3 |
Component: | Applications/Tracker | Version: | R1/alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Backgrounds prefs aplet crash by open favorites, see attached picture.
Attachments (2)
Change History (15)
by , 15 years ago
Attachment: | backgroundsfavoritescr.jpg added |
---|
comment:1 by , 15 years ago
GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-pc-haiku"...(no debugging symbols found)
[tcsetpgrp failed in terminal_inferior: Invalid Argument] Thread 3188 caused an exception: Segment violation Reading symbols from /boot/system/runtime_loader...done. Loaded symbols for /boot/system/runtime_loader Reading symbols from /boot/system/lib/libbe.so...done. Loaded symbols for /boot/system/lib/libbe.so Reading symbols from /boot/system/lib/libtracker.so...done. Loaded symbols for /boot/system/lib/libtracker.so Reading symbols from /boot/system/lib/libtranslation.so...done. Loaded symbols for /boot/system/lib/libtranslation.so Reading symbols from /boot/system/lib/liblocale.so...done. Loaded symbols for /boot/system/lib/liblocale.so Reading symbols from /boot/system/lib/libroot.so...done. Loaded symbols for /boot/system/lib/libroot.so Reading symbols from /boot/system/lib/libstdc++.hrev4.so...done. Loaded symbols for /boot/system/lib/libstdc++.hrev4.so Reading symbols from /boot/system/lib/libtextencoding.so...done. Loaded symbols for /boot/system/lib/libtextencoding.so Reading symbols from /boot/system/lib/libicu-common.so.4.2...done. Loaded symbols for /boot/system/lib/libicu-common.so.4.2 Reading symbols from /boot/system/lib/libicu-i18n.so.4.2...done. Loaded symbols for /boot/system/lib/libicu-i18n.so.4.2 Reading symbols from /boot/system/lib/libicu-data.so.4.2...done. Loaded symbols for /boot/system/lib/libicu-data.so.4.2 Reading symbols from /boot/system/add-ons/locale/catalogs/plaintext...done. Loaded symbols for /boot/system/add-ons/locale/catalogs/plaintext Reading symbols from /boot/system/add-ons/locale/catalogs/zeta...done. Loaded symbols for /boot/system/add-ons/locale/catalogs/zeta Reading symbols from /boot/system/add-ons/Translators/BMPTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/BMPTranslator Reading symbols from /boot/system/add-ons/Translators/EXRTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/EXRTranslator Reading symbols from /boot/system/lib/libilmimf.so...done. Loaded symbols for /boot/system/lib/libilmimf.so Reading symbols from /boot/system/lib/libz.so.1...done. Loaded symbols for /boot/system/lib/libz.so.1 Reading symbols from /boot/system/add-ons/Translators/GIFTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/GIFTranslator Reading symbols from /boot/system/add-ons/Translators/HVIFTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/HVIFTranslator Reading symbols from /boot/system/add-ons/Translators/ICOTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/ICOTranslator Reading symbols from /boot/system/add-ons/Translators/JPEG2000Translator...done. Loaded symbols for /boot/system/add-ons/Translators/JPEG2000Translator Reading symbols from /boot/system/add-ons/Translators/JPEGTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/JPEGTranslator Reading symbols from /boot/system/lib/libjpeg.so.8.0...done. Loaded symbols for /boot/system/lib/libjpeg.so.8.0 Reading symbols from /boot/system/add-ons/Translators/PCXTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/PCXTranslator Reading symbols from /boot/system/add-ons/Translators/PNGTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/PNGTranslator Reading symbols from /boot/system/add-ons/Translators/PPMTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/PPMTranslator Reading symbols from /boot/system/add-ons/Translators/RAWTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/RAWTranslator Reading symbols from /boot/system/add-ons/Translators/RTF-Translator...done. Loaded symbols for /boot/system/add-ons/Translators/RTF-Translator Reading symbols from /boot/system/add-ons/Translators/SGITranslator...done. Loaded symbols for /boot/system/add-ons/Translators/SGITranslator Reading symbols from /boot/system/add-ons/Translators/STXTTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/STXTTranslator Reading symbols from /boot/system/add-ons/Translators/TGATranslator...done. Loaded symbols for /boot/system/add-ons/Translators/TGATranslator Reading symbols from /boot/system/add-ons/Translators/TIFFTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/TIFFTranslator Reading symbols from /boot/system/lib/libtiff.so.3.8...done. Loaded symbols for /boot/system/lib/libtiff.so.3.8 Reading symbols from /boot/system/add-ons/Translators/WonderBrushTranslator...done. Loaded symbols for /boot/system/add-ons/Translators/WonderBrushTranslator [tcsetpgrp failed in terminal_inferior: Invalid Argument] [Switching to team /boot/system/preferences/Backgrounds (3173) thread menu_tracking (3188)] 0x003e2fdd in BStatable::IsDirectory () from /boot/system/lib/libbe.so (gdb) sc Undefined command: "sc". Try "help". (gdb) bt #0 0x003e2fdd in BStatable::IsDirectory () from /boot/system/lib/libbe.so #1 0x0021b2dd in CustomRefFilter::Filter () #2 0x00583cef in BPrivate::FavoritesMenu::ShouldShowModel () from /boot/system/lib/libtracker.so #3 0x00583169 in BPrivate::FavoritesMenu::AddNextItem () from /boot/system/lib/libtracker.so #4 0x00605c04 in BPrivate::BSlowMenu::AddDynamicItem () from /boot/system/lib/libtracker.so #5 0x00341122 in BMenu::AttachedToWindow () from /boot/system/lib/libbe.so #6 0x003a7f28 in BView::_Attach () from /boot/system/lib/libbe.so #7 0x003a4ab5 in BView::_AddChild () from /boot/system/lib/libbe.so #8 0x003a4951 in BView::AddChild () from /boot/system/lib/libbe.so #9 0x0034f0b3 in BPrivate::BMenuFrame::AttachedToWindow () from /boot/system/lib/libbe.so #10 0x003a7f28 in BView::_Attach () from /boot/system/lib/libbe.so #11 0x003a4ab5 in BView::_AddChild () from /boot/system/lib/libbe.so #12 0x003a4951 in BView::AddChild () from /boot/system/lib/libbe.so #13 0x003aa5af in BWindow::AddChild () from /boot/system/lib/libbe.so #14 0x0034f6e3 in BPrivate::BMenuWindow::AttachMenu () from /boot/system/lib/libbe.so #15 0x00343b54 in BMenu::_Show () from /boot/system/lib/libbe.so #16 0x003464f0 in BMenu::_SelectItem () from /boot/system/lib/libbe.so #17 0x00348806 in BMenuBar::_Track () from /boot/system/lib/libbe.so #18 0x00348409 in BMenuBar::_TrackTask () from /boot/system/lib/libbe.so #19 0x0070a0b2 in thread_entry () from /boot/system/lib/libroot.so #20 0x70102fec in ?? () (gdb)
comment:3 by , 15 years ago
Yes, as I think, problem was in the Tracker, since rev 35047 when ShouldShowModel() was added in tracker/FavoritesMenu.cpp , please someone explain me what that function do, when I removed it, bug was disappeared
by , 15 years ago
Attachment: | TrackerFavor.diff added |
---|
comment:4 by , 15 years ago
Component: | Preferences/Backgrounds → Applications/Tracker |
---|---|
Owner: | changed from | to
comment:5 by , 15 years ago
BeSman, can you please explain what the patch does and why it fixes things? I am lacking the context and have no time to dig into this, thanks!
comment:6 by , 15 years ago
Hi Stippi, that patch simply set fRefFilter to NULL in FavoritesMenu constructor. When I searched where the bug and why Backgrounds crashed, I saw what was changed in the Tracker since 31109 revision(alpha1) and detected what fFrefFilter in constructor have an undefined status, when I set it to NULL, Backgrounds and possible other apps no more crash. Tested on 36601 in Vmware
comment:7 by , 15 years ago
I can see what the patch does (settings fRefFilter to NULL), but this is still no explanation why it fixes anything. The BRefFilter argument already has a default value of NULL. Either an application is supplying a BRefFilter to the constructor, in which case fRefFilter is assigned to it, or it doesn't, in which case it will be NULL. So how come fRefFilter has an "undefined" status in some cases? Is someone passing a stack allocated one? The SetRefFilter() shows that ownership is not assumed (otherwise the method would leak the previous instance, and the destructor also does not free it). Your patch cannot be the correct solution, but it may point at the real problem. So if you can explain *why* you think this is correct, please do so. hrev31109 is a completely unrelated changeset, please point at the changeset that makes you think it broke stuff. Please prepend the changeset number with an "r", so it is linked in Trac. Thanks!
comment:8 by , 15 years ago
Backgrounds allocating BRefFilter in ImageFilePanel(), when we click "Favorites" menu, it call FavoritesMenu() function from the tracker, but BRefFilter is still allocated by Backgrounds app, and this is WHY that not NULL...
comment:9 by , 15 years ago
Ok, but this just confirms my assertion that your patch is wrong. ImageFilePanel tries to pass a CustomRefFilter instance to the base class, and your patch would just ignore it, because it does not assign the variable of the base class which would store this object, but just assigns NULL instead. Obviously it's not the solution.
comment:10 by , 15 years ago
You`re right my patch is wrong but seems I detected where the bug, when ImageFilePanel pass a CustomRefFilter to FavoritesMenu() and when FavoritesMenu() calls ShouldShowModel() func, which return fRefFilter->Filter(...), on this step app is crash...
comment:11 by , 15 years ago
The next logical step would be to add printfs in the CustomRefFilter::Filter() function to track down where exactly it crashes. One possible source of the crash is the "beos_stat" structure which is passed to the method. This is a compatibility stucture that is supposed to have the same size and fields as the old BeOS R5 "stat" structure. It's possible that the binary compatibility mechanism that has been implemented somehow got broken in the meantime, or never worked quite right in the first place, I don't know. One could print the object's size and track whether methods, that are passed this structure are indeed the intended versions, and not the new ones that expect a regular "stat" structure (which is bigger). But other sources for a crash are possible.
comment:12 by , 15 years ago
Milestone: | R1/alpha2 → R1/alpha3 |
---|
It seems ShouldShowModel can be called with a model whose node is null. We check this case in hrev36772.
comment:13 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Open favorites