Bizarre ActiveX/OLE Control Problems
So I'm just going to throw a hail mary out there is see if anybody might know what is going on here.
We have been using the DBI-Technologies Component Toolbox 5.0 within our PowerBuilder application since roughly 1999 (we started with version 4 of their components and migrated to 5).
Through this time we've moved from PowerBuilder 7, to 9, to 10.2.1 and now we are sitting on 11.5.1 Build 5097.
Yes. These controls are old. But they have continued to work without any issues. Have even been able to install them on a 64bit development machine without any problem.
Now, roughly a couple weeks ago, something started happening where the windows that have the ActiveX/OLE Control on them, started throwing exceptions where it comes back and says the "object property is not available". We've been populating the control in the constructor event. This has always worked. Zero issues.
Now out of nowhere. Exceptions almost 80% of the time (sometimes it does run correctly)
Went back into our old PowerBuilder 10.2.1 code that was running flawlessly before we did the migration. So NOTHING had been changed in this code set at all. Open the window. The app crashes and gives no reason why (before exceptions were thrown into the PowerBuilder debugging environment)..
I migrated the code up to 12.1. Same issue.
I have regenerated and optimized everything. No matter what I do, these controls only work on an intermittent basis. What I have found, is if I remove all the code from the constructor event, and put it in the clicked event of a command button. Let the window open and then press the button. Control populates with no issues. However, if I attempt to post the clicked event from the post open of the window. BOOM!! Down in flames. They (DBI) recommended that I move the constructor code to their firstdraw event. However, what I have found is that the firstdraw event experiences an issue where it only fires correctly on an intermittent basis. And the firstdraw event does not exist in some of the controls I'm having issues with.
I'm beginning to wonder if this is something specific to my machine. Maybe something has been changed to cause these controls to not function correctly.
Before I start blowing my machine away to see if this corrects the issue, I wanted to at least post the question and see what ideas anybody else out there might have. This issue literally came out of nowhere. We weren't even working in these windows. And I opened one of them one day to look at some data for one of our users and here comes the exception.
Any thoughts on anything I might be missing would be greatly appreciated everyone!!