Details
Description
When using the new Qt WebEngine, code that attempts to allocate more memory then what it is available through calloc will cause the application to crash especially when the calloc allocations are done within a loop.
Attached is a simple gui project using QWebEngineView and a method that attempts to allocate several large chunks of memory with calloc. When running the application, pressing the "Memory" button will run calloc and successfully report debug information on its allocation attempt. But after pressing the "Web" button, the "Memory" action will then crash (on my system the first calloc allocation was successful but all subsequent allocations would fail due to the amount being allocated).
In debug, at the time of crash, the following is what is on the stack:
0 IsSandboxedProcess Qt5WebEngineCored 0x11f35034
1 std::_New_handler_interface stdhndlr.cpp 13 0x5e83ce09
2 _callnewh handler.cpp 135 0x53aabfc0
3 _nh_malloc_dbg_impl dbgheap.c 255 0x53b8dc01
4 _calloc_dbg_impl dbgheap.c 601 0x53b8ce22
5 _calloc_dbg dbgheap.c 652 0x53b8cd9a
6 calloc dbgcalloc.c 56 0x53b9e957
7 MainWindow::callocTest mainwindow.cpp 55 0xb54483
8 MainWindow::on_pushButton_2_clicked mainwindow.cpp 46 0xb54418
... <More>
This application is a 32-bit app (MSVC2013 32bit) and I am not sure if a 64-bit version manifests the issue. If the memory requests were reduced significantly so that all requests would allocate, then no crash was seen.
Attachments
Issue Links
- relates to
-
QTBUG-47129 32 bit Webengine crash with High Resolution image
-
- Closed
-
For Gerrit Dashboard: QTBUG-45459 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
115435,3 | <chromium> Disable termination on out of memory. | 40.0.2214-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
120900,2 | <chromium> Disable termination on out of memory. | 44-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
127662,2 | <chromium> Disable termination on out of memory. | 47-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
147327,2 | <chromium> Disable termination on out of memory. | 49-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
181528,1 | <chromium> Disable termination on out of memory. | 55-based | qt/qtwebengine-chromium | Status: ABANDONED | +2 | 0 |
202206,2 | Disable termination on out of memory. | 60-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |