Link to home
Start Free TrialLog in
Avatar of Zoppo
ZoppoFlag for Germany

asked on

BSCMAKE error BK1505

Hi everybody,

I'm just porting a huge solution (MFC, lot's of DLL subprojects) from VS 2008 to VS 2010, everything compiles and links fine normally, but from time to time the build stops with an error caused by BSCMAKE, something like this:

> BSCMAKE: error BK1505 : cannot read from file '.\Debug\Netlist.bsc'

This project 'Netlist' is quite large (about 400 files, the generated SBR files have about 3,5 GB all together allthough the generated BSC file is just about 11 KB which I think is strange too since in most other projects the BSC files are > 10 MB), but as told in general it builds fine but after some time working with it the error occurs.

The only way to resolve the error I found up to now is to delede the mentioned BSC file - then the next build gives an error like this:

> BSCMAKE : warning BK4502: truncated .SBR file '.\Debug\<filexy>.sbr' not in .\debug/Netlist.bsc
> BSCMAKE : error BK1513: nonincremental update requires all .SBR files


here <filexy> varies from time to time.

After this the next build compiles/links fine without any error.


I tried to find the reason and/or a way to workaround that annoying error which forces me to build the project three times with deleting the BSC file in between, but I cannot find any more info about this then:

> BSCMAKE cannot read from the file.
> To fix by checking the following possible causes
>  1. File corruption.
>  2. File truncation to the compiler running out of disk space or being interrupted while creating the .sbr file.

from http://msdn.microsoft.com/en-us/library/81k63w1e%28v=VS.100%29.aspx

I have enough free disk space, so this cannot be the cause - sometimes I interrupt the build process, but I don't think this is the cause since mostly the error occured even after I built some times without interrupting.

And, I never encountered the same problem with VS 2008 ...


I know I can avoid this problem by either disabling browse info at all (but I don't want to do this) or by passing the option '/n' to BSC make, but this will cause a full rebuild of browse info and this consumes quite a lot of time.

Now I want to ask if anyone of you had similar problems and probabyl found another workaround ...


Thanks in advance,

ZOPPO
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Does turning off the antivirus software during the build help ?
Avatar of Zoppo

ASKER

I'll try to reproduce it with deactivated antivirus software - but it may take a while since the problem isn't easy to reproduce.
Just a thought - I've had problems apparently with the anti virus locking a file that VS wanted at that instant.
There is another question, you AndyAinscow answered - something about the virtual memory. There is a proposal to modify the environment variables such as TEMP, TMP.
I had a problem like this one with VS 2005 (?) and the fix was to set TEMP and TMP on another drive.
The trick may not work now. I think, Microsoft, if you will ask them, will say that something wrong happens because of the multithreaded compilation. I do not use VS 2010 (because of IncrediBuild, it does not work in 2010). I can be wrong. It will take few seconds to check.

Avatar of Zoppo

ASKER

Thanks for the suggestisons - I'm still testing this, but unfortunateley I still didn't find a way to really reproduce it since as I wrote it only happens from time to time. Up to now I unfortunateley wasn't able to reproduce the mentioned 'BK1505' error, no matter if AV software is running or to which drive TMP/TEMP point to.

But just now I have another symptom which might be related: The build of the large project now ends up with this warning:
>> d:\programme\microsoft visual studio 10.0\vc\include\xtree(398): warning BK4504: file contains too many references; ignoring further references from this source

After this the project links fine, but all SBR files in the output directoy have the size 0 Bytes - I checked and found that before the last file finished compiling all the SBR files have valid sizes.


I go on trying to find a way to reproduce and/or a workaround - if I don't find one I will send a request to MS support, maybe they can anyhow help - I'll let you know ...
Avatar of ProtoDev
ProtoDev

Please do post a solution if you find one. I have exactly the same BK1505 problem, and it's preventing me from switching to VS2010.
I have been getting "BK4504: too many references" for years, and it has never caused any trouble, so it doesn't seem related to me.
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmmm.  Could be 0xFFFF or similar being overrun.

Well at last it now works.
Avatar of Zoppo

ASKER

Yes, something like this ...

BTW, do you know if this question goes into PAQ archive if I accept my last comment as solution? I never did that before ...
As far as I know it will do.
I reported the problem to Microsoft here: https://connect.microsoft.com/VisualStudio/feedback/details/595752/bk1505-error-during-c-build. They asked for more information but otherwise haven't responded yet.
Zoppo, could you please visit my bug report to Microsoft and click "I can too" next to "0 User(s) can reproduce this bug" to let them know I'm not the only one? Thanks!
I think you can follow this link:
https://connect.microsoft.com/VisualStudio/feedback/details/595752/bk1505-error-during-c-build
Avatar of Zoppo

ASKER

@ProtoDev: I did it ...