[Interest] qt and Windows tolerance heap
maitai
maitai at virtual-winds.org
Wed Sep 8 09:43:20 CEST 2021
To close the subject:
To force your application to be moved to FTH shim, just create 3 times a
crash within an hour with
QString *heap = new QString();
delete heap;
delete heap;
then to detect your app has been moved to FTH do
QSettings winsettings(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\FTH\\State",
QSettings::NativeFormat);
QStringList fths = winsettings.childKeys();
foreach(const QString &fth, fths) {
if(fth == qApp->applicationFilePath()) {
/* do something*/
break;
}
}
Thanks again for your replies and help
-- Philippe
Le 07-09-2021 20:05, maitai a écrit :
> OK, thanks. I will not attempt to modify the registry. I just want to
> know if that is the case and eventually display a warning.
>
> The key for that is
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH\State
>
> Now I want to test my changes, I have already forced more than 100
> crashes in the hope Windows will move me to FTH, no luck :)
>
> --Philippe
>
> Le 07-09-2021 17:17, Scott Bloom a écrit :
>
> You shouldn't need it for a read of the registry, however it is
> possible that the IT dept of the user, or the user themselves has
> escalated the default privileges required to read from HKLM
>
> You might want to code your check to allow for a security violation, so
> the is it enabled would be yes, no, or "I cant tell" response.
>
> Scott
>
> From: Interest <interest-bounces at qt-project.org> On Behalf Of maitai
> Sent: Tuesday, September 7, 2021 7:36 AM
> To: Interest at qt-project.org
> Subject: Re: [Interest] qt and Windows tolerance heap
>
> Thank you very much that is the way. Do you know if elevated privileges
> are needed to do that?
>
> --Philippe
>
> Le 07-09-2021 15:22, Jérôme Godbout a écrit :
>
> You can put your aplicaiton into the exclude list, sorry though it was
> mentionned into the microowft page, but here is the registry key:
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH\ExclusionList\myapp.exe
>
> Change myapp.exe for your actual application.
>
> From: Jérôme Godbout <jgodbout at dimonoff.com>
> Date: Tuesday, September 7, 2021 at 9:07 AM
> To: maitai <maitai at virtual-winds.org>, Interest at qt-project.org
> <Interest at qt-project.org>
> Subject: Re: [Interest] qt and Windows tolerance heap
>
> The tolerant heap only make workaround for actual bug. Disable the
> tolerant heap for your developers (this should be a system options when
> developer mode is enabled directly into Windows but sadly you have to
> do it manually). This will show where your bug is and will appear on
> dev workstation before they appear on the clients.
>
> The "myth" of try to launch it again on windows is not really a myth,
> it come from this feature, the OS try to fix the heap allocation, but
> the application is still broken. You can also disable your application
> from using it during the installer.
>
> To disable:
>
> https://docs.microsoft.com/en-us/windows/win32/win7appqual/fault-tolerant-heap?redirectedfrom=MSDN
>
> From: Interest <interest-bounces at qt-project.org> on behalf of maitai
> <maitai at virtual-winds.org>
> Date: Tuesday, September 7, 2021 at 5:32 AM
> To: Interest at qt-project.org <Interest at qt-project.org>
> Subject: [Interest] qt and Windows tolerance heap
>
> Hi,
>
> I have some users (mainly beta testers) that are suffering from
> "Windows Tolerant Heap"
> (https://docs.microsoft.com/en-us/windows/win32/win7appqual/fault-tolerant-heap).
> The consequence of this being activated after some crashes is that the
> application becomes very slow, plus some mysterious crashes occur
> randomly deep inside qt event queue manager.
>
> I know how to remove the app from Tolerant Heap with an elevated
> command prompt.
>
> My question is: is there a way from inside the application to detect
> the app is running in this mode, so I can prompt the user to contact us
> for instance?
>
> Thanks for any insight
>
> Philippe Lelong
_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210908/f122fb09/attachment-0001.html>
More information about the Interest
mailing list