1. Shawn Davis
  2. PowerBuilder
  3. Wednesday, 8 February 2023 18:58 PM UTC

Hello All,

 

I've had a strange error crop up in the last couple months on an app deployed and in use for many year without issue. My hunch is that it relates to a windows update security change or something else in the users security environment. So just wondering if anyone else has seen it and resolved.

The issue occurs when the program tries to open a Word document from a database using OLE automation. It doesn't happen every time, in fact it's somewhat rare (I'm guessing it happens every 10-20 document opens) there doesn't seem to be any pattern. A windows opens up like the one below. I know how to temporarily resolve from doing a Google search but it comes back eventually. This is just a shot in the dark hoping someone has had it pop-up and figured out how to resolve. I've tried whitelisting the app without resolution. These are Win10Pro machines running Defender for Endpoint for security. The compile environment is PB 2019. Everyone has Office 16.

 

 

-Shawn

Who is viewing this page
Accepted Answer
Shawn Davis Accepted Answer Pending Moderation
  1. Thursday, 4 May 2023 16:51 PM UTC
  2. PowerBuilder
  3. # Permalink

This issue has disappeared much like appeared - for no particular reason. I'm chalking it up to a MS security snafu.

Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Thursday, 9 February 2023 13:24 PM UTC
  2. PowerBuilder
  3. # 1

Have you tried opening the same word file, from word application, when this error occurs?  
If yes, is the same error appear, when you open it from word or not ?

We used to get this type of error when we work in Word (not exactly this error).  

Happiness Always
BKR Sivaprakash

 

Comment
  1. Shawn Davis
  2. Thursday, 9 February 2023 17:24 PM UTC
These are all files created from a Word doc (a very old one) embedded in the app. We're going to try replace that doc....
  1. Helpful
There are no comments made yet.
Shawn Davis Accepted Answer Pending Moderation
  1. Wednesday, 8 February 2023 21:08 PM UTC
  2. PowerBuilder
  3. # 2

I know that a few weeks ago MS rolled out some new default settings for Attack Surface Reduction that caused a huge snafu. My hunch is this may be related.

Comment
There are no comments made yet.
Shawn Davis Accepted Answer Pending Moderation
  1. Wednesday, 8 February 2023 20:30 PM UTC
  2. PowerBuilder
  3. # 3

Right, thank you. That's what I meant by temporarily solving it. But it comes back over and over. And sometimes there not a disabled word file in the list....

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 14 February 2023 23:48 PM UTC
Hi Shawn;

It could be (my theory) that depending on where the user is on a network segment (latency) & the size of the document Blob, the odd user gets timed out.

I would suggest adding a TRY..CATCH around your OLE code and if it fails, do a yield / sleep command or two - then retry.

If the retry fails, alert the app user to the error. Maybe even log the details around the failure from the Exception 0bject's Code & Error Text for further analysis. HTH

Regards ... Chris
  1. Helpful
  1. Shawn Davis
  2. Thursday, 16 February 2023 16:28 PM UTC
This could be the problem. The SQL Server is accessed across the internet. But this app has been running for years as is and this issue started to pop-up just a few months ago. I feel like a security setting from Defender or some other avenue is interfering with the OLE activity. I don't feel that this issue is necessarily one that should be solved in this forum as I doubt it's actually a coding issue. Was just hoping someone might have seen this happening to them lately. Thanks.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 16 February 2023 17:45 PM UTC
PS: The other thing I encountered a few times in my various PB developer days was a crashing issue on a few App user's machines. When we went to check the Blob data on a few rows, we found that the Blob data stream was not saved properly. So when the SelectBlob was executed behind the scenes and the OLE control tried to paint the control's area, it crashed and took the PB App with it. We finally tracked down a few DB Rows that had this corrupt blob issue. The reason why only a few App users had this issue was that they were trying to update a customer record that only that they were responsible for. Hence the crashing for specific users when those few customer's records were being accessed. We finally traced the problem by logging the Table & Primary Key(s) being used in the App's specific process that crashed. So after the crash, we could then examine the Blog table's column using a DBA tool. That was the Ah-Ha moment when we saw the corrupted Blob data stream. The fix was to update the corrupt Blob column in the odd Table row with the proper (entire) data stream. Turns out that the App that updated these Blobs originally, did not complete the DB update properly.
  1. Helpful 1
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 8 February 2023 20:24 PM UTC
  2. PowerBuilder
  3. # 4
Comment
There are no comments made yet.
Shawn Davis Accepted Answer Pending Moderation
  1. Wednesday, 8 February 2023 20:16 PM UTC
  2. PowerBuilder
  3. # 5

I thought the .docx files weren't supported for full OLE automation. I probably missed something. I can build OLE automation with .docx files?

 

Thanks

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 8 February 2023 21:15 PM UTC
Hi Shawn;

DOCX should be supported if the OLE mapped class that is being used is ""Microsoft Word Document". You would be restricted to DOC files if the OLE mapped class is "Microsoft Word 97".

Yes, Office 2016 is pretty old now. I am not having issues with this in my Office 365 environment.

Regards ... Chris
  1. Helpful 1
  1. Shawn Davis
  2. Wednesday, 8 February 2023 21:37 PM UTC
They are all actually using M365 Apps for Enterprise but the version shows build 16026.xxxxx so i assumed that was still some derivation of 2016.

  1. Helpful
  1. Shawn Davis
  2. Wednesday, 8 February 2023 21:37 PM UTC
I'll test with a new .docx file type, see what happens. Thank you.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 8 February 2023 20:07 PM UTC
  2. PowerBuilder
  3. # 6

I have Word 2016 crash on me all the time without using PowerBuilder.  I wonder if it might help stability if you use the newer file format .docx instead of legacy .doc?

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 9 February 2023 03:37 AM UTC
I never spent the effort to try to troubleshoot. In the Word UI I get this kind of error message: https://filestore.community.support.microsoft.com/api/images/eaf46c90-8ce9-4226-8fdb-07b3f22f4dc6
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 9 February 2023 05:15 AM UTC
That looks to me like there should definitely something to see in the event viewer. Maybe have some of your tech staff have a look at it.

regards.
  1. Helpful 1
  1. Miguel Leeuwe
  2. Thursday, 9 February 2023 05:16 AM UTC
(or install libre office)

:)
  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.