It is showing an Error where it does not exist.
It is showing an Error where it does not exist.
I can not simulate this to send you because my project is very big.
The strange thing is that the error only happens with MadExcept
if I disable MadExcept the error does not happen.
if I activate EurekaLog the error does not happen either.
Is this a problem in this version I'm testing from madExcept ?
See this video attached.
where I test with the active madExcept gives the KeyViolation error if I disable the MadExcept error does not happen.
I did not show it on the Video, but EurekaLog does not show any errors.
https://mega.nz/#!02wRFBRA!ftRY9MDvoQWz ... _vFAX4OK1Q
The strange thing is that the error only happens with MadExcept
if I disable MadExcept the error does not happen.
if I activate EurekaLog the error does not happen either.
Is this a problem in this version I'm testing from madExcept ?
See this video attached.
where I test with the active madExcept gives the KeyViolation error if I disable the MadExcept error does not happen.
I did not show it on the Video, but EurekaLog does not show any errors.
https://mega.nz/#!02wRFBRA!ftRY9MDvoQWz ... _vFAX4OK1Q
Re: It is showing an Error where it does not exist.
That's clearly a bug in your program. Enabling madExcept may change timing a bit which can make some bugs visible which weren't visible before.
What you can see is that the crash is not in the main thread, but in a secondary thread ("TThread_SalvaGrid"). The crash occurs because your main thread is already in the process of shutting down the process, which includes destroying/finalizating a lot of things including the memory manager (!). But there's still the "TThread_SalvaGrid" thread running at the same time, while your main thread is destroying stuff behind your secondary thread's back!
Your program should wait for all secondary threads to be completed before shutting down. Or alternatively put the secondary threads to sleep. If any of those threads e.g. try to access the memory manager after your main thread has already finalized the memory manager, there will be a crash.
What you can see is that the crash is not in the main thread, but in a secondary thread ("TThread_SalvaGrid"). The crash occurs because your main thread is already in the process of shutting down the process, which includes destroying/finalizating a lot of things including the memory manager (!). But there's still the "TThread_SalvaGrid" thread running at the same time, while your main thread is destroying stuff behind your secondary thread's back!
Your program should wait for all secondary threads to be completed before shutting down. Or alternatively put the secondary threads to sleep. If any of those threads e.g. try to access the memory manager after your main thread has already finalized the memory manager, there will be a crash.
Re: It is showing an Error where it does not exist.
What I do not understand is because this only occurs with madExcept
If I do not have any error manager anything happens Delphi does not show me any errors.
Delphi shows no errors.
JCLDebug shows no errors.
EurekaLog shows no errors.
Are there any settings in madExcept for not being so intrusive?
If I do not have any error manager anything happens Delphi does not show me any errors.
Delphi shows no errors.
JCLDebug shows no errors.
EurekaLog shows no errors.
Are there any settings in madExcept for not being so intrusive?
Re: It is showing an Error where it does not exist.
Most devs are very happy that madExcept shows them all errors without hiding anything. Do you really want madExcept to not show you some crashes/errors?
If you insist you can do this in your project's finalization (add this to a unit which gets initialized late = finalized early):
But in case you didn't understand me clearly earlier: Your program has a bug! It is bad programming practise to have secondary threads still actively running while your main thread is in the process of finalizing/destroying all resources. If you didn't get shutdown crashes before, you've just been lucky, because the way your program currently works, you have to expect that shutdown crashes may occur randomly!!
If you insist you can do this in your project's finalization (add this to a unit which gets initialized late = finalized early):
Code: Select all
procedure HideAllFinalizationExceptions(const exceptIntf: IMEException; var handled: boolean);
begin
handled := true;
end;
finalization
RegisterExceptionHandler(HideAllFinalizationExceptions, epQuickFiltering, stDontSync);
end.
Re: It is showing an Error where it does not exist.
This code does not work gives the following error.
There is no overloaded version of 'RegisterExceptionHandler' That can be called with These arguments
In
RegisterExceptionHandler(HideAllFinalizationExceptions, epQuickFiltering, stDontSync);
Well now I was thinking about the fact that you say it is a mistake of my problem I will try to create a separate project to send you to me this thread that is Correct.
There is no overloaded version of 'RegisterExceptionHandler' That can be called with These arguments
In
RegisterExceptionHandler(HideAllFinalizationExceptions, epQuickFiltering, stDontSync);
Well now I was thinking about the fact that you say it is a mistake of my problem I will try to create a separate project to send you to me this thread that is Correct.
Re: It is showing an Error where it does not exist.
Swap epQuickFiltering and stDontSync, then it should compile.
Think about it: If your main thread finalizes the memory manager, any call to GetMem or FreeMem will crash. If at this moment one of your secondary threads are still running, and if they call GetMem or FreeMem, they will crash. So as a result it is very clear that once the main thread has started finalization, no secondary thread which accesses any Delphi RTL or VCL resources should still be actively running. Makes sense?
Think about it: If your main thread finalizes the memory manager, any call to GetMem or FreeMem will crash. If at this moment one of your secondary threads are still running, and if they call GetMem or FreeMem, they will crash. So as a result it is very clear that once the main thread has started finalization, no secondary thread which accesses any Delphi RTL or VCL resources should still be actively running. Makes sense?
Re: It is showing an Error where it does not exist.
If I understand correctly, you told me to change ?
"Swap epQuickFiltering and stDontSync, then it should compile."
but to exchange for what?
could put the new command.
Thankful.
"Swap epQuickFiltering and stDontSync, then it should compile."
but to exchange for what?
could put the new command.
Thankful.
Re: It is showing an Error where it does not exist.
Just swap the order. Instead of "epQuickFiltering, stDontSync" use "stDontSync, epQuickFiltering".
Re: It is showing an Error where it does not exist.
Young really you were correct.
My system had a Bug, hidden for years I did not know.
EurekaLog did not find the problem.
Its component is fantastic.
because I found 3 more errors here than the one for EurekaLog was correct.
I will still do some more tests
for now I'm stuck on the question of showing my own Custom Dialog
viewtopic.php?f=4&t=28497
Did you see anything for me ?
Did you get to test with Delphi 2010 + madExcept Trial 4.0.19?
My system had a Bug, hidden for years I did not know.
EurekaLog did not find the problem.
Its component is fantastic.
because I found 3 more errors here than the one for EurekaLog was correct.
I will still do some more tests
for now I'm stuck on the question of showing my own Custom Dialog
viewtopic.php?f=4&t=28497
Did you see anything for me ?
Did you get to test with Delphi 2010 + madExcept Trial 4.0.19?
Re: It is showing an Error where it does not exist.
I'll reply in the other thread when I had the time to test. It's weekend!
Re: It is showing an Error where it does not exist.
Yes it's weekend and I confess to you that I'm amazed you're answering my topics.
I did post today but I did not expect you to respond for being weekend, sorry.
Besides having a great product, it has great support.
I can only give you congratulations and success.
I did post today but I did not expect you to respond for being weekend, sorry.
Besides having a great product, it has great support.
I can only give you congratulations and success.