PDA

View Full Version : IMPORTANT! Things I don't understand and blocks my project



NewsArchive
07-13-2010, 01:35 AM
Hi Friedrich,

I'm really happy, that you give such a good support. This time, I have a
mystery thing, I don't understand, but I'm sure, you can help.

It's important, because it stops us from releasing a fix. I just added a
few lines of log writing and reimplement move files my own in script
(for the disappearing file problem - you know...) and now, my script
does something really crazy.

Here is a snippet form my movefiles.sbi:

==================== S N I P ==========================================

#include script "importsbhelperdll.sbi" from "[_PATH_INCLUDESCRIPTS]"

#set compiler variable [MOVEFILES_SOURCE] = "" [Custom Configuration]
Set Variable %VAL1% to "[MOVEFILES_SOURCE]"

#set compiler variable [MOVEFILES_TARGET] = "" [Custom Configuration]
Set Variable %VAL2% to "[MOVEFILES_TARGET]"

#set compiler variable [MOVEFILES_OVERWRITE] = "$FALSE$" [Custom
Configuration]
Set Variable %VAL3% to "[MOVEFILES_OVERWRITE]"

#include script "namespacestart.sbi" from "[_PATH_INCLUDESCRIPTS]"
[Custom Configuration]

Set Variable %[L]SOURCE% to "%VAL1%"
Set Variable %[L]TARGET% to "%VAL2%"
Set Variable %[L]OVERWRITE% to "%VAL3%"

! Define Variables
Set Variable %[L]_FILELIST% to ""
Set Variable %[L]_FILECOUNT% to ""
Set Variable %[L]_SOURCEFILE% to ""
Set Variable %[L]_SOURCEFOLDER% to ""
Set Variable %[L]_FILENAME% to ""
Set Variable %[L]_TARGETFILE% to ""
Set Variable %[L]_KERNEL32DLL% to ""
Set Variable %[L]_REMOVEOLDFILE% to ""
Set Variable %[L]_TEMPFILENAME% to ""
Set Variable %[L]_TEMPTEXT% to ""
Set Variable %[L]_BUFFERSIZE% to ""

Set Variable %[L]TARGET% to FUNCTION:Rslash(%[L]TARGET%)
Set Variable %[L]TARGET% to "%[L]TARGET%\"

Set Variable %[L]_SOURCEFOLDER% to FUNCTION:Extract Full Folder(%[L]SOURCE%)
Set Variable %[L]_SOURCEFOLDER% to FUNCTION:Rslash(%[L]_SOURCEFOLDER%)
Set Variable %[L]_SOURCEFOLDER% to "%[L]_SOURCEFOLDER%\"

#include script "writelog.sbi" from "[_PATH_INCLUDESCRIPTS]" [Custom
Configuration]

Set Variable %[L]_BUFFERSIZE% to "$_BUFFERSIZE$"
#include script "writelog.sbi" from "[_PATH_INCLUDESCRIPTS]" [Custom
Configuration]
Display Message Box "! ! ! ! ! ! ! ! ! ! ! VERWENDE SBHELPERDLL ! ! !
!..." -- ""
#msg "! ! ! ! ! ! ! ! ! ! ! VERWENDE SBHELPERDLL ! ! ! ! ! ! ! !"
Call DLL "%HANDLE_SBHELPERDLL%" -- Function "iFindFileFirst"
(*STRING,*STRING,*LONG) (%[L]SOURCE%,%[L]_FILENAME%,%[L]_BUFFERSIZE%)

==================== S N I P ==========================================



and here is a snippet of the importsbhelperdll.sbi

==================== S N I P ==========================================

#def IMPORTSBHELPERDLL = Increment by "1"
#ifdef IMPORTSBHELPERDLL Equals "1" Then
#include script "IncludeSupportFileInBin.sbi" from
"[_PATH_INCLUDESCRIPTS]" [Custom Configuration]
/* Set Variable %HANDLE_SBHELPERDLL% to FUNCTION:Load
DLL("%TMPDIR%\sbhelper.dll") */
#msg "! ! ! ! ! ! ! ! ! ! ! LADE SBHELPERDLL ! ! ! ! ! ! ! !"
Display Message Box "! ! ! ! ! ! ! ! ! ! ! LADE SBHELPERDLL ! ! ! ! !
!..." -- ""
Set Variable %HANDLE_SBHELPERDLL% to FUNCTION:Load DLL("C:\sbhelper.dll")
If %_SB_ERRORCODE% Equals "0" Then
#include script "erroroccured.sbi" from "[_PATH_INCLUDESCRIPTS]"
[Custom Configuration]
End
#include script "writelog.sbi" from "[_PATH_INCLUDESCRIPTS]" [Custom
Configuration]
#end

