Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-22-2008, 06:43 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Bad allocation error

Hi
I have got this error:

"Error firing vbld_StepDone event: Error in Step (VBScript) script code at Line 17, Column 1 (bad allocation)"

where the code referred in vbld_StepDone event is:
strLastStepOutput=Application.ExpandMacros("%LASTS TEP_OUTPUT%")

I checked and Application.Options.MaxStepOutputLength = 0
I checked and the output of last step is quite big,can this be the cause?
Any idea how to solve this issue?
Reply With Quote
  #2  
Old 07-22-2008, 07:25 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Re: Bad allocation error

Quote:
Originally posted by teognost
Hi
I have got this error:

"Error firing vbld_StepDone event: Error in Step (VBScript) script code at Line 17, Column 1 (bad allocation)"

where the code referred in vbld_StepDone event is:
strLastStepOutput=Application.ExpandMacros("%LASTS TEP_OUTPUT%")

I checked and Application.Options.MaxStepOutputLength = 0
I checked and the output of last step is quite big,can this be the cause?
Possibly. How long is the output?

Quote:
Any idea how to solve this issue?
Not sure, but you may need to set a limit on the output length. Please ZIP and send to support@kinook.com:
1) The info from Help | About | Install Info
2) A screen shot of System properties (Windows+Break)
3) A .bld file that we can build here which demonstrates the problem

Thanks.
Reply With Quote
  #3  
Old 07-22-2008, 07:58 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
I have sent an email with everything you requested.

Output is 12051 lines long.
Setting a limit to output length is not a good idea ,as I need to produce a report file containing differences between 2 files.
I use fc.exe in order to compare them:
fc.exe /LB1000 "C:\test\08.2.11.7\File.dis" "C:\test\08.2.11.12\File.dis"
In vbld_StepDone I create the diff file based on last step output:

Sub vbld_StepDone()

Dim strLastStepOutput
Wscript.Echo "******************************"
strLastStepOutput=Application.ExpandMacros("%LASTS TEP_OUTPUT%")
Wscript.Echo "******************************"
Dim strCurrDiffFileFullPath
strCurrDiffFileFullPath=Application.ExpandMacros(" %CURRENT_DIFF_FILE_FULLPATH%")
Wscript.Echo "Current difference file is:"&strCurrDiffFileFullPath

Const ForReading = 1
Const ForWriting = 2
Const ForAppend = 8
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile(strCurrDiffFileFullPath,forWriti ng,True)
oFile.Write strLastStepOutput
oFile.Close

End Sub

Is there any other way to create diff file without using
%LASTSTEP_OUTPUT%?
Reply With Quote
  #4  
Old 07-22-2008, 08:07 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Redirect the diff step's output to a file:

%DOSCMD% fc.exe /LB1000 "file1" "file2">%CURRENT_DIFF_FILE_FULLPATH%

and read program output from that file if also needed in the build log.
Reply With Quote
  #5  
Old 07-22-2008, 09:37 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
ok,I changed this way,it works now,tks!
However pls let me know if you found a solution for the situation when using LASTSTEP_OUTPUT in order to avoid that bad allocation error appearing in case of big outputs
I tried to limit the output to 100000 and there was no error so I guess the size of output caused the issues with bad allocation err.
Reply With Quote
  #6  
Old 07-22-2008, 11:22 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Testing on a box with 2GB RAM, the build eventually completes without any errors. You may need more memory and/or a Windows Scripting update. But redirecting the program output directly to a file is much faster.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 08:41 PM.


Copyright © 1999-2023 Kinook Software, Inc.