Opened 7 years ago

Closed 6 years ago

#14214 closed bug (fixed)

[HaikuDepot] crashes in BTwoDimensionalLayout::SetInsets

Reported by: diver Owned by: apl-haiku
Priority: normal Milestone: R1/beta1
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #14238
Platform: All

Description

hrev52023 x86_64.

HaikuDepot crashes when selecting specific packages like BeVexed or Calligra.

I suspect it could be a regression from hrev51996.

Attachments (1)

HaikuDepot-2220-debug-18-06-2018-09-55-54.report (30.3 KB ) - added by diver 7 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 by waddlesplash, 7 years ago

Crash report?

comment:2 by diver, 6 years ago

Blocking: 14238 added

comment:3 by apl-haiku, 6 years ago

I do not see this problem on hrev52080 on x86_gcc2. I open HaikuDepot and choose either the "BeVexed" or "Calligra" packages and they can be viewed without issue. Are there any specific steps to reproduce the problem? The debug dump looks like you may be trying to create a package rating; is that correct?

comment:4 by diver, 6 years ago

hrev52084 x86_64 HD still crashes on select in Show only featured mode. I'm not trying to create a package rating, I simply select a package.

comment:5 by diver, 6 years ago

Milestone: UnscheduledR1/beta1

Crashing HaikuDepot isn't a great way to impress someone trying beta1. This should be fixed (or hrev51996 reverted) to not make bad impression of the OS.

comment:6 by apl-haiku, 6 years ago

I can reproduce the problem locally and can avoid the problem by removing the insets, but want to understand the underlying cause. I am going to try to look into solving it soon. I understand it's a large issue.

comment:7 by waddlesplash, 6 years ago

apl, from the debug report it looks like the object being called with SetInsets is NULL. I note that in the function in question, End() is called on the LayoutBuilder before SetInsets, and so if this is the last item on the LayoutBuilder stack (which it looks to be from reading the code) then of course any calls after the End will try to use NULL. Maybe that's the issue?

comment:8 by apl-haiku, 6 years ago

waddlesplash; I have also observed this same thing and come to the same conclusion, but (from a brief look) the code was functionally like that before and was not causing this problem. Furthermore, there are other cases where SetInsets is invoked after End()...

  • ClockView.cpp:70
  • PageSetupWindow.cpp:234
  • NetworkTimeView.cpp:531

I don't know what that is supposed to actually 'mean', but it seems unlikely the same problem would exist in all of these cases.

comment:9 by waddlesplash, 6 years ago

If there was a previous call to Add(), then that would "push" a new item on the BLayoutBuilder's "stack," which calling End() "pops". I didn't look at those cases yet, but it's possible they are doing this, and so following End() there is still something in the layout builder.

At any rate, it's our convention to do SetInsets as the first thing, not the last, and if that was adhered to then there should be fewer problems across the board.

If you're busy / short on time, I can take over this ticket in the interests of beta1. :)

comment:10 by apl-haiku, 6 years ago

Hi waddlesplash; I definitely can't do any hobby-computing until mid/late week so yes, if you have the time now, please do feel free to take this ticket. I'll be interested to see the result.

comment:11 by waddlesplash, 6 years ago

Interestingly, this seems to only happen on x86_64. Weird.

comment:12 by waddlesplash, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev52108.

Note: See TracTickets for help on using tickets.