apimall / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Crash in UserPrefs::Get when spell checking a browser with custom CefRequestContext #1497

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Windows 8.1 64-bit
CEF 3.2171.1973

What steps will reproduce the problem?
1. Create a browser with a custom CefRequestContext.
2. Load a page that includes a text field.
3. Type a word into the text field followed by a space, dot, etc (to trigger 
spell checking).

What is the expected output? What do you see instead?
The application should not crash. Instead, it crashes with the below backtrace.

Please use labels and text to provide additional information.
The |context| passed to UserPrefs::Get in this case is an instance of 
CefBrowserContextProxy.

[0120/155809:FATAL:user_prefs.cc(28)] Check failed: 
context->GetUserData(UserDataKey()). 
Backtrace:
    libcef.dll!base::debug::BreakDebugger() Line 20 C++
    libcef.dll!logging::LogMessage::~LogMessage() Line 647  C++
>   libcef.dll!user_prefs::UserPrefs::Get(content::BrowserContext * context) Line 
30  C++
    libcef.dll!SpellingServiceClient::IsAvailable(content::BrowserContext * context, SpellingServiceClient::ServiceType type) Line 106  C++
    libcef.dll!SpellingServiceClient::RequestTextCheck(content::BrowserContext * context, SpellingServiceClient::ServiceType type, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & text, const base::Callback<void __cdecl(bool,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > const &,std::vector<SpellCheckResult,std::allocator<SpellCheckResult> > const &)> & callback) Line 54   C++
    libcef.dll!SpellCheckMessageFilter::CallSpellingService(const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & text, int route_id, int identifier, const std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> > & markers) Line 184 C++
    libcef.dll!SpellCheckMessageFilter::OnCallSpellingService(int route_id, int identifier, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & text, std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> > markers) Line 125   C++
    libcef.dll!DispatchToMethod<SpellCheckMessageFilter,void (__thiscall SpellCheckMessageFilter::*)(int,int,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > const &,std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> >),int,int,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> > >(SpellCheckMessageFilter * obj, void (int, int, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > &, std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> >) * method, const Tuple4<int,int,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> > > & arg) Line 574   C++
    libcef.dll!SpellCheckHostMsg_CallSpellingService::Dispatch<SpellCheckMessageFilter,SpellCheckMessageFilter,void,void (__thiscall SpellCheckMessageFilter::*)(int,int,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > const &,std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> >)>(const IPC::Message * msg, SpellCheckMessageFilter * obj, SpellCheckMessageFilter * sender, void * parameter, void (int, int, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > &, std::vector<SpellCheckMarker,std::allocator<SpellCheckMarker> >) * func) Line 114  C++
    libcef.dll!SpellCheckMessageFilter::OnMessageReceived(const IPC::Message & message) Line 57 C++
    libcef.dll!content::BrowserMessageFilter::Internal::DispatchMessageW(const IPC::Message & message) Line 91  C++
    libcef.dll!base::internal::RunnableAdapter<bool (__thiscall content::BrowserMessageFilter::Internal::*)(IPC::Message const &)>::Run(content::BrowserMessageFilter::Internal * object, const IPC::Message & a1) Line 190 C++
    libcef.dll!base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<bool (__thiscall content::BrowserMessageFilter::Internal::*)(IPC::Message const &)>,void __cdecl(content::BrowserMessageFilter::Internal * const &,IPC::Message const &)>::MakeItSo(base::internal::RunnableAdapter<bool (__thiscall content::BrowserMessageFilter::Internal::*)(IPC::Message const &)> runnable, content::BrowserMessageFilter::Internal * const & a1, const IPC::Message & a2) Line 899    C++
    libcef.dll!base::internal::Invoker<2,base::internal::BindState<base::internal::RunnableAdapter<bool (__thiscall content::BrowserMessageFilter::Internal::*)(IPC::Message const &)>,void __cdecl(content::BrowserMessageFilter::Internal *,IPC::Message const &),void __cdecl(content::BrowserMessageFilter::Internal *,IPC::Message)>,void __cdecl(content::BrowserMessageFilter::Internal *,IPC::Message const &)>::Run(base::internal::BindStateBase * base) Line 1253    C++
    libcef.dll!base::Callback<void __cdecl(void)>::Run() Line 401   C++
    libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, const char * run_function, const base::PendingTask & pending_task) Line 64  C++
    libcef.dll!base::MessageLoop::RunTask(const base::PendingTask & pending_task) Line 448  C++
    libcef.dll!base::MessageLoop::DeferOrRunPendingTask(const base::PendingTask & pending_task) Line 458    C++
    libcef.dll!base::MessageLoop::DoWork() Line 564 C++
    libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 202 C++
    libcef.dll!base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate * delegate, base::MessagePumpDispatcher * dispatcher) Line 49    C++
    libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 34    C++
    libcef.dll!base::MessageLoop::RunHandler() Line 414 C++
    libcef.dll!base::RunLoop::Run() Line 55 C++
    libcef.dll!base::MessageLoop::Run() Line 308    C++
    libcef.dll!CefBrowserMessageLoop::RunMessageLoop() Line 28  C++
    libcef.dll!CefRunMessageLoop() Line 178 C++

Original issue reported on code.google.com by magreenb...@gmail.com on 20 Jan 2015 at 9:09

GoogleCodeExporter commented 9 years ago
To reproduce with a trunk build of cefclient on Windows:

1. Apply the attached patch.
2. Load http://www.w3schools.com/htmL/html_forms.asp.
3. Enter text in the "First name:" text field followed by a space, period, etc.

Original comment by magreenb...@gmail.com on 20 Jan 2015 at 9:20

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in trunk revision 1974 and 2171 branch revision 1975.

Original comment by magreenb...@gmail.com on 20 Jan 2015 at 10:00

GoogleCodeExporter commented 9 years ago
Issue 1463 has been merged into this issue.

Original comment by magreenb...@gmail.com on 26 Jan 2015 at 12:48

GoogleCodeExporter commented 9 years ago
This bug-fix works with my program.
Thanks!

Original comment by pw178...@gmail.com on 27 Jan 2015 at 7:18