==================== S N I P ==========================================



and now, a snippte of my compileroutput.txt:

==================== S N I P ==========================================


==================== S N I P ==========================================

------ Build started: Project: DBUpdater.sb7, Configuration: Release
Win32 ------

------ SetupBuilder (tm) Project Script Compiler and Linker for Windows
------ Copyright (c) 1997-2010 Lindersoft
------ SetupScript (tm) Installation Script Language
------ Copyright (c) 2003-2010 Lindersoft
------ All rights reserved.

------ Developer Edition Version 7.2.3015
------ SetupBuilder EXE (SBEXE) Compiler Version: 7.2.3015

Release Type: AIDA5
Init Globals...
..
..
..
Continue (0:17:369): C:\Aidawin\Setup\Scripts\080_DBUpdater\DBUpdater.s b7
Recursive compile (0:369): C:\Aidawin\Setup\Scripts\Include\movefiles.sbi
movefiles.sbi
Recursive compile (1:21):
C:\Aidawin\Setup\Scripts\Include\importsbhelperdll .sbi
importsbhelperdll.sbi
Recursive compile (2:30):
C:\Aidawin\Setup\Scripts\Include\IncludeSupportFil eInBin.sbi
includesupportfileinbin.sbi
Continue (2:19:31): C:\Aidawin\Setup\Scripts\Include\importsbhelperdll .sbi
[! ! ! ! ! ! ! ! ! ! ! LADE SBHELPERDLL ! ! ! ! ! ! ! !]
Recursive compile (2:35): C:\Aidawin\Setup\Scripts\Include\erroroccured.sbi
erroroccured.sbi
Recursive compile (3:28):
C:\Aidawin\Setup\Scripts\Include\namespacestart.sb i
namespacestart.sbi
..
..
..
[* * * Stelle Namespace wieder her MOVEFILES - 2]
Continue (2:12:83): C:\Aidawin\Setup\Scripts\Include\writelog.sbi
Continue (1:18:63): C:\Aidawin\Setup\Scripts\Include\movefiles.sbi
[! ! ! ! ! ! ! ! ! ! ! VERWENDE SBHELPERDLL ! ! ! ! ! ! ! !]
Recursive compile (1:66): C:\Aidawin\Setup\Scripts\Include\erroroccured.sbi
erroroccured.sbi
Recursive compile (2:28):
C:\Aidawin\Setup\Scripts\Include\namespacestart.sb i
namespacestart.sbi
[* * * Rette Namespace MOVEFILES - 2]
[* * * Starte Namespace ERROROCCURED]
..
..
..
Continue (1:18:141): C:\Aidawin\Setup\Scripts\Include\movefiles.sbi
Continue (0:18:377): C:\Aidawin\Setup\Scripts\080_DBUpdater\DBUpdater.s b7
Script(s) processed
Generating Code...
Finished generating code
Building executable...
Approx. Stub size: 63,793 bytes
Linking kernel...
Code size: 132,677 bytes
Generating and optimizing [1031] string resources [@2]...
Linking [1031] language resource(s)...
Code size: 4,301 bytes
Linking dialog side bitmap...
Code size: 33,174 bytes
Linking dialog top bitmap...
Code size: 1,320 bytes
Including 1 service file(s)...
Compressing service file: C:\Program Files (x86)\Lindersoft\SetupBuilder
7 Developer\bin32\0001.lib
Code size: 936 bytes
Calculating Feature and Type sizes...
Resolving compiler variables...
Analyzing installation script (protection mode)...
Linking installation script...
Code size: 51,248 bytes
Linking loader...
Inject main setup icon... C:\AidaWin\Setup\SupportFiles\aidaicon.ico
Compile Version Resource...
Adding VERSIONINFO:LangID 0407
Code size: 55,296 bytes
Linking decompression library...
Code size: 9,387 bytes
Adding Digital Certificate...
Code signed successfully

--------------------------------------- Done
---------------------------------------

DBUpdater.sb7 - DBUpdater V05.16.16.10272.exe - 0 error(s), 0 warning(s)

Total file(s) : 144
Total data size: 117,240,941 bytes (111.81 MB)
Total .exe size: 14,643,088 bytes (13.96 MB)

Location: C:\Aidawin\Setup\Scripts\TempOut\DBUpdater V05.16.16.10272.exe

Compilation Time: 244.25 sec.
Date/Time: 7/12/2010 -- 6:36:36PM

