Opened 5 years ago
Last modified 3 years ago
#15207 new defect
Crash after repeatedly calling wxWebViewIE::Find()
Reported by: | bitset | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | wxMSW | Version: | |
Keywords: | Cc: | fred.wang@… | |
Blocked By: | Blocking: | ||
Patch: | no |
Description
Bug in src/msw/webview_ie.cpp (wxWebViewIE class). if you call the function "wxWebViewIE::Find(const wxString& text, int flags)" 8-10 times (search text must be on a page) - program received signal SIGSEGV, Segmentation fault. In RunHTMLApplication () (mshtml.dll).
Example code: ipcBrowser->Find(s, wxWEBVIEW_FIND_HIGHLIGHT_RESULT + wxWEBVIEW_FIND_WRAP);
Attachments (1)
Change History (13)
comment:1 Changed 5 years ago by vadz
- Milestone 2.9.5 deleted
- Status changed from new to infoneeded_new
- Summary changed from Bug in src/msw/webview_ie.cpp to Crash after repeatedly calling wxWebViewIE::Find()
comment:2 Changed 5 years ago by bitset
- Status changed from infoneeded_new to new
Yes. One call into example code, but you just call Find more than 10 times and use the flags wxWEBVIEW_FIND_HIGHLIGHT_RESULT + wxWEBVIEW_FIND_WRAP.
comment:3 Changed 5 years ago by steve_lamerton
- Status changed from new to confirmed
I can reproduce this when selecting Wrap and Highlight from the options menu of the Find toolbar in the sample. Will try and take a look into it in the next few days.
comment:4 Changed 5 years ago by SJL
comment:5 Changed 5 years ago by steve_lamerton
- Status changed from confirmed to infoneeded_new
Could you test this again after the changes of r74020? They seem to fix the issue for me.
comment:6 Changed 5 years ago by bitset
- Status changed from infoneeded_new to new
I will test tomorrow and let you know the result.
comment:7 Changed 5 years ago by bitset
wxWebViewIE::Find() still call segmentation fault.
comment:8 Changed 5 years ago by steve_lamerton
- Status changed from new to infoneeded_new
Could you upload a stack trace? Unfortunately I cannot reproduce this any more after those changes.
comment:9 Changed 5 years ago by bitset
- Status changed from infoneeded_new to new
If search string contains only 1 symbol (and page text contains this symbol):
Stack trace:
#0 7020301C wxWebViewIE::IsElementVisible(wxCOMPtr<IHTMLElement>) () (F:\bitset\mskp\src\bin\Debug\wxmsw295u_webview_gcc_custom.dll:??)
#1 7022B25A wxWebView::IsContextMenuEnabled() (F:\bitset\mskp\src\bin\Debug\wxmsw295u_webview_gcc_custom.dll:??)
#2 FEEEFEEE ?? () (??:??)
comment:10 Changed 5 years ago by steve_lamerton
- Status changed from new to infoneeded_new
I am afraid that I still cannot reproduce this, is there a specific page I can test to see this? Also what compiler are you using?
comment:11 Changed 3 years ago by frederic_wang
- Cc fred.wang@… added
comment:12 Changed 3 years ago by frederic_wang
- Status changed from infoneeded_new to new
I attached a minimal testcase from which I can reproduce the crash (just execute the "Find" command from the menu). The crash does not happen with a different url (e.g. the wikipedia home page) or if we move the "Find" call into the MyFrame creation.
I'm using MSYS2/MINGW64 (http://sourceforge.net/projects/msys2/) on Windows 7 with the stable wxWidgets (3.0.2). I'm not able to produce a debug build from the source code (because of https://forums.wxwidgets.org/viewtopic.php?f=19&t=39234), so unfortunately I don't have a better stack trace...
0 0x000000006db03253 in ?? ()
from /mingw64/bin/wxmsw30u_webview_gcc_custom.dll
0x000000006db036ba in ?? ()
from /mingw64/bin/wxmsw30u_webview_gcc_custom.dll
0x000000006db04024 in ?? ()
from /mingw64/bin/wxmsw30u_webview_gcc_custom.dll
0x0000000000401b4c in MyFrame::OnFind (this=0x1d29830)
at C:/msys64/home/braillenet/wxwidgets/test/src/webview.cpp:48
Is this reproducible in the sample?