Anonymous_User Absent Member.
Absent Member.
1825 views

Memory corruption when using MS-Office 2007

Hi All,

My app has a COM-connection with GroupWise
which has run flawless for many years.
My customer has upgraded his MS-Office to 2007.
Now my app crashes at several points, _after_ the
COM-interface to GroupWise has been used !?!?!?

My app has only one form that instantiates a GW-object,
inserts/updates an appointment and destroys the GW-object.
When this form is not touched, my app works all day.
When this form is used, my app will crash elsewere eventually.
I conclude that some memory gets corrupted that affects
another part of my app.
This only happens when MS-Office 2007 is installed (to
which my app also uses a COM-interface). No problems
using any previous version of MS-Office.
Seems that GroupWise and Office 2007 don't like each
other but then only on the API level.

Has anyone got any idea what's happening here?

My customer uses XPpro sp3 and GW-client 7.0.2 6-4-2007 Build 561

TIA
Maarten


Labels (1)
0 Likes
4 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Memory corruption when using MS-Office 2007

I would imagine that your app is running with .NET.
..NET wraps COM object and does a reference count
on all of the objects. This causes problems with the
ObjectAPI. If it is in .NET you need to force a garbage
collection after you have released all of the ObjectAPI
objects. In VB.NET, it is:
GC.Collect()
GC.WaitForPendingFinalizers()

If that is not the problem, I would need a test application
that will cause the problem.

Preston

>>> On Wednesday, July 09, 2008 at 3:16 AM,

Maarten<maarveen@spam@softpro.nl>
wrote:
> Hi All,
>
> My app has a COM-connection with GroupWise
> which has run flawless for many years.
> My customer has upgraded his MS-Office to 2007.
> Now my app crashes at several points, _after_ the
> COM-interface to GroupWise has been used !?!?!?
>
> My app has only one form that instantiates a GW-object,
> inserts/updates an appointment and destroys the GW-object.
> When this form is not touched, my app works all day.
> When this form is used, my app will crash elsewere eventually.
> I conclude that some memory gets corrupted that affects
> another part of my app.
> This only happens when MS-Office 2007 is installed (to
> which my app also uses a COM-interface). No problems
> using any previous version of MS-Office.
> Seems that GroupWise and Office 2007 don't like each
> other but then only on the API level.
>
> Has anyone got any idea what's happening here?
>
> My customer uses XPpro sp3 and GW-client 7.0.2 6-4-2007 Build 561
>
> TIA
> Maarten

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Memory corruption when using MS-Office 2007

Hello Preston,

Thanks for the swift reply.

> I would imagine that your app is running with .NET.

Nope. This app is a Win32 exe, written in Clarion.

> If that is not the problem, I would need a test application

Dunno if I can isolate this problem into a test-app.
The app seemed to randomly GPF at different places, all
unrelated to the GW-part. It took me a while to find out that
instantiating/destroying the GW-object was the cause of the
GPF's, later in another part of the program.
These problems started after the install of MS-Office 2007
so, naturaly, I was looking at the wrong COM-objects 😞
This app uses an Oracle database for its storage so sending
it to you might not be so usefull as it won't work w/o data.

I _think_ that a memory corruption (aka a buffer overrun
or an unmatched push/pop stack) occurs in the memory
space of another part of my program.
But only with Office 2007! What is changed in 2007 that
it influences my GW-API calls?

Btw: The connection with GW still works perfectly: all
appointments are nicely updated, etc. It only destabalises
my app when Office 2007 is used.

Tnx



--

Best regards,
Maarten


> .NET wraps COM object and does a reference count
> on all of the objects. This causes problems with the
> ObjectAPI. If it is in .NET you need to force a garbage
> collection after you have released all of the ObjectAPI
> objects. In VB.NET, it is:
> GC.Collect()
> GC.WaitForPendingFinalizers()
>
> If that is not the problem, I would need a test application
> that will cause the problem.
>
> Preston
>
> >>> On Wednesday, July 09, 2008 at 3:16 AM,

