[haiku-bugs] [Haiku] #14405: BNotification and NotificationServer crash with OnClickRefs

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 26 Aug 2018 10:46:49 -0000

#14405: BNotification and NotificationServer crash with OnClickRefs
----------------------------------+------------------------------
 Reporter:  ahwayakchih           |        Owner:  nobody
     Type:  bug                   |       Status:  new
 Priority:  normal                |    Milestone:
Component:  Kits/Application Kit  |      Version:  R1/Development
 Keywords:  Notification          |   Blocked By:
 Blocking:                        |  Has a Patch:  0
 Platform:  All                   |
----------------------------------+------------------------------
 {{{BNotification}}} crashes after calling {{{Send}}} with ''OnClickRefs''
 added.

 If application works that around by sending message with refs directly to
 the notification server, server will crash after user clicks on the
 {{{NotificationView}}} - AFAIK because it uses the same
 {{{BNotification}}} class internally.

 Bug is located in the {{{BNotification::OnClickRefAt}}} method
 
(https://github.com/haiku/haiku/blob/21909dacd2349326e653981e5d7e78878ab49286/src/kits/app/Notification.cpp#L469).
 The code there looks like this:
 {{{
         return (entry_ref*)fArgv.ItemAt(index);
 }}}

 It should look like this instead:
 {{{
         return (entry_ref*)fRefs.ItemAt(index);
 }}}

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14405>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: