64bit woes
-
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 itsLoad
event and not already insideInitializeComponent()
, the Updater hangs when I add the first control to the Form'sControls
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...
-
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 itsLoad
event and not already insideInitializeComponent()
, the Updater hangs when I add the first control to the Form'sControls
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...
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.
-
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.
;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...