> Maarten<maarveen@spam@softpro.nl>
> wrote:
> > Hi All,
> >
> > My app has a COM-connection with GroupWise
> > which has run flawless for many years.
> > My customer has upgraded his MS-Office to 2007.
> > Now my app crashes at several points, _after_ the
> > COM-interface to GroupWise has been used !?!?!?
> >
> > My app has only one form that instantiates a GW-object,
> > inserts/updates an appointment and destroys the GW-object.
> > When this form is not touched, my app works all day.
> > When this form is used, my app will crash elsewere eventually.
> > I conclude that some memory gets corrupted that affects
> > another part of my app.
> > This only happens when MS-Office 2007 is installed (to
> > which my app also uses a COM-interface). No problems
> > using any previous version of MS-Office.
> > Seems that GroupWise and Office 2007 don't like each
> > other but then only on the API level.
> >
> > Has anyone got any idea what's happening here?
> >
> > My customer uses XPpro sp3 and GW-client 7.0.2 6-4-2007 Build 561
> >
> > TIA
> > Maarten



0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Memory corruption when using MS-Office 2007

I'm a little confused. Does you application, at least
the ObjectAPI part, interact with Office 2007? Office 2007
would have to use .NET. I just had another developer that
started to have problems with their application. The Object
API was accessed from a macro in Word. In that case there
was an object that was not explicitly released. When I tested
it I didn't have a problem with Office XP. I'm not sure what
version of Office they were using. Make sure you release all
objects when you are done with them.

Preston

>>> On Wednesday, July 09, 2008 at 8:18 AM,

Maarten<maarveen@spam@softpro.nl>
wrote:
> Hello Preston,
>
> Thanks for the swift reply.
>
>> I would imagine that your app is running with .NET.

> Nope. This app is a Win32 exe, written in Clarion.
>
>> If that is not the problem, I would need a test application

> Dunno if I can isolate this problem into a test-app.
> The app seemed to randomly GPF at different places, all
> unrelated to the GW-part. It took me a while to find out that
> instantiating/destroying the GW-object was the cause of the
> GPF's, later in another part of the program.
> These problems started after the install of MS-Office 2007
> so, naturaly, I was looking at the wrong COM-objects 😞
> This app uses an Oracle database for its storage so sending
> it to you might not be so usefull as it won't work w/o data.
>
> I _think_ that a memory corruption (aka a buffer overrun
> or an unmatched push/pop stack) occurs in the memory
> space of another part of my program.
> But only with Office 2007! What is changed in 2007 that
> it influences my GW-API calls?
>
> Btw: The connection with GW still works perfectly: all
> appointments are nicely updated, etc. It only destabalises
> my app when Office 2007 is used.
>
> Tnx
>
>
>
> --
>
> Best regards,
> Maarten
>
>
>> .NET wraps COM object and does a reference count
>> on all of the objects. This causes problems with the
>> ObjectAPI. If it is in .NET you need to force a garbage
>> collection after you have released all of the ObjectAPI
>> objects. In VB.NET, it is:
>> GC.Collect()
>> GC.WaitForPendingFinalizers()
>>
>> If that is not the problem, I would need a test application
>> that will cause the problem.
>>
>> Preston
>>
>> >>> On Wednesday, July 09, 2008 at 3:16 AM,

>> Maarten<maarveen@spam@softpro.nl>
>> wrote:
>> > Hi All,
>> >
>> > My app has a COM-connection with GroupWise
>> > which has run flawless for many years.
>> > My customer has upgraded his MS-Office to 2007.
>> > Now my app crashes at several points, _after_ the
>> > COM-interface to GroupWise has been used !?!?!?
>> >
>> > My app has only one form that instantiates a GW-object,
>> > inserts/updates an appointment and destroys the GW-object.
>> > When this form is not touched, my app works all day.
>> > When this form is used, my app will crash elsewere eventually.
>> > I conclude that some memory gets corrupted that affects
>> > another part of my app.
>> > This only happens when MS-Office 2007 is installed (to
>> > which my app also uses a COM-interface). No problems
>> > using any previous version of MS-Office.
>> > Seems that GroupWise and Office 2007 don't like each
>> > other but then only on the API level.
>> >
>> > Has anyone got any idea what's happening here?
>> >
>> > My customer uses XPpro sp3 and GW-client 7.0.2 6-4-2007 Build 561
>> >
>> > TIA
>> > Maarten

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Memory corruption when using MS-Office 2007

