Last Comment Bug 857334 - crash in mozilla::a11y::XULTextFieldAccessible::FrameSelection
: crash in mozilla::a11y::XULTextFieldAccessible::FrameSelection
Status: RESOLVED FIXED
[good first bug][mentor=trev.saunders...
: crash
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: x86 Windows 7
: -- critical (vote)
: mozilla25
Assigned To: Birunthan Mohanathas [:poiru]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-02 15:35 PDT by Wayne Mery (:wsmwk, NI for questions)
Modified: 2015-03-11 06:47 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
First patch (1.10 KB, patch)
2013-06-22 00:29 PDT, Birunthan Mohanathas [:poiru]
tbsaunde+mozbugs: review+
Details | Diff | Splinter Review

Description Wayne Mery (:wsmwk, NI for questions) 2013-04-02 15:35:34 PDT
This bug was filed from the Socorro interface and is 
report bp-ed693f70-c819-46a2-a97a-d64872130328 .
============================================================= 
0 	xul.dll 	mozilla::a11y::XULTextFieldAccessible::FrameSelection 	accessible/src/xul/XULFormControlAccessible.cpp:847
1 	xul.dll 	HyperTextAccessible::GetCaretOffset 	accessible/src/generic/HyperTextAccessible.cpp:1587
2 	xul.dll 	nsCaretAccessible::NormalSelectionChanged 	accessible/src/base/nsCaretAccessible.cpp:235
3 	xul.dll 	nsCaretAccessible::ProcessSelectionChanged 	accessible/src/base/nsCaretAccessible.cpp:211
4 	xul.dll 	NotificationController::HandleNotification<nsCaretAccessible,nsISelection> 	accessible/src/base/NotificationController.h:143
5 	xul.dll 	nsCaretAccessible::NotifySelectionChanged 	accessible/src/base/nsCaretAccessible.cpp:196
6 	xul.dll 	mozilla::Selection::NotifySelectionListeners 	layout/generic/nsSelection.cpp:5413
7 	xul.dll 	nsFrameSelection::NotifySelectionListeners 	layout/generic/nsSelection.cpp:2037
8 	xul.dll 	nsFrameSelection::SetMouseDownState 	layout/generic/nsSelection.cpp:1697
9 	xul.dll 	nsFrame::HandleRelease 	layout/generic/nsFrame.cpp:3146
10 	xul.dll 	nsFrame::HandleEvent 	layout/generic/nsFrame.cpp:2378
11 	xul.dll 	nsPresShellEventCB::HandleEvent 	layout/base/nsPresShell.cpp:505
12 	xul.dll 	nsEventTargetChainItem::HandleEventTargetChain 	content/events/src/nsEventDispatcher.cpp:363
Comment 1 Trevor Saunders (:tbsaunde) 2013-04-03 14:28:53 PDT
My guess is that GetInput() is returning null for some reason but I have no idea why
Comment 2 alexander :surkov 2013-04-04 22:03:37 PDT
(In reply to Trevor Saunders (:tbsaunde) from comment #1)
> My guess is that GetInput() is returning null for some reason but I have no
> idea why

same, null check + assertion = hoping we will catch it one day
Comment 3 MikeLing 2013-06-02 16:17:29 PDT
Hi I am interested in working on this bug,but it's my first time to work on with debug,can anybody guide me on how to get started with it?Thanks a lot.
Comment 4 Wayne Mery (:wsmwk, NI for questions) 2013-06-03 14:57:24 PDT
(In reply to MikeLing from comment #3)
> Hi I am interested in working on this bug,but it's my first time to work on
> with debug,can anybody guide me on how to get started with it?Thanks a lot.
Comment 5 Anand Soni 2013-06-07 10:20:52 PDT
Hi tbsaunde,

I would like to know more about this bug and how can I go about fixing it. Can you get me started here?
Comment 6 Trevor Saunders (:tbsaunde) 2013-06-07 11:20:20 PDT
(In reply to Anand Soni from comment #5)
> Hi tbsaunde,
> 
> I would like to know more about this bug and how can I go about fixing it.
> Can you get me started here?

In XULTextFieldAccessible::FrameSelection() you need to check if GetInput() returned null and return null before getting the frame if it did.
Comment 7 Birunthan Mohanathas [:poiru] 2013-06-22 00:29:11 PDT
Created attachment 766247 [details] [diff] [review]
First patch
Comment 8 Birunthan Mohanathas [:poiru] 2013-06-22 00:31:32 PDT
(In reply to Trevor Saunders (:tbsaunde) from comment #6)
> In XULTextFieldAccessible::FrameSelection() you need to check if GetInput()
> returned null and return null before getting the frame if it did.

Hi. I attached a patch to do exactly this. I also added an assertion as per comment #2.
Comment 9 Marco Zehe (:MarcoZ) on PTO until August 15 2013-06-25 02:40:32 PDT
Pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/df3ad1eb9ebb

Thanks for the patch!
Comment 10 Ryan VanderMeulen [:RyanVM] 2013-06-25 14:12:59 PDT
https://hg.mozilla.org/mozilla-central/rev/df3ad1eb9ebb

Note You need to log in before you can comment on or make changes to this bug.