------------------------------- Compilation finished
-------------------------------

Processing post compilation tasks...
Copying (wildcard)... C:\Aidawin\Setup\Scripts\TempOut\*.* to
C:\AidaWin\Setup\Out\
OK

--------------------------------------- Done
---------------------------------------

==================== S N I P ==========================================


As you can see in the compiler output, the "LADE SBHELPERDLL" comes
before "VERWENDE SBHELPERDLL".

But if I execute this. "LADE SBHELPERDLL" will never seen. This causes
the call after "VERWENDE SBHELPERDLL" to crash.


What can I do to find the problem. I'm trying since friday and can't
find the reason or a solution.

Thanks in advance.

Markus

NewsArchive
07-13-2010, 01:36 AM
Hi Friedrich

I've tested a few additional things. It seems, there is something wrong
with "#def" and / or "#ifdef".

If I change my script a little bit (add an additional Messagebox,
comment out some lines, add additional "#ifdef DEBUG" end "#end" lines,
and something like that), I see different things:

- SB crahes randomly at compile time (but every time at the same address)
- A Part of the script seems not to be included (at leat, it will not be
executed at runtime)
- SB never stops compiling and it seems, it is an infinite loop.

I can't reproduce all this behaviours at will, but I really need your
support. At this time, SB loops since more than 40 Minutes while
compiling. Tomorrow I will see, what the result will be.

Perhaps, it is a silent buffer overrun at compile time.

Because this problems only appears with complex scripts, I don't know,
how you could reproduce the problems without to have my complete
environment.

Thanks in advance.

Markus

NewsArchive
07-13-2010, 01:37 AM
Hi Markus,

Unfortunately, there is not enough data there to go on from what you
reported, but I think it's caused by some kind of stack corruption.

