MadExcept does not create reports

delphi package - automated exception handling
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

MadExcept does not create reports

Post by PizzaProgram »

I'm new to this.
(I've wrote a long detailed post here, clicked Preview and this forum asked me to re-login. Lost 2 hours of work. :o )

I've changed some setting, after that:
... ME does not create any bugreport.txt in the exe folder nor any .mbr file on desktop at other PCs,
only on the developer machine !

It worked the first time on other PC too, with default settings.

Attached .mes file.

Hint:
I'm changing the default path of all "Desktop" folder to E:\_DOK\Asztal
because users are copying sometimes more GB of data there, filling up C:\ .
Can be that a problem?
Attachments
TermiPRO.zip
MES setting file
(2.41 KiB) Not downloaded yet
iconic
Site Admin
Posts: 1065
Joined: Wed Jun 08, 2005 5:08 am

Re: MadExcept does not create reports

Post by iconic »

I've changed some setting, after that
So, in my understanding madExcept created reports for anyone until then? If madExcept can't produce a log file in the location specified it will fail, period. That goes for any new file being created on a disk that may be full. My apologies in case I misunderstood what you meant.
E:\_DOK\Asztal
If that's YOUR local folder, it works, otherwise likely not. A customer's folder shouldn't be specific to a single machine and not every customer has a mapped E: drive.

--Iconic
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

Re: MadExcept does not create reports

Post by PizzaProgram »

Thank you for the quick answer! :-)
So, in my understanding madExcept created reports for anyone until then?
1. Yes, exactly! So it is clear: it has write access.

