Page 1 of 1

Debugger/Variable problem

Posted: Thu Jun 29, 2006 5:30 am
by Tinus
Hi,

in a Win32 project, I added these variables to the watch window:

SUCCESS
REMOVEOLD
LASTERROR

Then I stepped through. On a first time install all seems as expected.
But if a previous version has to be uninstalled I get some strange results.
Before

Code: Select all

Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)

gets called, SUCCESS is undefined, REMOVEOLD and LASTERROR are empty.

After the call I get
SUCCESS=ERROROLD
REMOVEOLD=SUCCESS
LASTERROR=

And then SUCCESS will never change and keeps the ERROROLD value.
Any assignment (like Apply Install) has no effect.
Is this a problem of the IDE/Debugger or of the runtime engine?

Posted: Thu Jun 29, 2006 6:08 am
by MichaelNesmith
SUCCESS is probably not defined yet in your project - is this the case?

Posted: Thu Jun 29, 2006 7:18 am
by Tinus
Yes, at that place SUCCESS is not defined (it's a standard Win32 template project) and the
debugger watch window shows correctly "Variable not defined". But after that call SUCCESS is
displayed with ERROROLD! Other undefined variables get not changed in this way.

I noticed this because I first had one breakpoint at Apply Install and tried to reuse SUCCESS.
Everytime I had to uninstall my previous version SUCCESS showed ERROROLD and
didn't changed any more. So I started to step through to find the call with this return value!

I assume that it is a problem of the integrated debugger/watch window. The runtime debug
command shows that SUCCESS changes and behaves as expected. But the debugger still
shows ERROROLD and some times REPAIR.

And a final problem: After a couple of debug sessions (3-4) I get an runtime error in Script:
Line 681: Unable to obtain command headers, rebuild project.
Then I rebuild and a couple of debug sessions later... :(

Posted: Thu Jun 29, 2006 10:07 am
by MichaelNesmith
Hi Martin,

I'll log the issue with the variable.

As for the other error - this is normal. When you get this error, it means you have to rebuild your project, because the MSI has fallen out of sync with the editor code.