Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-04

"Interesting" hang with daemonapp under windows

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

While I was trying to debug an unrelated problem with a service (written with daemonapp/lazdaemon), debugging that consisted in constantly rebooting the system to see the behaviour of my service at system startup, suddenly the service wasn't starting anymore, and, as always, windows tools to see where the problem is were less than useless.

After a painful and long session of trial and error, I discovered that for whatever reason the system logger wasn't working (hey, this is windows after all), so trying to use the logger was hanging the program. Clearing the log solved the problem (this time), but I'm wondering if daemonapp shouldn't try to catch (and ignore?) the possible exceptions thrown by TEventLog.

Bye

Luca
Michael Van Canneyt
to Luca Olivetti
Luca Olivetti wrote 12 lines
While I was trying to debug an unrelated problem with a service (written with daemonapp/lazdaemon), debugging that consisted in constantly rebooting the system to see the behaviour of my service at system startup, suddenly the service wasn't starting anymore, and, as always, windows tools to see where the problem is were less than useless. After a painful and long session of trial and error, I discovered that for whatever reason the system logger wasn't working (hey, this is windows after all), so trying to use the logger was hanging the program. Clearing the log solved the problem (this time), but I'm wondering if daemonapp shouldn't try to catch (and ignore?) the possible exceptions thrown by TEventLog.

This is a known problem, which is on my todo list since a couple of years. I wanted to add a property 'IgnoreErrors' to TEventLog.

Can you enter a bug report about it in mantis? You can assign it to me, if you want.

Michael.

Michael Van Canneyt
to Luca Olivetti
Luca Olivetti wrote 12 lines
En/na Michael Van Canneyt ha escrit: > This is a known problem, which is on my todo list since a couple of years. > I wanted to add a property 'IgnoreErrors' to TEventLog. > > Can you enter a bug report about it in mantis? You can assign it to me, if > you want. here it is http://bugs.freepascal.org/view.php?id=11097 but I cannot assign it.

No problem, I did it. Thanks for entering it !

Michael.

Luca Olivetti
to Michael Van Canneyt

En/na Michael Van Canneyt ha escrit:

Show quoted text 16 lines
On Thu, 3 Apr 2008, Luca Olivetti wrote: > En/na Michael Van Canneyt ha escrit: > >> This is a known problem, which is on my todo list since a couple of years. >> I wanted to add a property 'IgnoreErrors' to TEventLog. >> >> Can you enter a bug report about it in mantis? You can assign it to me, if >> you want. > here it is > http://bugs.freepascal.org/view.php?id=11097 > > but I cannot assign it. No problem, I did it. Thanks for entering it !

I added a patch for it. It appears that the exception is raised only under windows, so I used RaiseExceptionOnError instead of IgnoreErrors.

Bye

Luca