none
Bad behavior upon forwarding an occurrence of recurring meeting (OL 2010) RRS feed

  • Question

  • Hi,

    This is quite strange, and I hope someone will have an insight (or information..) about this one:

    We are developing an Outlook Addin for few years by now.
    In the last days, something strange has started to happen:
    When the addin is installed, and a user forwards an occurrence of a recurring meeting - the following happens:

    • The subject of this forwarded meeting (in Sent Items and of course for the recipients) is empty
    • The date & time of the meeting is NOW (and not the real date & time of the meeting)

    It started in the last days. I tested old versions of the addin, and it happens with all of them.
    Now, there is no way something like that would go for years without alerts.
    This is new.

    I checked the Outlook updates - nothing was updated in the last months.
    I asked the IT - nothing was installed on the Exchange.

    I can reproduce it with OL2010 64 bit SP2.
    It does not reproduce with OL2013.

    Any idea?

    Thank you!

    Sunday, February 23, 2014 12:48 PM

All replies

  • Hello Moshe,

    Did you try to disable all installed add-ins in Outlook including yours? Does it help?

    Sunday, February 23, 2014 1:04 PM
  • Of course.

    It's OK without the addin.
    BUT.. It fails with a very early version of this addin  - a  4 years old addin, so it's not new addin code. 
    Plus - we tested this flow about 2 weeks ago - all was fine..

    So yes - probably something in the addin steps on an OOM trap - but the trap was activated only in the last days... I would like to find it.

    Sunday, February 23, 2014 2:09 PM
  • You need to comment all the code in the add-in and then try to uncomment line by line. I suppose the better place to start is the ItemSend event handler.
    Sunday, February 23, 2014 2:19 PM
  • Sorry, I know it will help, and actually this is what I'm doing right now.

    But this will not help the thousands of customers that we already have, and which are working with the addin for the last 3+ years.
    I'm trying to find what was changed in the environment that can cause this behavior to start out of nowhere (again - with a 3+ years addin).

    This way (I hope) I'll be able to approach MS with a concrete question.

    Thanks.

    Sunday, February 23, 2014 2:57 PM
  • There were no breaking changes. Do you have any antivirus installed on the PC?

    Sunday, February 23, 2014 5:09 PM
  • I have McAfee, up to date. I can't stop it.

    I checked with Outlook SPY.
    It seems that when the forward fails, the meeting request (in Sent Items) is not really a part of the series. 
    Many properties are not there. No isRecurring, no isException, and no many other properties.


    Sunday, February 23, 2014 8:51 PM
  • Are you able to reproduce the issue with a newly created empty add-in? Does it work as expected?

    Sunday, February 23, 2014 9:18 PM
  • I just found how to reproduce it (and I'm not sure if I'm happy or not)
    I don't know if it will be reproduced on any given machine, but I managed to reduced the 100,000 lines addin to 20 lines, and to reproduced it on my machine.

    The problem happens when using GetAssociatedAppointment.
    When I skipped this line - everything works fine.

    Scenario:
    1. Create recurring meeting with single recipient (let's say - daily, 3 occurrences). set the hour for a later hour (let's say - 5 hours from now)
    2. right click on one of the occurrences and select forward occurrence
    3. type another recipient (or the same recipient.. doesn;t really matter) and send
    RESULT: empty subject + occurrence time is NOW
    (I'm using OL2010 , 64 bit, SP2 (14.0.7106.5001)

    **********************************************************

    VB Addin, compiled in .net 4.0:

    public class ThisAddIn

        Private oInsps As Outlook.Inspectors
        Private oAppt As Outlook.AppointmentItem
        Private oInsp As Outlook.Inspector


        Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
            Init()
        End Sub

        Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
        End Sub

        Private Function Init()
            oInsps = Application.Inspectors
            AddHandler oInsps.NewInspector, AddressOf oInsps_NewInspector

        End Function

        Private Sub oInsps_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector) 'Handles oInsps.NewInspector
            oInsp = Inspector
            AddHandler oInsp.Close, AddressOf oInsp_Close
            Dim obj As Object
            obj = Inspector.CurrentItem

            'Dim oAtts As Outlook.Attachments
            'oAtts = obj.Attachments
            Try
                oAppt = obj.GetAssociatedAppointment(False)
            Catch
            Finally
                ReleaseObj(obj)
                ReleaseObj(oAppt)
            End Try

        End Sub

        Private Sub oInsp_Close() 'Handles oInsp.Close
            Runtime.InteropServices.Marshal.ReleaseComObject(oInsp)
        End Sub

        Private Sub ReleaseObj(obj As Object)
            If Not (obj Is Nothing) Then
                Dim ret As Integer
                ret = Runtime.InteropServices.Marshal.ReleaseComObject(obj)
                Debug.Print(ret.ToString())
            End If
        End Sub

    End Class

    **********************************************************

    Now - it does not reproduce on every machine (thank God), but I'm afraid it begins to happen more and more.

    It's not possible to avoid GetAssociatedAppointment - I'm using it in various places in the addin.

    I also don't know if this is the only issue - I will start uncomment back parts of the addin and see what happens. But this GetAssociatedAppointment is certainly an issue.

    What made it start this behavior now?
    Any idea...?

    Sunday, February 23, 2014 10:20 PM
  • And even easier - with VBA:

    Dim WithEvents oInsps As Outlook.InspectorsPrivate Sub Application_Startup()
        Set oInsps = Application.Inspectors
    End Sub

    Private Sub oInsps_NewInspector(ByVal Inspector As Inspector)
        On Error Resume Next
        Dim oMeet As MeetingItem 
        Set oMeet = Inspector.CurrentItem
        
        Dim oAppt As AppointmentItem 
        Set oAppt = oMeet.GetAssociatedAppointment(False)
        
        Set oAppt = Nothing
        Set oMeet = Nothing
    End Sub


    • Edited by Moshe_Malin Sunday, February 23, 2014 10:36 PM
    Sunday, February 23, 2014 10:34 PM
  • Hello Moshe,

    It is not new and known issue with the NewInspector event. You need to wait for the Activate event of the Inspector class for accessing the CurrentItem property.

    You can find a lot forum threads related to the NewInspector event. All of them suggest to use the Activate event instead. For example, please take a look at the Genrate popup message when clicking on URL in a email message forum thread.

    Monday, February 24, 2014 7:07 AM
  • Hi,

    In my code, I did not even use the objects.
    Let's say that I can live with bad results in my business logic until I fix it to use the Activate Event.

    Question is, why by only calling the GetAssociatedAppointment (and ignoring the result) I get this behavior.

    And more important - why it started only now, and how it can be undone.
    I still hope that there is some sort of update related to this...

    Tuesday, February 25, 2014 5:19 PM
  • It's possible it used to work because of timing or code that has now changed with some update or other.

    If you have data of when this started you can try rolling a system back to before any updates from that date. If the breaking change disappears you know it was some update or other. Then you can localize it.

    If it is due to an update post the information and I can pass it along to the product group and let them know about it (if they don't already).


    Ken Slovak MVP - Outlook

    Tuesday, February 25, 2014 10:26 PM
    Moderator
  • Thanks Ken.

    I'm reproducing it with a build from 3+ years ago.. it's not somethign that I changed now.
    I'm afraid I don't have system backup. 
    This issue is only few weeks old.

    I moved the GetAssociatedAppointment to the Inspector_Activate event.
    In VBA - it worked. I was happy for some time... But in the Addin - did not help. 
    I'm using it now only in Inspector_Activate.
    When I skip the GetAssociatedAppointment - works fine.
    When I do this line - the Forward does not work well

    That's so frustrated...

    Moshe

    Tuesday, February 25, 2014 11:16 PM
  • Hi Moshe,

    It looks like the Activate event suggested above helped. Am I right?

    > the Forward does not work well

    Could you please be more specific? What do you mean saying "does not work well"?

    Wednesday, February 26, 2014 11:48 AM
  • Hi Eugene,

    No. It did not work.

    I get the same behavior upon forward as I described in the initial post (forward of an occurrence resulted without subject and on wrong time).

    It did work in VBA, but not in add-in.
    The code of the addin is the same as the above code, only using the Inspector_Activate to use the etAssociatedAppointment instead of the NewInspector.

    I simply get the same "bad" behavior upon forwarding an occurrence.

    here is the addin code:

    ******************************************************************

        Private oInsp As Outlook.Inspector

        Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup

            Init()

        End Sub

        Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown

        End Sub

        Private Function Init()

            oInsps = Application.Inspectors

            AddHandler oInsps.NewInspector, AddressOf oInsps_NewInspector

        End Function

        Private Sub oInsps_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector) 'Handles oInsps.NewInspector

            oInsp = Inspector

            AddHandler oInsp.Activate, AddressOf oInsp_Activate

            AddHandler oInsp.Close, AddressOf oInsp_Close

        End Sub

        Private Sub oInsp_Activate()

            Dim obj As Object

            Try

                obj = oInsp.CurrentItem

                oAppt = obj.GetAssociatedAppointment(False)

            Finally

                ReleaseObj(obj)

                ReleaseObj(oAppt)

                RemoveHandler oInsp.Activate, AddressOf oInsp_Activate

            End Try

        End Sub

        Private Sub oInsp_Close()

            RemoveHandler oInsp.Close, AddressOf oInsp_Close

            Runtime.InteropServices.Marshal.ReleaseComObject(oInsp)

        End Sub

        Private Sub ReleaseObj(obj As Object)
            If Not (obj Is Nothing) Then
                Dim ret As Integer
                ret = Runtime.InteropServices.Marshal.ReleaseComObject(obj)
                Debug.Print(ret.ToString())
            End If
        End Sub

    ****************************************************************

    Wednesday, February 26, 2014 12:00 PM
  • You say this is only happening with Outlook 2010 x64 and no other platforms? It's not happening with Outlook 2010 x86?

    Do you have any system restores you can use to recover to before the problem started? That might allow you to do regression testing on various updates installed since then.

    I'll try your addin test code and see if I can repro the problem. If I can I'll file a bug with the product group. If not, you might have to open a support incident. I won't be able to get to playing with your test code until tomorrow probably though.

    I'll let you know my test results.


    Ken Slovak MVP - Outlook

    Wednesday, February 26, 2014 3:08 PM
    Moderator
  • Thank you Ken.

    It happened to me with OL 2010 64 (14.0.7106.5001).
    But this is only an example\information.
    It does not happen on every machine with this configuration.
    At this point I didn't manage to find a root cause of configuration that reproduces the issue.

    (Unfortunately, I cannot rollback my machine).

    I appreciate the time you invest on this one.

    Thanks,
    Moshe

    Wednesday, February 26, 2014 4:26 PM
  • I tried your code, and after modifying it so it would compile (adding Dims and so on) I was unable to repro the problem. The forwarded occurrences look normal and had the subjects and correct date/times.

    Unless you can isolate where it occurs or with what other code or updates about the only thing that could be done is to open a support incident. However, I'd advise that it probably wouldn't get anywhere unless the cause can be identified. That is the only other current option though.


    Ken Slovak MVP - Outlook

    • Proposed as answer by Marvin_Guo Monday, March 3, 2014 1:54 AM
    Thursday, February 27, 2014 3:42 PM
    Moderator
  • Thanks Ken.
    Sorry for the code issue.. hope there wasn't too many fixes.

    I understand your point about the isolation.
    I will continue work on it.
    Hope I will have an update soon.

    Moshe

    Thursday, February 27, 2014 3:51 PM