PDA

View Full Version : SB 10 command line compiler "hangs"



NewsArchive
10-14-2015, 02:32 AM
Hi Friedrich,

I'm building a new build of Build Automator using the latest SB
version. I had forgotten to update the code signing info in the web
update install project and when I compiled it with the command line
compiler from BA it appeared to hang. Nothing happened. But if I hit
Esc it would close and BA would pick up the error log:

15:17:18.030 DEBUG SB Return Code = 1
15:18:03.254 ERROR Error compiling
"C:\Products\BuildAutomator\Latest\Build AutomatorWeb.sbp"
15:18:03.257 Warning Compiler warning GEN1061: File not
found:
15:18:03.261 ERROR Compiler error GEN1053: Code
signing process failed. Error Code: 1

I'm not sure what that 1061 is, but it's just a warning, so no big deal,
but it looks like it just stops the command line compiler.

I'm not sure if this happened in older versions or not... I don't
recall seeing this, but my memory is not the best;)

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
10-14-2015, 09:00 AM
Hi Arnor,

Hmmm, nothing changed in the compiler error handling so if it "hangs" in
SB10 then it would also do the same thing in all previous versions. But I
tested it with my nightly-build tool and I can't reproduce this on our
machines :-(

Your error log does not tell us where it happens. Does it happen in a
pre-processor? Would it be possible to post the original compiler.txt?

For example, when I let a pre-processor do a PFX code-signing and I forgot
to specify the .PFX then the SB log reports this:

---

Init Globals...
Set Media Type: Single-file image
OK
Writing Objects...
OK
Compiling...
Init Standard Variables...
Performing pre-checks...
OK
Timestamp server(s)...
SHA-1: http://timestamp.globalsign.com/scripts/timestamp.dll
SHA-2: http://timestamp.globalsign.com/scripts/timestamp.dll
Script format version detected: 7.0.2600
Recursive compile (0:24): Common Definitions.sbi
#pragma loaded: MINVER
Adding Digital Certificate (Preprocessor)...
SIGNTOOL: C:\return999.exe
SVER: 6.1.7600.16385
Compiler warning GEN1061: File not found:
SHA1: 1
Compiler error GEN1053: Code signing process failed. Error Code: 1
Script(s) processed

---

But it does not "hang" here. My nightly-build tool (written in Clarion)
receives the error (exit) code and then processes the compiler.txt log file.
Can you reproduce this issue at will?

Friedrich

NewsArchive
10-14-2015, 11:57 AM
Hi Friedrich,

> Hmmm, nothing changed in the compiler error handling so if it "hangs" in
> SB10 then it would also do the same thing in all previous versions. But I
> tested it with my nightly-build tool and I can't reproduce this on our
> machines :-(

OK, the problem wasn't with the code signing as such, but that the file
it was supposed to code sign didn't exist;)

I had made changes to the folder structure where I build the install and
had forgotten to change the location in the #codesign statement
accordingly. So the file was in something like:

C:\products\BuildAutomator\Latest\Program Files\Icetips
Alta\BuildAutomator.exe

but the #codesign pointed to:

C:\products\BuildAutomator\Latest\Program Files\Icetips\BuildAutomator.exe

Note the difference in "Icetips\Alta" and "Icetips" So the code signer
didn't find the file. The command line compiler just stopped there. I
could hit Esc twice and it would terminate. Maybe it waits for the file
to become available?

I haven't changed folder structures for my installs... well, since SB 4
or something like that, so this took me by surprise<g>

So the important thing there:

15:18:03.257 Warning Compiler warning GEN1061: File not
found:
15:18:03.261 ERROR Compiler error GEN1053: Code
signing process failed. Error Code: 1

was actually the warning, not the error;) But the command line compiler
just stopped there and waited...

Best regards,

--
Arnor Baldvinsson - Icetips Alta LLC

NewsArchive
10-15-2015, 01:53 AM
Hi Arnor,

> OK, the problem wasn't with the code signing as such, but that the file it
> was supposed to code sign didn't exist;)

When it links to a file (to be code-signed) that does not exist then it
displays an "error GEN1055: File not found or locked". It only displays
"Compiler warning GEN1061: File not found: " (with no file mentioned) if a
file name field is "empty" (e.g. code-signing certificate file or
signtool.exe file).

For example, when I link to a file (C:\return999_doesnogtexist.exe) that
does not exist, then error.txt looks like this:

---

Init Globals...
Set Media Type: Single-file image
OK
Writing Objects...
OK
Compiling...
Init Standard Variables...
Performing pre-checks...
OK
Timestamp server(s)...
SHA-1: http://timestamp.globalsign.com/scripts/timestamp.dll
SHA-2: http://timestamp.globalsign.com/scripts/timestamp.dll
Script format version detected: 7.0.2600
Recursive compile (0:24): Common Definitions.sbi
#pragma loaded: MINVER
Adding Digital Certificate (Preprocessor)...
SIGNTOOL: C:\return999_doesnogtexist.exe
SVER: 6.1.7600.16385
(26): error GEN1055: File not found or locked [@6]:
C:\return999_doesnogtexist.exe
Script(s) processed

---

So it's (IMO) definitely not caused by a file (to be code-signed) that does
not exist. It would report "error GEN1055" in this case (and not GEN1061).

But the compiler.txt should give us the exact cause for it (including script
line <g>).

Friedrich

NewsArchive
10-15-2015, 01:59 AM
Hi Friedrich,

> But the compiler.txt should give us the exact cause for it (including script
> line <g>).

What I posted came from the compiler.txt which BA picks up and includes
in it's own log.

I have been trying various ways to duplicate this but so far no success.
This must have been some one off combination or something. I can make
it fail by using a non existing path and it appears that IF the SB IDE
is open, the project is open and I run the BA action to compile the
compiler stops and waits, but now I was not able to close the window by
just hitting Esc.

So just forget about this as I cannot duplicate this and there must have
been some other things going on that I don't know what was...

If this happens again I will try to isolate the source of this - it
could be in BA for all I know:)

Best regards,

--
Arnor Baldvinsson - Icetips Alta LLC