Opened 3 years ago

Closed 2 years ago

#17583 closed bug (fixed)

WebPositive (master): crash on quit

Reported by: vidrep Owned by: pulkomandy
Priority: normal Milestone: R1/beta4
Component: Applications/WebPositive Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev55867 x86_64

HaikuWebKit 1.8.4

WebKit 614.1.3

After browsing Amazon.com website, crash on quit

Debugger report attached

Attachments (4)

WebPositive-4668-debug-12-02-2022-00-36-37.report (28.2 KB ) - added by vidrep 3 years ago.
syslog (707 bytes ) - added by vidrep 3 years ago.
WebPositive-1339-debug-16-02-2022-00-14-09.report (33.5 KB ) - added by vidrep 3 years ago.
WebPositive-2486-debug-18-07-2022-18-26-06.report (20.5 KB ) - added by vidrep 2 years ago.

Download all attachments as: .zip

Change History (15)

by vidrep, 3 years ago

Attachment: syslog added

comment:1 by vidrep, 3 years ago

WebPositive crashes when closing on any webpage, not just Amazon.com Debugger log attached for latest crash(s)

comment:2 by korli, 3 years ago

It looks like in the two reports there is a running authentication request, which probably helds a reference on the BUrlContext.

comment:3 by korli, 3 years ago

Version: R1/beta3R1/Development

comment:4 by humdinger, 3 years ago

I see the same thing now on hrev55874, 64bit. It only crashes for me when I do ALT+Q, not when using the window close widget.

comment:5 by vidrep, 2 years ago

The problem is still here with HaikuWebKit 1.8.4 WebKit 614.1.20

There are noticable improvements and bug fixes in this version compared to what is currently shipped with Haiku nightly builds.

Perhaps someone can try to fix this crash before Beta 4, so we can include this improved browser build.

comment:6 by tqh, 2 years ago

To me the reference count crash is either problem freeing BURLRequest in WebPositive or a problem in the class itself. I'd take a look at this: https://github.com/haiku/haiku/blob/c3abd58da6abeea0a0a2aa7d0597793c23b4a71d/src/kits/network/libnetservices/UrlRequest.cpp#L19

comment:7 by tqh, 2 years ago

Not sure but shouldn't URLRequest destructor do more cleanup and delete it's references?

comment:8 by pulkomandy, 2 years ago

It's complicated because of several things:

  • BUrlRequest is tied to a thread, if you delete the object while the thread is running, things will crash
  • Stopping a request is a complicated process and is different for different subclasses (BHttpRequest, BGopherRequest, BFileRequest, etc). In C++, it is not possible to call virtual methods from the upper class destructor (so the destructor for BUrlRequest cannot call the virtual method Stop() and have it properly stop each type of request.

So the lifecycle of requests is quite complicated. I hope that nielx's work on rewriting libnetservices will fix this eventually. Until then we could also use WebKit curl support again instead (I have recently fixed the build for that and checked that it can still load webpages, but I have not done any furhter testing.

@vidrep, the last report you attached is a completely different crash that happens when deleting WebKit font cache, I think it should be reported as a separate ticket to avoid confusion.

comment:9 by tqh, 2 years ago

Took a stab at it: https://review.haiku-os.org/c/haiku/+/5486 Havn't managed to provoke a crash yet.

comment:10 by tqh, 2 years ago

Check if hrev56296 solves this. I havn't managed to reproduce it afterwards.

(Just other things like using all mem in VM or network stalls...)

comment:11 by tqh, 2 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed

Vidrep reported that these crashes are now gone.

Note: See TracTickets for help on using tickets.