View Issue Details

IDProjectCategoryView StatusLast Update
0004407JEDI VCL00 JVCL Componentspublic2009-07-09 15:33
ReporterZENsanAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionnot fixable 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0004407: JvDebugHandler do not handle exception from other threads anymore.
DescriptionJvDebugHandler do not handle exception from other threads anymore.

That appeareance was from the beginning and in one day (in this month or before) Debughandler stopped handling exceptions from other threads.
TagsNo tags attached.

Activities

2008-07-23 04:17

 

JvDebugHandler.7z (2,404 bytes)

obones

2008-07-23 06:40

administrator   ~0014416

I'm sorry, but I cannot extract the file contents, it always gives me a "not enough memory" error.

2008-07-24 05:30

 

JvDebugHandler.rar (78 bytes)

ZENsan

2008-07-28 00:04

reporter   ~0014462

I uploaded RAR archive.

obones

2008-08-12 00:37

administrator   ~0014495

Hum, sorry, for not replying earlier, but the RAR is empty. 78 bytes once rared, it's a bit too small <g>

2008-08-12 02:16

 

JvDebugHandler2.rar (3,012 bytes)

ZENsan

2008-09-01 06:28

reporter   ~0014528

JvDebugHandler2.rar is correct and works.

obones

2008-09-04 12:27

administrator   ~0014546

Ok, I'm seeing it. But it seems this has been the case for a long time. With UnhandledExceptionsOnly set to True, then it's the OnException handler of TApplication that is being used. And it is called only for exceptions in the main thread.
What could be changed is the way TJvThread sends its exception, but I'm not sure it is a good thing. I tried this:

procedure TJvBaseThread.ExceptionHandler;
begin
  if Assigned(Application.OnException) then
    Application.OnException(Self, FException)
  else
    ShowException(FException, FExceptionAddr);
end;

instead of the existing code.
Note sure it is fine.

ZENsan

2008-09-08 00:08

reporter   ~0014549

I think that there is possibly better solution. Maybe we can add some method to JvDebugHandler like "NotifyException(ExceptObj: TObject; ExceptAddr: Pointer; OSException: Boolean)" - and this can be called from thread:

try
except
  Datamodule1.DebugHandler.NotifyException(...);
end;

Maybe something like this...
So there are not required changes to TJvThread and so on.

ZENsan

2008-09-09 01:01

reporter   ~0014552

One moment I noticed. When I set UnhandledExceptionsOnly to False, then Debughandler detects the exception in other threads also. Calls FOnOtherDestination.. but after that aslo calls Kernel32_RaiseException.

ZENsan

2008-09-09 01:04

reporter   ~0014553

There in module JvDebughandler is line:

if not FUnhandledExceptionsOnly then
  JclAddExceptNotifier(ExceptionNotifier);

Possibly this influence the way how this works..

obones

2008-09-09 01:30

administrator   ~0014554

If you set UnhandledExceptionsOnly to False, then you will get notified when an exception is raised but trapped like this:

try
  raise Execption.create;
except
  on E: Exception do
    // Trap it
end;

It might not be desirable for you, but then, yes, it does allow to get the exceptions everywhere in the application. I don't know if there is a way to configure JclDebug to not give notification for trapped exceptions.

obones

2008-10-10 05:07

administrator   ~0014813

Investigation needed to see if JCL has an option to ignore trapped exceptions

obones

2009-07-09 15:33

administrator   ~0015814

Well, sorry, no, the JCL does not have such an option.

Issue History

Date Modified Username Field Change
2008-07-23 04:17 ZENsan New Issue
2008-07-23 04:17 ZENsan File Added: JvDebugHandler.7z
2008-07-23 04:30 obones Status new => acknowledged
2008-07-23 06:40 obones Note Added: 0014416
2008-07-23 06:40 obones Status acknowledged => feedback
2008-07-24 05:30 ZENsan File Added: JvDebugHandler.rar
2008-07-28 00:04 ZENsan Note Added: 0014462
2008-08-12 00:37 obones Note Added: 0014495
2008-08-12 02:16 ZENsan File Added: JvDebugHandler2.rar
2008-09-01 06:28 ZENsan Note Added: 0014528
2008-09-04 12:27 obones Note Added: 0014546
2008-09-08 00:08 ZENsan Note Added: 0014549
2008-09-09 01:01 ZENsan Note Added: 0014552
2008-09-09 01:04 ZENsan Note Added: 0014553
2008-09-09 01:30 obones Note Added: 0014554
2008-10-10 05:07 obones Note Added: 0014813
2008-10-10 05:07 obones Status feedback => confirmed
2009-07-09 15:33 obones Note Added: 0015814
2009-07-09 15:33 obones Status confirmed => resolved
2009-07-09 15:33 obones Resolution open => not fixable
2009-07-09 15:33 obones Assigned To => obones