Hello Preston,

> I'm a little confused. Does you application, at least
> the ObjectAPI part, interact with Office 2007? Office 2007

No. I'm using multiple COM-objects, max 1 per thread, to
communicate with GW and Office.

> would have to use .NET. I just had another developer that
> started to have problems with their application. The Object
> API was accessed from a macro in Word. In that case there
> was an object that was not explicitly released. When I tested
> it I didn't have a problem with Office XP. I'm not sure what

Would be interesting to test with Office 2007 as my app didn't
had any problems with all previous versions.

> version of Office they were using. Make sure you release all
> objects when you are done with them

AFAIK, I do.

Tnx!


--

Best regards,
Maarten
..
>
> Preston
>
> >>> On Wednesday, July 09, 2008 at 8:18 AM,

> Maarten<maarveen@spam@softpro.nl>
> wrote:
> > Hello Preston,
> >
> > Thanks for the swift reply.
> >
> >> I would imagine that your app is running with .NET.

> > Nope. This app is a Win32 exe, written in Clarion.
> >
> >> If that is not the problem, I would need a test application

> > Dunno if I can isolate this problem into a test-app.
> > The app seemed to randomly GPF at different places, all
> > unrelated to the GW-part. It took me a while to find out that
> > instantiating/destroying the GW-object was the cause of the
> > GPF's, later in another part of the program.
> > These problems started after the install of MS-Office 2007
> > so, naturaly, I was looking at the wrong COM-objects 😞
> > This app uses an Oracle database for its storage so sending
> > it to you might not be so usefull as it won't work w/o data.
> >
> > I _think_ that a memory corruption (aka a buffer overrun
> > or an unmatched push/pop stack) occurs in the memory
> > space of another part of my program.
> > But only with Office 2007! What is changed in 2007 that
> > it influences my GW-API calls?
> >
> > Btw: The connection with GW still works perfectly: all
> > appointments are nicely updated, etc. It only destabalises
> > my app when Office 2007 is used.
> >
> > Tnx
> >
> >
> >
> > --
> >
> > Best regards,
> > Maarten
> >
> >
> >> .NET wraps COM object and does a reference count
> >> on all of the objects. This causes problems with the
> >> ObjectAPI. If it is in .NET you need to force a garbage
> >> collection after you have released all of the ObjectAPI
> >> objects. In VB.NET, it is:
> >> GC.Collect()
> >> GC.WaitForPendingFinalizers()
> >>
> >> If that is not the problem, I would need a test application
> >> that will cause the problem.
> >>
> >> Preston
> >>
> >> >>> On Wednesday, July 09, 2008 at 3:16 AM,
> >> Maarten<maarveen@spam@softpro.nl>
> >> wrote:
> >> > Hi All,
> >> >
> >> > My app has a COM-connection with GroupWise
> >> > which has run flawless for many years.
> >> > My customer has upgraded his MS-Office to 2007.
> >> > Now my app crashes at several points, _after_ the
> >> > COM-interface to GroupWise has been used !?!?!?
> >> >
> >> > My app has only one form that instantiates a GW-object,
> >> > inserts/updates an appointment and destroys the GW-object.
> >> > When this form is not touched, my app works all day.
> >> > When this form is used, my app will crash elsewere eventually.
> >> > I conclude that some memory gets corrupted that affects
> >> > another part of my app.
> >> > This only happens when MS-Office 2007 is installed (to
> >> > which my app also uses a COM-interface). No problems
> >> > using any previous version of MS-Office.
> >> > Seems that GroupWise and Office 2007 don't like each
> >> > other but then only on the API level.
> >> >
> >> > Has anyone got any idea what's happening here?
> >> >
> >> > My customer uses XPpro sp3 and GW-client 7.0.2 6-4-2007 Build 561
> >> >
> >> > TIA
> >> > Maarten



0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.