Opened 2 years ago

Closed 2 years ago

#17689 closed bug (fixed)

HaikuDepot crashes on quit

Reported by: vidrep Owned by: apl-haiku
Priority: normal Milestone: Unscheduled
Component: Applications/HaikuDepot Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev55994 x86_64

HaikuDepot crashes on quit

Debug report attached

Attachments (4)

HaikuDepot-3523-debug-04-04-2022-22-51-23.report (16.0 KB ) - added by vidrep 2 years ago.
HaikuDepot-341-debug-13-04-2022-17-34-11.report (12.2 KB ) - added by tojoko 2 years ago.
hope that helps
HaikuDepot-374-debug-14-04-2022-10-47-08.report (12.2 KB ) - added by tojoko 2 years ago.
... one more time.
HaikuDepot-1102-debug-26-04-2022-16-02-28.report (29.1 KB ) - added by bipolar 2 years ago.
crash on exit, hrev56078

Download all attachments as: .zip

Change History (16)

comment:1 by waddlesplash, 2 years ago

Is this reproducible? Can you show the steps necessary?

comment:2 by tobik, 2 years ago

This also happens on hrev56004 x86_gcc2.

How to reproduce:

  1. Start HaikuDepot
  2. Select a package to view its information
  3. Close the window/Quit HaikuDepot

If I skip step 2 and just quit HaikuDepot immediately it doesn't crash.

comment:3 by bipolar, 2 years ago

Just in case:

I reopened #17579, providing a debug report, seems to be triggered in the same way tobik mentions.

My crash was more in line with the reported crashes on #17579 tough (deleting objects with reference count != 0).

Edit: Ah! I've missed the "state: Call (deleting referenceable object 0x10efb060bbd0 with reference count (2))" on the original report on this ticket.

Last edited 2 years ago by bipolar (previous) (diff)

by tojoko, 2 years ago

hope that helps

by tojoko, 2 years ago

... one more time.

comment:4 by waddlesplash, 2 years ago

I could only trigger this once after many repeated attempts on both x86_gcc2 and x86_64, and I fixed the cause of that in hrev56071; please retest after that.

For me, following the steps listed in comment:2 did not reliably trigger it at all. If after re-testing with the above-noted hrev, crashes are still reliably encountered, then I may have to set up some other kind of testing regiment to try and catch them.

comment:5 by bipolar, 2 years ago

Still getting that crash with "Call (deleting referenceable object..." on hrev56078, x86-64 (will attach .report).

I opened HaikuDepot, showing only Installed Packages (set that on a previous boot, and while on hrev56059). Just scrolled about some packages via mouse, changed sorting, clicked on a couple of packages to see their info. Nothing fancy. I didn't even used the search, nor opened screenshots, nor installed new packages.

I DID tried to login unsuccessfully (3 times, I guess I forgot my password for my HaikuDepot's account). At exit... it crashed.

Last edited 2 years ago by bipolar (previous) (diff)

by bipolar, 2 years ago

crash on exit, hrev56078

comment:6 by bipolar, 2 years ago

For the record... I can pretty much reproduce the crash everytime I do the following:

  • Open HaikuDepot.
  • Wait for the "syncronizing" stuff to finish (progress bar gets grayed out).
  • Drag the scrollbar to the end on the "All packages" tab.
  • Select the ZXTune package. Wait for the Screenshot to appear (progress bar gets grayed out again).
  • Close HaikuDepot.

That ends in a crash everytime on my PC.

Last edited 2 years ago by bipolar (previous) (diff)

comment:7 by waddlesplash, 2 years ago

I just did exactly that and got no crash. I also deleted my HaikuDepot cache and got no crash.

Then I deleted my HaikuDepot settings and enabled anonymous usage statistics. Crash! Guess that answers the question.

comment:8 by waddlesplash, 2 years ago

So, if one adds a return; at the top of MainWindow::_IncrementViewCounter, the crashes go away. However, I have been totally unable to determine what in that function or caused by that function acquires a reference to MainWindow. I even tried resetting the reference count to 0 and watching FirstReferenceAcquired(), but that was fruitless.

apl: Do you have any idea what might be going wrong here?

comment:9 by waddlesplash, 2 years ago

I disabled statistics collection in hrev56080 due to this and also #16879. It can be reenabled when it is fixed.

comment:10 by bipolar, 2 years ago

Just to add a comment. While still on hrev56078, I've disabled the sharing of usage data. Subsecuent openings of HaikuDepot exited cleanly. I've even managed to install a package and exit without a crash. "Success!" I thought.

An hour later, I've open HaikuDepot, install 3 small packages. Same crash at exit ("deleting referenceable object ..."). The report file is basically a carbon copy of the last one I've attached.

In any case, I'll report back in the future. These Heisenbugs sure are annoying to debug! Thanks a lot for your efforts!

comment:11 by apl-haiku, 2 years ago

@waddlesplash; thanks for the pointer above and to everybody providing good diagostics. Looking at the evidence, it is probably something I have introduced. I am pretty busy at the moment, but will try to look into it at the coming weekend.

comment:12 by apl-haiku, 2 years ago

Resolution: fixed
Status: newclosed

This should have been resolved in 409af934620d21aef31a4e00e19604e1dfb880d7 although some follow-on work may be able to proceed with integrating Job and JobQueue later.

Note: See TracTickets for help on using tickets.