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. Other Discussions
  3. Clever Code
  4. Visual Studio 2005, iTunes 7.*.* and LoaderLock Error [modified]

Visual Studio 2005, iTunes 7.*.* and LoaderLock Error [modified]

Scheduled Pinned Locked Moved Clever Code
helpvisual-studiocsharpcomdebugging
7 Posts 6 Posters 5 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.
  • P Offline
    P Offline
    Psycho Coder Extreme
    wrote on last edited by
    #1

    Recently I had iTunes open at work, listening to music as I was working, when I launched the application I was working on I got a "LoaderLock" error the first time I tried to hit any key in the application. Once I clicked OK like 9 times the application ran as normal and operated this way until I ended the session, changed/wrote some code, then launched again. This was baffling to say the least, a couple of us did massive Googling on the issue and found very little that could even remotely be causing the problem I was experiencing, and no one else working on the same application was experiencing this, and a simple reboot seemed to solve the problem (keep in mind after the reboot I had a habit of not re-starting application I had running, ie iTunes). After several days of this frustrating error I realized that the only time this occurred was when I had iTunes running at the same time as Visual Studio 2005, so I did some Googling on that assumtion and ran across many other developers having the same issue[^]. Part of the way through this thread is a posting from Liz - MSFT with this response:

    Hello all,

    We are sorry that you are experiencing problems when running iTunes 7.1 and VS 2005. Here is the results of our research:

    We noticed that iTunesKeyboardCompatibility.dll is causing the LoaderLock MDA to fire. The most likely reason is that the
    DLL entry point for this DLL is doing some non-trivial work which causes managed code to run. There are serious limits on
    what a DLL can do in the DLL entry point (i.e. DllMain()). For more information, you can refer to http://msdn2.microsoft.com/en-us/library/ms682583.aspx[^].

    This will need to be resolved by iTunes.

    Regards,

    Liz

    Since "Liz" states this has to be fixed on iTunes end the only workaround we have found is to uninstall iTunes 7.*.* and install iTunes 6.5 (since this issue doesn't seem to exist with 6.5). This was several frustrating days until I finally found a way to resolve this issue. PS: Since that day I also found out you can turn off the MDA (Debug -> Exceptions -> Managed Debug Assistants then uncheck the LoaderLock item).

    M S C 3 Replies Last reply
    0
    • P Psycho Coder Extreme

      Recently I had iTunes open at work, listening to music as I was working, when I launched the application I was working on I got a "LoaderLock" error the first time I tried to hit any key in the application. Once I clicked OK like 9 times the application ran as normal and operated this way until I ended the session, changed/wrote some code, then launched again. This was baffling to say the least, a couple of us did massive Googling on the issue and found very little that could even remotely be causing the problem I was experiencing, and no one else working on the same application was experiencing this, and a simple reboot seemed to solve the problem (keep in mind after the reboot I had a habit of not re-starting application I had running, ie iTunes). After several days of this frustrating error I realized that the only time this occurred was when I had iTunes running at the same time as Visual Studio 2005, so I did some Googling on that assumtion and ran across many other developers having the same issue[^]. Part of the way through this thread is a posting from Liz - MSFT with this response:

      Hello all,

      We are sorry that you are experiencing problems when running iTunes 7.1 and VS 2005. Here is the results of our research:

      We noticed that iTunesKeyboardCompatibility.dll is causing the LoaderLock MDA to fire. The most likely reason is that the
      DLL entry point for this DLL is doing some non-trivial work which causes managed code to run. There are serious limits on
      what a DLL can do in the DLL entry point (i.e. DllMain()). For more information, you can refer to http://msdn2.microsoft.com/en-us/library/ms682583.aspx[^].

      This will need to be resolved by iTunes.

      Regards,

      Liz

      Since "Liz" states this has to be fixed on iTunes end the only workaround we have found is to uninstall iTunes 7.*.* and install iTunes 6.5 (since this issue doesn't seem to exist with 6.5). This was several frustrating days until I finally found a way to resolve this issue. PS: Since that day I also found out you can turn off the MDA (Debug -> Exceptions -> Managed Debug Assistants then uncheck the LoaderLock item).

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      The only safe thing to do in DllMain is nothing. That means not creating any static objects in a C++ DLL which have constructors, since the constructors get run when the DLL is loaded. That's not completely true - you can get away with calling some operations in kernel32.dll, like creating a new heap, and you probably need to save your HINSTANCE for later - but in general, you should just ignore the fact that DllMain exists. Instead, require explicit initialisation and cleanup of your DLL. I'm guessing that this iTunes DLL is doing something to hook keypresses (it's probably a low-level keyboard hook) to get loaded into every process. This is lame - if you want to handle keypresses from other processes, you should call RegisterHotKey.

      Stability. What an interesting concept. -- Chris Maunder

      C 1 Reply Last reply
      0
      • M Mike Dimmick

        The only safe thing to do in DllMain is nothing. That means not creating any static objects in a C++ DLL which have constructors, since the constructors get run when the DLL is loaded. That's not completely true - you can get away with calling some operations in kernel32.dll, like creating a new heap, and you probably need to save your HINSTANCE for later - but in general, you should just ignore the fact that DllMain exists. Instead, require explicit initialisation and cleanup of your DLL. I'm guessing that this iTunes DLL is doing something to hook keypresses (it's probably a low-level keyboard hook) to get loaded into every process. This is lame - if you want to handle keypresses from other processes, you should call RegisterHotKey.

        Stability. What an interesting concept. -- Chris Maunder

        C Offline
        C Offline
        codemunkeh
        wrote on last edited by
        #3

        And another for my "Why I hate iTunes list." I'll need a separate hard drive for those lists of mine soon. What with the "Data that Google has on me"...


        Need Another Seven Acronyms...
        Confused? You will be...

        1 Reply Last reply
        0
        • P Psycho Coder Extreme

          Recently I had iTunes open at work, listening to music as I was working, when I launched the application I was working on I got a "LoaderLock" error the first time I tried to hit any key in the application. Once I clicked OK like 9 times the application ran as normal and operated this way until I ended the session, changed/wrote some code, then launched again. This was baffling to say the least, a couple of us did massive Googling on the issue and found very little that could even remotely be causing the problem I was experiencing, and no one else working on the same application was experiencing this, and a simple reboot seemed to solve the problem (keep in mind after the reboot I had a habit of not re-starting application I had running, ie iTunes). After several days of this frustrating error I realized that the only time this occurred was when I had iTunes running at the same time as Visual Studio 2005, so I did some Googling on that assumtion and ran across many other developers having the same issue[^]. Part of the way through this thread is a posting from Liz - MSFT with this response:

          Hello all,

          We are sorry that you are experiencing problems when running iTunes 7.1 and VS 2005. Here is the results of our research:

          We noticed that iTunesKeyboardCompatibility.dll is causing the LoaderLock MDA to fire. The most likely reason is that the
          DLL entry point for this DLL is doing some non-trivial work which causes managed code to run. There are serious limits on
          what a DLL can do in the DLL entry point (i.e. DllMain()). For more information, you can refer to http://msdn2.microsoft.com/en-us/library/ms682583.aspx[^].

          This will need to be resolved by iTunes.

          Regards,

          Liz

          Since "Liz" states this has to be fixed on iTunes end the only workaround we have found is to uninstall iTunes 7.*.* and install iTunes 6.5 (since this issue doesn't seem to exist with 6.5). This was several frustrating days until I finally found a way to resolve this issue. PS: Since that day I also found out you can turn off the MDA (Debug -> Exceptions -> Managed Debug Assistants then uncheck the LoaderLock item).

          S Offline
          S Offline
          StevenWalsh
          wrote on last edited by
          #4

          OHHHH GOD!!! I had this same error... and it took me 5 days or working without the debugger (it works find if you don't run it in the debugger). I didn't relate the two together until i searched MSDN. A faster solution over rolling back the version, is to delete the keyboardcompatability.dll file, and replace it with a folder of the same name.

          P 1 Reply Last reply
          0
          • S StevenWalsh

            OHHHH GOD!!! I had this same error... and it took me 5 days or working without the debugger (it works find if you don't run it in the debugger). I didn't relate the two together until i searched MSDN. A faster solution over rolling back the version, is to delete the keyboardcompatability.dll file, and replace it with a folder of the same name.

            P Offline
            P Offline
            Psycho Coder Extreme
            wrote on last edited by
            #5

            Thanks for the tip, Ill try that as well (even though I already rolled back the version). It drove me nuts for days too.

            "Okay, I give up: which is NOT a real programming language????" Michael Bergman

            C 1 Reply Last reply
            0
            • P Psycho Coder Extreme

              Thanks for the tip, Ill try that as well (even though I already rolled back the version). It drove me nuts for days too.

              "Okay, I give up: which is NOT a real programming language????" Michael Bergman

              C Offline
              C Offline
              captxunderpants
              wrote on last edited by
              #6

              Thanks for posting. I hadn't noticed this problem yet, I don't have iTunes on my development machines anymore. Actually, I don't have it installed at all, anymore. I can't stand iTunes, or iPod for that matter. I gave my shuttle to my daughter because it annoyed me *that* much. I just want to copy .mp3 over to a USB device in Explorer. Why is that so hard for apple to do? Sometimes I wish "artistic" people would stay away from utility software development.

              1 Reply Last reply
              0
              • P Psycho Coder Extreme

                Recently I had iTunes open at work, listening to music as I was working, when I launched the application I was working on I got a "LoaderLock" error the first time I tried to hit any key in the application. Once I clicked OK like 9 times the application ran as normal and operated this way until I ended the session, changed/wrote some code, then launched again. This was baffling to say the least, a couple of us did massive Googling on the issue and found very little that could even remotely be causing the problem I was experiencing, and no one else working on the same application was experiencing this, and a simple reboot seemed to solve the problem (keep in mind after the reboot I had a habit of not re-starting application I had running, ie iTunes). After several days of this frustrating error I realized that the only time this occurred was when I had iTunes running at the same time as Visual Studio 2005, so I did some Googling on that assumtion and ran across many other developers having the same issue[^]. Part of the way through this thread is a posting from Liz - MSFT with this response:

                Hello all,

                We are sorry that you are experiencing problems when running iTunes 7.1 and VS 2005. Here is the results of our research:

                We noticed that iTunesKeyboardCompatibility.dll is causing the LoaderLock MDA to fire. The most likely reason is that the
                DLL entry point for this DLL is doing some non-trivial work which causes managed code to run. There are serious limits on
                what a DLL can do in the DLL entry point (i.e. DllMain()). For more information, you can refer to http://msdn2.microsoft.com/en-us/library/ms682583.aspx[^].

                This will need to be resolved by iTunes.

                Regards,

                Liz

                Since "Liz" states this has to be fixed on iTunes end the only workaround we have found is to uninstall iTunes 7.*.* and install iTunes 6.5 (since this issue doesn't seem to exist with 6.5). This was several frustrating days until I finally found a way to resolve this issue. PS: Since that day I also found out you can turn off the MDA (Debug -> Exceptions -> Managed Debug Assistants then uncheck the LoaderLock item).

                C Offline
                C Offline
                ChesterPoindexter
                wrote on last edited by
                #7

                Had the same problem and spent a couple of days tracking it down. I should know better ... no non-essential software on the development machine. Maybe in a VPC. As a note it seems to have an adverse affect on Ultramon as well. When I upgraded iTunes it went whacky. With iTunes out things are stable again. I'll pass on iAnything (tunes, pod, phone). Thomas

                Thomas

                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