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. 64bit woes

64bit woes

Scheduled Pinned Locked Moved C#
csharpcomtestingbeta-testingarchitecture
3 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.
  • M Offline
    M Offline
    mav northwind
    wrote on last edited by
    #1

    Hi folks! I have a strange behaviour I cannot explain, perhaps someone who's deep into 64bit development can enlighten me? I have 2 applications written in C#: A main app (A) and an additional program for updates (U). When A is started and there's something to update, A starts U (using System.Diagnostics.Process) and quits. U in turn updates A's files and restarts A afterwards. So far, so simple. Worked for years (on 32bit Windows) without problems. Now recently while doing some testing on Win7RC 64bit I discovered that the automatic update fails. When there's something to update, Windows tells me after a while that U doesn't work anymore and kills it (leaving an exception in Kernelbase.dll in the event log). After some debugging I found that U hangs as soon as I try to show a non modal dialog containing at least one control (using new Form().Show(); showed the empty dialog OK and didn't hang). When I modified U's status dialog to add all controls inside its Load event and not already inside InitializeComponent(), the Updater hangs when I add the first control to the Form's Controls collection. :confused: A was compiled with x86 as target (because I need to use 32bit third-party COM objects) and U with AnyCPU (because it didn't have any specific external dependencies I thought it doesn't matter which processor architecture it's compiled for), thus running as 64bit application on a 64bit OS. After switching U to x86 as well it worked, but I still don't know why! With A being x86 and U being AnyCPU I can't even get a MessageBox to show (although the call to MessageBox.Show() doesn't hang the application). Unfortunately I don't have the faintest idea what's going on here. Does anyone have a clue?

    Thanks in advance, mav -- Black holes are the places where God divided by 0...

    L 1 Reply Last reply
    0
    • M mav northwind

      Hi folks! I have a strange behaviour I cannot explain, perhaps someone who's deep into 64bit development can enlighten me? I have 2 applications written in C#: A main app (A) and an additional program for updates (U). When A is started and there's something to update, A starts U (using System.Diagnostics.Process) and quits. U in turn updates A's files and restarts A afterwards. So far, so simple. Worked for years (on 32bit Windows) without problems. Now recently while doing some testing on Win7RC 64bit I discovered that the automatic update fails. When there's something to update, Windows tells me after a while that U doesn't work anymore and kills it (leaving an exception in Kernelbase.dll in the event log). After some debugging I found that U hangs as soon as I try to show a non modal dialog containing at least one control (using new Form().Show(); showed the empty dialog OK and didn't hang). When I modified U's status dialog to add all controls inside its Load event and not already inside InitializeComponent(), the Updater hangs when I add the first control to the Form's Controls collection. :confused: A was compiled with x86 as target (because I need to use 32bit third-party COM objects) and U with AnyCPU (because it didn't have any specific external dependencies I thought it doesn't matter which processor architecture it's compiled for), thus running as 64bit application on a 64bit OS. After switching U to x86 as well it worked, but I still don't know why! With A being x86 and U being AnyCPU I can't even get a MessageBox to show (although the call to MessageBox.Show() doesn't hang the application). Unfortunately I don't have the faintest idea what's going on here. Does anyone have a clue?

      Thanks in advance, mav -- Black holes are the places where God divided by 0...

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi mav,

      mav.northwind wrote:

      I have a strange behaviour

      You do? that is too bad. :omg: I don't think I can help you.

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      M 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi mav,

        mav.northwind wrote:

        I have a strange behaviour

        You do? that is too bad. :omg: I don't think I can help you.

        Luc Pattyn [Forum Guidelines] [My Articles]


        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


        M Offline
        M Offline
        mav northwind
        wrote on last edited by
        #3

        ;P Ok, saying that my applications are behaving strangely would be more appropriate :D

        Regards, mav -- Black holes are the places where God divided by 0...

        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