(I always set up machines with full write access to it's own E:\TermiPRO\ folder, and it has write access to the desktop too, because it can save or export things with a "save as dialog"...)

2. So the big question remains: why did it stop creating logs after I have changed some settings?
A customer's folder shouldn't be specific to a single machine
3. I was hoping you have loaded / or looked at the .mes file I've attached, and tell me what setup point is doing that?
I have the feeling you did not do that, otherwise you would see:
  • I have NO fixed path set anywhere.
I guess that is why you wrote only "general answers". :( But I'm very glad, you wrote back even at Sunday :-)

OFF:
I'm a Delphi programmer since 25 years + I have 33 years of experiences about Windows, users, PCs, etc.
I think I have found a bug, or at least a "first time user experience failure", that's why I'm spending my weekend to write these posts.

Personally I like if my customers are reporting me everything, so I can improve myself.


PS: You can answer me in German language too, if it's easier to you. It's just faster for me to type in english :wink: .
iconic
Site Admin
Posts: 1065
Joined: Wed Jun 08, 2005 5:08 am

Re: MadExcept does not create reports

Post by iconic »

Hello,

Thank you for more information about a potential bug. My original quick reply were merely facts about drives and folders not existing on every client machine and the fact that a full drive does not allow for new logs to be created, this is why you've decided to redirect the Desktop path to the E:\ drive to a custom folder of your choosing. Yes, the million-dollar question remains as to why it worked before and now it does not work at all. Do you have an older settings file from before to compare to? With a simple "diff" we can spot the difference much more quickly. If not, we'd have to attempt to reproduce locally on our own machines, of course. We can't determine what settings you have modified (when it worked correctly) prior to failure.

As far as speaking German, I'm not 100% fluent. I speak English as my native language but also Czech and Spanish. I'm ok with English as you are, but I appreciate you attempting to take care of language barriers. Madshi will see this thread and see what he thinks, he's the madExcept creator =]

--Iconic
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

Re: MadExcept does not create reports

Post by PizzaProgram »

Sadly the "Default" config has been overwritten by me.
So there is nothing I could compare with myself, even, if I delete the .mes file and recreate it. That's why I've asked for help here.

It would be nice (and logical) if there would be +3 buttons next to the [ x ] Default checkbox at the bottom of the Setup window:
  • [ Reset ] [ Import ] [Export]
I also realized something while testing:
- exceptions from inside `try ... except` are not captured by MadExcept.
- only not-handled leaks are reported.

Is there a way to force-report every each exception?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept does not create reports

Post by madshi »

The default settings are stored in "HKEY_CURRENT_USER\Software\madshi\madExcept". You can delete them there to get back to "factory" settings.

Import/Export is not really needed, the per-project settings are stored in the file named "yourProject.mes" (mes = madExceptSettings). You can simply copy the "*.mes" file.

You can use "RegisterHiddenExceptionHandler(YourHandler, stDontSync)" with your handler looking like this:

Code: Select all

procedure YourHandler(const exceptIntf: IMEException; var handled: boolean);
begin
  handled := false;
end;
This will make madExcept report exceptions that are handled by a try..except block, as well. This is not usually what you want, though. Some functions (even native Delphi functions) may raise an internal exception and then use try..except blocks to handle them. But you decide, of course.

I'm not sure what a "non-handled leak" is vs a "handled leak"? A leak by definition is "not handled". If an allocation is handled (= freed) then it's not a leak by definition. Or am I missing something?
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

Re: MadExcept does not create reports

Post by PizzaProgram »

Perfect Answers! :-)

Thank you for the detailed infos.
I will try it that way. (As soon as I've recovered from Covid.)

Cheers :-)

PS: Yes, it's clear: non-handled = leak = MadExcept will report it by default.
PS2: getting infos about ALL exception is just for dev.-testing, to see how much of my own try...excepts are swallowing errors and what kind of errors are they. An IF ... THEN runs ca. 20x faster than a handled exception.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept does not create reports

Post by madshi »

Get well soon!!
iconic
Site Admin
Posts: 1065
Joined: Wed Jun 08, 2005 5:08 am

Re: MadExcept does not create reports

Post by iconic »

Yes, I second that. Please get well soon! Once you do please let us know how Madshi's recommendations worked for you. We can go from there if needed and run some individual tests.

--Iconic
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

[Solved] Re: MadExcept does not create reports

Post by PizzaProgram »

I've "played" a little on Project>Options>Linker page:
Turned OFF [Map file] option (it was "Detailed" before). :wink:

- Re-Built the EXE, (I always do that, not just compile) and
- it actually did create a report on a foreign machine! [SUCCESS] :greenBalloon:
(I think the exe became a bit bigger too.)

Now, when I go back to Project>Options>Linker page, I see that after the build, the [Map file] is turned back on "Detailed".
So it seem MadExcept is doing something with this option, but maybe not properly. (Under Delphi-7). [bug?]

Usually I'm changing the Version number under Project Options. Tried to do that again for testing, but the Exe size remained now the same, so it did NOT causing the problem.

An other possibility I was thinking about is the russian "AlphaSkin" component, which is trying to repaint all popup windows, even msg. boxes, but the MadE. report window is Not painted (skinned), so I think we can rule that out too.

OFF:
If I want to include MadE. into my app, I guess I'll be forced to put a hidden "error creator button" somewhere, so I can test if MadE. is working or not, before sending out new versions of my program each time... (one more extra step :( )

Since I've turned off my own global exception handler, to get reports from MadE.,
some tiny ( mostly .setFocus ) errors are making the life of many users miserable on daily basis,
so I have to think really hard if it would really help in any way, or cause even more trouble to include MadExcept in my program...
I will need more time + testing + time ... to finally decide if I want to buy this or not.
Sorry. :sorry:

MANY thanks for the help so far! :wink:
If it happens that you find the error what can cause this and you can rule it out, so it never happens again, please send me a msg., because my answer will be a YES, since this is an awesome piece of module! (When it works.)

Cheers & Happy Coding!
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept does not create reports

Post by madshi »

You can ignore specific exceptions, if you prefer, when using madExcept. E.g. if those "SetFocus" exceptions have a specific exception class, you could ignore those based on the exception class.
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

Re: MadExcept does not create reports

Post by PizzaProgram »

Hi,
I think you have misunderstood something. Please read topic subject.

I know that I could ignore some type of errors, but I don't want to.
I wanted that MadE. captures these errors. But it did not.
It did nothing.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept does not create reports

Post by madshi »

But you said it's working now?

I was refering to this part of your comment:

> to get reports from MadE., some tiny ( mostly .setFocus )
> errors are making the life of many users miserable on
> daily basis

You can solve this by ignoring specific exceptions that would otherwise make the life of many users miserable, which still having madExcept do its job for other types of exceptions.
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

Re: MadExcept does not create reports

Post by PizzaProgram »

I have found a topic here with similar problem: viewtopic.php?p=53691#p53691
Is it possible, that MadE. is using some kind of post-compiling, and I have to press the OK button after Build, before copying the EXE file?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept does not create reports

Post by madshi »

Your reports are confusing to me. You wrote earlier:

> it actually did create a report on a foreign machine! [SUCCESS]

So I thought the problem was solved? Is it solved or not?
Post Reply