Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ShockwaveFlashObjects gives 'System.AccessViolationException'

ShockwaveFlashObjects gives 'System.AccessViolationException'

Scheduled Pinned Locked Moved C#
helpcomperformancetutorial
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DPaul1994
    wrote on last edited by
    #1

    Hi. I have created an WindowsFormsApplication with multiple forms, and in a form I added an ShockwaveFlashObject and i set it a .swf file. The problem is that when I access two or three forms and come back to this form, it shows me this error message:

    An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
    Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    I don't really know how to fix this, I just managed to find out that this is the problem. The ShockwaveFlashObjects was added to toolbox from COM Components.

    L 1 Reply Last reply
    0
    • D DPaul1994

      Hi. I have created an WindowsFormsApplication with multiple forms, and in a form I added an ShockwaveFlashObject and i set it a .swf file. The problem is that when I access two or three forms and come back to this form, it shows me this error message:

      An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
      Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

      I don't really know how to fix this, I just managed to find out that this is the problem. The ShockwaveFlashObjects was added to toolbox from COM Components.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      DPaul1994 wrote:

      I don't really know how to fix this

      Unfortunately it is not easy. You will have to do some, or even a lot of, debugging in order to discover where in the application the access violation occurs. The most likely cause is passing a bad reference to some library method, but you would need a detailed stack trace to start investigating.

      D 1 Reply Last reply
      0
      • L Lost User

        DPaul1994 wrote:

        I don't really know how to fix this

        Unfortunately it is not easy. You will have to do some, or even a lot of, debugging in order to discover where in the application the access violation occurs. The most likely cause is passing a bad reference to some library method, but you would need a detailed stack trace to start investigating.

        D Offline
        D Offline
        DPaul1994
        wrote on last edited by
        #3

        I don't really know how to make such a deep debugging, because it doesn't show me the line where the error occurs, it just shows me that message when I close the application and that's it..If I remove ShockwaveFlashObjects and AxShockwaveFlashObjects from reference and the item from form, it works perfectly, so that is the issue

        L 1 Reply Last reply
        0
        • D DPaul1994

          I don't really know how to make such a deep debugging, because it doesn't show me the line where the error occurs, it just shows me that message when I close the application and that's it..If I remove ShockwaveFlashObjects and AxShockwaveFlashObjects from reference and the item from form, it works perfectly, so that is the issue

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Like I said: it's not easy. There is no way that anyone can guess the answer for you. You will have to add some code to your application to get more information about what is going on, until you can narrow it down to the general area where the problem occurs. That is when you can start tracing through with your debugger.

          D 2 Replies Last reply
          0
          • L Lost User

            Like I said: it's not easy. There is no way that anyone can guess the answer for you. You will have to add some code to your application to get more information about what is going on, until you can narrow it down to the general area where the problem occurs. That is when you can start tracing through with your debugger.

            D Offline
            D Offline
            DPaul1994
            wrote on last edited by
            #5

            I see. Well, thank you for your time and all the informations. I'll try to fix it :)

            1 Reply Last reply
            0
            • L Lost User

              Like I said: it's not easy. There is no way that anyone can guess the answer for you. You will have to add some code to your application to get more information about what is going on, until you can narrow it down to the general area where the problem occurs. That is when you can start tracing through with your debugger.

              D Offline
              D Offline
              DPaul1994
              wrote on last edited by
              #6

              I managed to fix the issue. The problem was that that flash object remains active when you open another form and it must be stopped or disposed. This is the solution, if anybody will get this error in this situation.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups