Could really use some help please (Except report)

delphi package - automated exception handling
Post Reply
kidjake28
Posts: 6
Joined: Fri May 15, 2015 7:43 pm

Could really use some help please (Except report)

Post by kidjake28 »

Hi Everyone,

I've been racking my brains on this for about a week now and I can't seem to pinpoint where the problem is. Let me explain.

I have a Delphi 2010 application that I wrote that has a bunch of components.

When I launch the application via IDE it works fine. When I run the app on that same machine it runs fine.

When I try and run it on any other machine, the first form starts up (splash screen) then it immediately closes and I get the following report send to me. I don't know where to look.

exception class : EOleSysError
exception message : Class not registered.

Any help really appreciated.
bugreport.txt.zip
Bug report
(4.51 KiB) Downloaded 281 times
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Could really use some help please (Except report)

Post by madshi »

It seems you have some sort of COM/OLE control on the form which is created in line 53 of listingboard.pas. And this COM/OLE control seems to be registered/installed on your PC, but not on the other PCs. Or maybe it's only *licensed* on your development PC (since the callstack contains a call to "LicenseCheck").
kidjake28
Posts: 6
Joined: Fri May 15, 2015 7:43 pm

Re: Could really use some help please (Except report)

Post by kidjake28 »

WOW! THANK YOU SO MUCH but how did you figure that out???

Where does it point the problem to line 53 of listingboard.pas?

I just want to know for future troubleshooting.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Could really use some help please (Except report)

Post by madshi »

If you read the first callstack (which is always the most interesting one because it's the one from the crashing thread) from top to bottom, you'll see where the thread started doing its work. Which is:

00a3379b +103 listingboard.exe listingboard 53 +19 initialization

Then the next line up is where the thread jumped from the previous line. Etc etc. So you can see that line 53 of listingboard.pas/dpr was the origin of the crash, and every line above that shows what happened next. Line 53 called TApplication.CreateForm. And TApplication.CreateForm called TCustomForm.Create. And some time later TOleControl.Create was called. So obviously some OLE control couldn't be created, as part of TApplication.CreateForm, which was initiated in line 53 of listingboard.pas/dpr.

The information is all there. Just needs a bit of interpretation...
kidjake28
Posts: 6
Joined: Fri May 15, 2015 7:43 pm

Re: Could really use some help please (Except report)

Post by kidjake28 »

You're absolutely right.

If I knew how to interpret the results it would be much easier.

Thank you so much for your help again.
kidjake28
Posts: 6
Joined: Fri May 15, 2015 7:43 pm

Re: Could really use some help please (Except report)

Post by kidjake28 »

Actually I could use a bit more help.

So I have listingboard.pas which creates the MAIN form as we can see below....but how do I know which OLEcontrol component ON the form is giving me this problem?

I'm not even sure which component uses OLE?

Again any help really appreciated.




005813cc +014 listingboard.exe ComObj OleError
005813db +007 listingboard.exe ComObj OleCheck
00925492 +056 listingboard.exe OleCtrls LicenseCheck
009255a5 +0e9 listingboard.exe OleCtrls TOleControl.CreateInstance
00924a99 +125 listingboard.exe OleCtrls TOleControl.Create
004baf99 +0ad listingboard.exe Classes CreateComponent
004bb1c8 +088 listingboard.exe Classes TReader.ReadComponent
004bb479 +089 listingboard.exe Classes TReader.ReadDataInner
004bb3e7 +067 listingboard.exe Classes TReader.ReadData
004c15e5 +001 listingboard.exe Classes TComponent.ReadState
0054d8c0 +02c listingboard.exe Controls TControl.ReadState
00551e6d +025 listingboard.exe Controls TWinControl.ReadState
004bb25f +11f listingboard.exe Classes TReader.ReadComponent
004bb479 +089 listingboard.exe Classes TReader.ReadDataInner
004bb3b8 +038 listingboard.exe Classes TReader.ReadData
004c15e5 +001 listingboard.exe Classes TComponent.ReadState
0054d8c0 +02c listingboard.exe Controls TControl.ReadState
00551e6d +025 listingboard.exe Controls TWinControl.ReadState
00574861 +06d listingboard.exe Forms TCustomForm.ReadState
004bc357 +1d7 listingboard.exe Classes TReader.ReadRootComponent
004b8982 +032 listingboard.exe Classes TStream.ReadComponent
004b3d7b +057 listingboard.exe Classes InternalReadComponentRes
004b3eeb +05f listingboard.exe Classes InitComponent
004b3f79 +061 listingboard.exe Classes InitInheritedComponent
005740d2 +0c6 listingboard.exe Forms TCustomForm.Create
0057ea5a +076 listingboard.exe Forms TApplication.CreateForm
00a3379b +103 listingboard.exe listingboard 53 +19 initialization
kidjake28
Posts: 6
Joined: Fri May 15, 2015 7:43 pm

Re: Could really use some help please (Except report)

Post by kidjake28 »

In my uses statement I have

OLECTRLS

I tried removing it hoping that Delphi would give me an error as to which component belongs to it. No such luck.

How can I tell who this belongs to?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Could really use some help please (Except report)

Post by madshi »

That might be hard to find out. You could try installing some Delphi version on a PC where the problem occurs, so you can walk through the RTL code step by step. But I fear that installing Delphi might make the problem go away, so it wouldn't help finding which OLE component is the problem.

You could copy your project and then remove all the components from the form. If that solves the problem you know that one of the components you removed was at fault. So put half of them back in. Otherwise remove half of the remaining controls etc.

Or you could try to copy OleCtrls.pas to your project folder and edit the code. E.g. add a try..except block around TOleControl.Create to log out the name of the component which fails to create. But I don't really know if you can edit OleCtrls.pas that easily, never tried that.

Or you could run the SysInternal Process Monitor with a filter set to your EXE, and then check the registry accesses. OLE controls are usually registered in the registry. So there should be some registry accesses failing right before the exception occurs.

Just some ideas...
kidjake28
Posts: 6
Joined: Fri May 15, 2015 7:43 pm

Re: Could really use some help please (Except report)

Post by kidjake28 »

So it turned out that Flash needed to be loaded.

I lucked out by trying to load flash.
Post Reply