Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2969 closed bug (fixed)

PackageInstaller crash with personalStudio

Reported by: miqlas Owned by: sil2100
Priority: normal Milestone: R1
Component: Applications/PackageInstaller Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

I tested personalStudio that i downloaded from BeShare (personalStudio_1.5_en_tri.pkg) on Haiku R28283. It installed correctly but ont the end of the install process the PackageInstaller give an error massage: "The application PackageInstaller encountered an error..."

I get this in the debugger:

(gdb) bt #0 0xffff0104 in ?? () #1 0x006ac4b6 in debugger () from /boot/beos/system/lib/libroot.so #2 0x006b56d9 in assert_fail () from /boot/beos/system/lib/libroot.so #3 0x006bdc4e in BPrivate::hoardHeap::freeBlock ()

from /boot/beos/system/lib/libroot.so

#4 0x006becfa in BPrivate::processHeap::free ()

from /boot/beos/system/lib/libroot.so

#5 0x006c0431 in free () from /boot/beos/system/lib/libroot.so #6 0x006aa5b0 in builtin_delete () from /boot/beos/system/lib/libroot.so #7 0x002177fb in PkgDirectory::~PkgDirectory () #8 0x0021758b in pkg_profile::~pkg_profile () #9 0x00211a74 in PackageInfo::~PackageInfo () #10 0x0020e28b in PackageView::~PackageView () #11 0x0020dd2a in PackageWindow::~PackageWindow () #12 0x002d6fa6 in BLooper::Quit () from /boot/beos/system/lib/libbe.so #13 0x0038101e in BWindow::Quit () from /boot/beos/system/lib/libbe.so #14 0x0020dd7a in PackageWindow::Quit () #15 0x0020e8ef in PackageView::MessageReceived () #16 0x002d6b3f in BLooper::DispatchMessage ()

from /boot/beos/system/lib/libbe.so

#17 0x003838b1 in BWindow::DispatchMessage ()

from /boot/beos/system/lib/libbe.so

#18 0x003870a8 in BWindow::task_looper () from /boot/beos/system/lib/libbe.so #19 0x002d809b in BLooper::_task0_ () from /boot/beos/system/lib/libbe.so ---Type <return> to continue, or q <return> to quit--- #20 0x006b08fc in thread_entry () from /boot/beos/system/lib/libroot.so #21 0x78102fec in ?? ()

Attachments (1)

2969-fix.diff (1.2 KB ) - added by sil2100 16 years ago.
Corrected svn diff of the patch

Download all attachments as: .zip

Change History (9)

comment:1 by miqlas, 16 years ago

The debugger says:

(gdb) bt
#0  0xffff0104 in ?? ()
#1  0x006ac4b6 in debugger () from /boot/beos/system/lib/libroot.so
#2  0x006b56d9 in __assert_fail () from /boot/beos/system/lib/libroot.so
#3  0x006bdc4e in BPrivate::hoardHeap::freeBlock ()
   from /boot/beos/system/lib/libroot.so
#4  0x006becfa in BPrivate::processHeap::free ()
   from /boot/beos/system/lib/libroot.so
#5  0x006c0431 in free () from /boot/beos/system/lib/libroot.so
#6  0x006aa5b0 in __builtin_delete () from /boot/beos/system/lib/libroot.so
#7  0x002177fb in PkgDirectory::~PkgDirectory ()
#8  0x0021758b in pkg_profile::~pkg_profile ()
#9  0x00211a74 in PackageInfo::~PackageInfo ()
#10 0x0020e28b in PackageView::~PackageView ()
#11 0x0020dd2a in PackageWindow::~PackageWindow ()
#12 0x002d6fa6 in BLooper::Quit () from /boot/beos/system/lib/libbe.so
#13 0x0038101e in BWindow::Quit () from /boot/beos/system/lib/libbe.so
#14 0x0020dd7a in PackageWindow::Quit ()
#15 0x0020e8ef in PackageView::MessageReceived ()
#16 0x002d6b3f in BLooper::DispatchMessage ()
   from /boot/beos/system/lib/libbe.so
#17 0x003838b1 in BWindow::DispatchMessage ()
   from /boot/beos/system/lib/libbe.so
#18 0x003870a8 in BWindow::task_looper () from /boot/beos/system/lib/libbe.so
#19 0x002d809b in BLooper::_task0_ () from /boot/beos/system/lib/libbe.so
---Type <return> to continue, or q <return> to quit---
#20 0x006b08fc in thread_entry () from /boot/beos/system/lib/libroot.so
#21 0x78102fec in ?? ()

comment:2 by sil2100, 16 years ago

It seems that after the installation is finished and all created pkg_profiles are freed, one profile has an invalid PkgDirectory pointer in its list of files. It looks like a double free, or maybe some kind of a invalid file addition to the list prior to freeing. It would probably help if I could see the actual package. Since right now I do not have access to BeShare, I would be grateful if you could upload it somewhere in public.

I will try to take care of this as soon as possible.

comment:3 by sil2100, 16 years ago

Status: newassigned

I finally found some time to look into this problem, and located the bug that was responsible for this behavior. It's a quite serious one even. It seems that I left some 'probably' old code that should be removed in the final version, that - in fact - if more than one profile existed that used the same files to install, tried to free the same memory locations many times.

Attaching patch diff. I would be grateful if someone could commit it. Thanks!

by sil2100, 16 years ago

Attachment: 2969-fix.diff added

Corrected svn diff of the patch

comment:4 by sil2100, 16 years ago

I resubmitted the patch, since I just found that I forgot yet another obvious thing during program design.

comment:5 by anevilyak, 16 years ago

Applied in hrev28829, thanks! Can you give it another try miqlas?

comment:6 by miqlas, 16 years ago

Yes, i will try it after the exams. Thanks for the fix :)

comment:7 by sil2100, 16 years ago

Resolution: fixed
Status: assignedclosed

Did you have time to try it again, miqlas? Since I cannot reproduce the error here, I assume that fixed it - we can reopen the ticket if your tests show otherwise.

comment:8 by miqlas, 16 years ago

sil2100, I tested with the current Haiku version, and it installed without problems. Thanks for the fix :)

Note: See TracTickets for help on using tickets.