Solved

BSCMAKE error BK1505

Posted on 2010-08-25
13
5,477 Views
Last Modified: 2013-12-14
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
0
Comment
Question by:Zoppo
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 33548537
Does turning off the antivirus software during the build help ?
0
 
LVL 30

Author Comment

by:Zoppo
ID: 33558405
I'll try to reproduce it with deactivated antivirus software - but it may take a while since the problem isn't easy to reproduce.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 33558442
Just a thought - I've had problems apparently with the anti virus locking a file that VS wanted at that instant.
0
 
LVL 33

Expert Comment

by:pgnatyuk
ID: 33562028
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.

0
 
LVL 30

Author Comment

by:Zoppo
ID: 33575759
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 ...
0
 

Expert Comment

by:ProtoDev
ID: 33618516
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.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 30

Accepted Solution

by:
Zoppo earned 0 total points
ID: 33679570
Sorry for the long delay, I had some short vacation ...

I did ask MicroSoft support about this and they told the problem most probably is that an internal limit is reached (something about more than 64000 symbols in a SBR file). This (maybe due to a bug) IMO case causes all SBR files of the projects are set to size 0 KB - after this the next build fails with the BK1505.

The provided workaround is to turn the projects option 'Configuration Properties -> Browse Information -> General -> Preserver SBR files' to 'Yes' - I guess this may increase build time a bit (I didn't measure but MSDN tells this option does 'force a full build of the browse information file whether or not a .bsc file exists') but it solved my problems, my project now builds fine.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 33679577
Hmmm.  Could be 0xFFFF or similar being overrun.

Well at last it now works.
0
 
LVL 30

Author Comment

by:Zoppo
ID: 33679593
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 ...
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 33679602
As far as I know it will do.
0
 

Expert Comment

by:ProtoDev
ID: 33684228
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.
0
 

Expert Comment

by:ProtoDev
ID: 33696570
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
0
 
LVL 30

Author Comment

by:Zoppo
ID: 33699889
@ProtoDev: I did it ...
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now