MSACCESS.EXE - Application Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DFS

    MSACCESS.EXE - Application Error

    I get these errors intermittently using a 3rd party COM object, under VB or
    Access (in a module). These seem to be happening at a similar instruction
    location.

    Instruction at 0x77fcb032 referenced memory at 0xd18b4104. Memory could not
    be "written"
    Instruction at 0x77fcb7cf referenced memory at 0x00000000. Memory could not
    be "written"
    Instruction at 0x77fcbee8 referenced memory at 0xfffffffe. Memory could not
    be "written"

    Relevant pseudo-code:

    1. Do Loop (ie 2000 times)
    2. Dim obj as new ObjectType
    3. response = obj.Method()
    4. obj.close
    5. Next

    The errors always happen on the 3rd line. I've tried many variations of Dim
    or Set and Close or Nothing. The code always crashes around the 500th
    iteration, at the above memory locations.

    Any ideas or explanations?

    Thanks


  • Tom van Stiphout

    #2
    Re: MSACCESS.EXE - Application Error

    On Fri, 24 Oct 2003 19:40:07 -0400, "DFS" <nospamDS@nospa m.com> wrote:

    Contact the vendor. The second error is a null pointer assigment -
    could be embarrasing for them.

    -Tom.

    [color=blue]
    >I get these errors intermittently using a 3rd party COM object, under VB or
    >Access (in a module). These seem to be happening at a similar instruction
    >location.
    >
    >Instruction at 0x77fcb032 referenced memory at 0xd18b4104. Memory could not
    >be "written"
    >Instruction at 0x77fcb7cf referenced memory at 0x00000000. Memory could not
    >be "written"
    >Instruction at 0x77fcbee8 referenced memory at 0xfffffffe. Memory could not
    >be "written"
    >
    >Relevant pseudo-code:
    >
    >1. Do Loop (ie 2000 times)
    >2. Dim obj as new ObjectType
    >3. response = obj.Method()
    >4. obj.close
    >5. Next
    >
    >The errors always happen on the 3rd line. I've tried many variations of Dim
    >or Set and Close or Nothing. The code always crashes around the 500th
    >iteration, at the above memory locations.
    >
    >Any ideas or explanations?
    >
    >Thanks
    >[/color]

    Comment

    • Douglas J. Steele

      #3
      Re: MSACCESS.EXE - Application Error

      While Tom's advice is certainly valid, I don't think the repeated Dim As New
      statement is doing any good in your code.

      Try:

      1. Dim obj As ObjectType
      2. Do Loop (ie 2000 times)
      3. Set obj = New ObjectType
      4. response = obj.Method()
      5. obj.close
      6. Set obj = Nothing
      7. Next



      --
      Doug Steele, Microsoft Access MVP

      (No private e-mails, please)



      "DFS" <nospamDS@nospa m.com> wrote in message
      news:vpje9hevhn grb6@corp.super news.com...[color=blue]
      > I get these errors intermittently using a 3rd party COM object, under VB[/color]
      or[color=blue]
      > Access (in a module). These seem to be happening at a similar instruction
      > location.
      >
      > Instruction at 0x77fcb032 referenced memory at 0xd18b4104. Memory could[/color]
      not[color=blue]
      > be "written"
      > Instruction at 0x77fcb7cf referenced memory at 0x00000000. Memory could[/color]
      not[color=blue]
      > be "written"
      > Instruction at 0x77fcbee8 referenced memory at 0xfffffffe. Memory could[/color]
      not[color=blue]
      > be "written"
      >
      > Relevant pseudo-code:
      >
      > 1. Do Loop (ie 2000 times)
      > 2. Dim obj as new ObjectType
      > 3. response = obj.Method()
      > 4. obj.close
      > 5. Next
      >
      > The errors always happen on the 3rd line. I've tried many variations of[/color]
      Dim[color=blue]
      > or Set and Close or Nothing. The code always crashes around the 500th
      > iteration, at the above memory locations.
      >
      > Any ideas or explanations?
      >
      > Thanks
      >
      >[/color]


      Comment

      • Tom van Stiphout

        #4
        Re: MSACCESS.EXE - Application Error

        On Sat, 25 Oct 2003 11:45:02 GMT, "Douglas J. Steele"
        <NOSPAM_djsteel e@NOSPAM_canada .com> wrote:

        Yes, DFS, please report back your findings. I think putting the Dim
        statement outside of the loop has no effect in VBA. Unlike in other
        languages where location does matter (e.g. C++, VB.NET).

        Rather I would try something like:
        response = obj.OtherMethod ()
        or
        response = obj.Property
        to see if the leak is located in Method or in the object's
        initialization code.

        -Tom.

        [color=blue]
        >While Tom's advice is certainly valid, I don't think the repeated Dim As New
        >statement is doing any good in your code.
        >
        >Try:
        >
        >1. Dim obj As ObjectType
        >2. Do Loop (ie 2000 times)
        >3. Set obj = New ObjectType
        >4. response = obj.Method()
        >5. obj.close
        >6. Set obj = Nothing
        >7. Next[/color]

        Comment

        Working...