I think it's project specific and it is nearly impossible for us to
reproduce it without a script :-( So a small compilable project (if
possible) would be great.

Friedrich

NewsArchive
07-14-2010, 01:34 AM
Hi Friedrich,

you've got mail.

Markus

NewsArchive
07-14-2010, 01:35 AM
Hi Markus,

>
> you've got mail.
>

Not received yet.

Friedrich

NewsArchive
07-14-2010, 01:35 AM
Re-sent from my private account.

Markus

NewsArchive
07-14-2010, 01:37 AM
Received from your company email address. Project and video downloaded. To
be on the safe side, I have opened a ticket so it will not get lost.

Friedrich

NewsArchive
07-14-2010, 01:38 AM
Thank you for your feedback.

I continue building the environment to reproduce the "main" problem.

Markus

NewsArchive
07-14-2010, 01:38 AM
BTW, the GPF comes from the Microsoft Authenticode tool. There is nothing
we can do to fix this :-( It happens if the password is wrong and/or if
certificate files can't be found.

Your script does not GPF here on our machines, but Jane reported similar
things some time ago.

Signtool.exe does not cause such problems (as far as I can tell).

I still have your ticket open (not to fix the above because it's
"unfixable") but to make sure your main problem can be reviewed if you find
a way to reproduce it.

Thanks,
Friedrich

NewsArchive
07-14-2010, 01:39 AM
http://www.lindersoft.com/forums/showthread.php?p=35540

Friedrich

NewsArchive
07-14-2010, 01:39 AM
Hi Friedrich,

I see something different. Try the following:

Under "Tools-> Options" on the "File Locations" Tab, set the SignCode
Location to a file, that NOT exists.

Example:

C:\Program Files (x86)\Lindersoft\SetupBuilder 7
Developer\Lib\MichGibtEsNicht.exe

And now, try to compile my script. On my machine (clean Windows install,
only used for the tests today), it crashes.

As you can see, signcode.exe can't be the guilty, because it's not called.

What do you think?

Markus

NewsArchive
07-14-2010, 01:40 AM
Hi Markus,

> Example:
>
> C:\Program Files (x86)\Lindersoft\SetupBuilder 7
> Developer\Lib\MichGibtEsNicht.exe
>
> And now, try to compile my script. On my machine (clean Windows install,
> only used for the tests today), it crashes.
>
> As you can see, signcode.exe can't be the guilty, because it's not called.
>
> What do you think?

Well, that's an interesting idea. We never tried this because it never
GPFed on any of our machines. Even your script does not GPF here (we tested
it on five different machines). I'll ask Jane to test the above scenario.

BTW, I made the above modification and set the SignCode Location to
C:\Program Files (x86)\Lindersoft\SetupBuilder 7
Developer\Lib\MichGibtEsNicht.exe. It did not GPF on two of our Windows 7
Ultimate machines and our Vista Ultimate machine :-(

Friedrich

NewsArchive
07-14-2010, 01:41 AM
And tested on my XP machine. No GPF :-(

Friedrich

NewsArchive
07-14-2010, 01:42 AM
Hi Markus,

> As you can see, signcode.exe can't be the guilty, because it's not called.
>
> What do you think?

It seems to me you have a machine that can reproduce this GPF at will.
Could you please test what happens if you use the #run compiler directive
(with the "Wait" option enabled) on a file that does not exist. Does it
also GPF?

Thank you for your help.

Friedrich

NewsArchive
07-14-2010, 01:42 AM
This doesn't crash.

BTW: The code signing crashes only, if you do exactly the steps shown in
the video. If you do somthing different (for example open another
project first), it doesn't crash.

It's a VM, you can access it via Microsoft Terminal Server, if you want
and can do what you want with it.

mstsc.exe /v:intern.aidaorga.de:33891

The user name is my setup builder serial number (only the 20 digits,
without the "-") and as password use "LinderSoft1" (without the quotes).

FYI: I still can't reproduce my main problem on the VM. Perhaps it's
related to the build machine. At the moment, we run intensive hardware
tests.

Markus

NewsArchive
07-14-2010, 01:43 AM
Hi Markus,

>
> This doesn't crash.
>

Very strange. I makes use of the very same function call.

> BTW: The code signing crashes only, if you do exactly the steps shown in
> the video. If you do somthing different (for example open another project
> first), it doesn't crash.

Yes, I followed the exact same steps, but no way :-( We'll leave the ticket
open to check this again.

> FYI: I still can't reproduce my main problem on the VM. Perhaps it's
> related to the build machine. At the moment, we run intensive hardware
> tests.

Thank you. Please keep me posted.

Friedrich

NewsArchive
07-14-2010, 01:44 AM
BTW, in your case, we can skip the launch of the code-signing tool if the
certificate files can't be located to avoid the GPF. But if the password is
incorrect, the timestamp server is unreachable or another code-signing error
occurs, it will again GPF on your machine.

Friedrich

NewsArchive
07-15-2010, 01:42 AM
Hi Friedrich,

It seems there were three different problems.

1.) The Problem with the not loaded DLL was a very strange logical error
in my script.

2.) The endless compile problem is gone, since we restarted the build
machine after the hardware tests (hardware was OK)

3.) The random GPFs seems to be a common problem, but nobody had
reported it till now, because it's mostly impossible to reproduce.

Thanks for your support.

Markus

NewsArchive
07-15-2010, 01:44 AM
That also crashed on my machine the first time I tried it.

A quick flash of a GPF window and then that and SB disappeared.

I'll play some more, but here are a few screen shots.

The fourth time, I had my finger on the PrintScreen button and was able to
catch the window before it spontaneously closed.

Vista Ultimate 64-bit with a certain amount of junk (outlook, outlook
express, word, etc.) also running.

jf

NewsArchive
07-15-2010, 01:45 AM
clicked Send before I was ready with the preceding post.

Jane Fleming

NewsArchive
07-15-2010, 01:46 AM
Jane,

Perfect. Thanks for checking this!

I have a script now where it GPF when I close the IDE (after the
"MichGibtEsNicht.exe" code-signing error). It does not GPF after the
compilation process. So there is definitely something going wrong here.
I'll not touch this machine until I am back from vacation.

Friedrich

NewsArchive
07-15-2010, 01:47 AM
Good news.

Should I send you my HyperV-VM or should I leave the machine online, so
you can access it remote?

Markus

NewsArchive
07-15-2010, 01:47 AM
Hi Markus,

> Good news.
>
> Should I send you my HyperV-VM or should I leave the machine online, so
> you can access it remote?

Thanks for the offer! But we can reproduce this GPF at will on a XP machine
here. Seems to be some kind of threading issue that corrupts the stack.
The ticket is open and we'll work on it when we are back...

Thanks again!

Friedrich

NewsArchive
07-15-2010, 01:48 AM
Jane,

Was this after you got a compiler error? I sometimes get GPFs then, but not
always. I've never gathered enough useful information to send to Fredrich.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
07-15-2010, 01:48 AM
Russ,

The Event Viewer shots were after the first GPF which I induced by giving SB
a nonexistent name for the signtool exe (following on Markus' steps outlined
a few posts earlier).

SB crashed and closed quickly. It took me a few tries with my finger
hovering over the PrintScreen button to be able to capture the shot of the
compiler output with the GPF screen (in my second post) before it closed
itself.

jf