View Issue Details

IDProjectCategoryView StatusLast Update
0014919FPCFCLpublic2020-08-12 16:40
Reportermspiller Assigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
Platform32 BitOSWindows 
Product Version2.5.1 
Summary0014919: Unit tests for various com related functionality
DescriptionRegSvr32 -> just a simple regsvr32 with console enabled

TInterfacedObject -> works 100%

StreamWrapper -> TOleStream and TStreamAdapter test: (bugs: 0010608 and 0008376)

TAutoIntfObject -> not implemented in lazarus, but basically just a simple TInterfacedObject with IDispatch and TypeLib

SimpleShellExt -> problem with FPC (Exception : Unknown Run-Time error : 202
  $100224E9
  $10008FD4) (now reproducable under 32 bit OS, bug: 0014861)

TComObject -> exceptions don't work as intended (bug: 0014807)

TTypedComObject -> works, but patch for GetDocumentation is needed (bug: 0014802), unhandled exception even though is handled (related to bug: 0014807 ?)?

TAutoObject -> not implemented in lazarus


TODO tests for classes (not really used by me, any volunteers?):
TAggregatedObject,
TContainedObject,
TDispatchSilencer
TAutoObject with Events
TODO:
after all bugs are fixed somewhat more automated, checked before each build com test

Tagscom
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0008376 closedMarco van de Voort patch : lack of some function in activex and comobj problem being compiled for wince 
related to 0010608 closedMichael Van Canneyt TStreamAdapter not implemented + partial patch 
has duplicate 0028368 closedMarco van de Voort FreePascal cannot catch .dll(or .so) exception 

Activities

2009-10-27 22:54

 

ComTests-0.1.zip (210,486 bytes)

2009-10-29 22:29

 

ComTests.0.2.zip (212,539 bytes)

mspiller

2009-10-29 22:55

reporter   ~0031798

Update:
implemented TAutoIntfObject, TAutoObject (without events) -> exceptions don't work as intended (bug: 0014807), (issue: 0014939, patch for TAutoIntfObject and TAutoObject)

TODO tests for classes (not really used by me, any volunteers?):
TAggregatedObject (already implemented in FPC System unit),
TContainedObject (already implemented in FPC System unit),
TDispatchSilencer (usage?)
TAutoObject with Events

Marco van de Voort

2010-02-26 13:29

manager   ~0034792

Last edited: 2010-02-26 14:25

Current status:

streamwrapper: ok (need comobj instead of axctrls and -Sd)
tautoobject:ok (clean up graphics and other unused units from tlb unit + -Sd)
tinterfacedobject:ok (-Sd)
simpleshellext: compiles but won't register.
tautointfobject : ok (clean up graphics and other unused units from tlb unit + -Sd)

ttypedcomobject: doesn't seem to be able to handle the exception:

Hello: test
An unhandled exception occurred at $1000F139 :
Exception : Exception: test
  $1000F139

But they are defined using stdcall, not safecall. It could be that this is a consequence of not using SEH on windows? It might be a bug in the test actually (that assumes SEH and normal exception handling are the same)

Yup, safecall fixes it.

Marco van de Voort

2012-01-13 15:21

manager   ~0055721

Last edited: 2012-01-13 15:27

Still the same.

D:\comtests\again\ComTests\TTypedComObject>TestSampleTypedCom.exe
Hello: test
EXCEPTION NOT HANDLED !!!
TEST SUCCEEDED
Runtime error 217 at $0040AB51
  $0040AB51
  $0040AE01
  $004018AA
  $004104A1

the rest seems to work.

Marco van de Voort

2013-10-31 16:57

manager   ~0071067

Result is different, but still not ok:

D:\testing\comtests02\ComTests\TTypedComObject>TestSampleTypedCom.exe
Hello: test
An unhandled exception occurred at $10012D9F:
Exception: Exception: test
  $10012D9F

The exception seems to be raised, and caught, but the exception terminates before "test succeeded" runs.

ocean

2014-03-29 12:24

reporter   ~0074054

Fails differently if compiled with OPT=-dTEST_WIN32_SEH

Hello: test
An unhandled exception occurred at $10011448:
Exception object Exception is not of class Exception.
  $10011448
  $0040177B

That happens line: "on e:Exception do"

Marco van de Voort

2020-08-12 16:40

manager   ~0124801

Some modernization for FPC only and now we have SEH by default:

Issues:
- simpleshellext sometimes hangs in regsvr32 when unloading the library. When the library has been registered once, it however works. Possibly it was the inclusion of FV dialogs that I now removed.
- testsampletypedcom now returns

An unhandled exception occurred at $10012BF8:
Exception object is not a valid class.
  $10012BF8
  $00401919
ComTests0.2b.zip (45,013 bytes)

Issue History

Date Modified Username Field Change
2009-10-27 22:54 mspiller New Issue
2009-10-27 22:54 mspiller File Added: ComTests-0.1.zip
2009-10-29 22:29 mspiller File Added: ComTests.0.2.zip
2009-10-29 22:55 mspiller Note Added: 0031798
2010-02-17 21:45 Marco van de Voort Tag Attached: com
2010-02-26 13:29 Marco van de Voort Note Added: 0034792
2010-02-26 13:53 Marco van de Voort Note Edited: 0034792
2010-02-26 14:17 Marco van de Voort Note Edited: 0034792
2010-02-26 14:25 Marco van de Voort Note Edited: 0034792
2012-01-13 15:21 Marco van de Voort Note Added: 0055721
2012-01-13 15:27 Marco van de Voort Note Edited: 0055721
2013-10-31 16:57 Marco van de Voort Note Added: 0071067
2014-03-29 12:24 ocean Note Added: 0074054
2015-07-03 11:37 Marco van de Voort Relationship added has duplicate 0028368
2020-07-24 14:51 Marco van de Voort Relationship added related to 0008376
2020-07-24 14:51 Marco van de Voort Relationship added related to 0010608
2020-08-12 16:40 Marco van de Voort Note Added: 0124801
2020-08-12 16:40 Marco van de Voort File Added: ComTests0.2b.zip