While running a solution in the IDE, stepped into some source code for a component not part of this project, causing the source code file to be loaded in the IDE. After stopping debugging, went to close all code windows in the IDE, when it got to the class file not belonging to this solution got this message:

JetBrains.Util.InternalErrorException: Attempted to retrieve document for invalid project file

at JetBrains.Util.InternalErrorException..ctor(String, Exception) in c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\InternalErrorException.cs:line 29 column 7
at JetBrains.Util.Logger.Fail(String) in c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135 column 5
at JetBrains.Util.Logger.Assert(Boolean, String) in c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 110 column 3
at JetBrains.ReSharper.Editor.Impl.DocumentManagerImpl.GetDocument(IProjectFile) in c:\Agent\work\Server\be08dc054b0f1225\src\DocumentManager\src\impl\DocumentManagerImpl.cs:line 72 column 7
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnUnregisterTextBuffer(UInt32) in c:\Agent\work\Server\be08dc054b0f1225\src\VSAddin\src\Editor\VSDocumentManager.cs:line 474 column 11
at JetBrains.ReSharper.Editor.VSIntegration.c__DisplayClass11.]]>b__f() in c:\Agent\work\Server\be08dc054b0f1225\src\VSAddin\src\Editor\VSDocumentManager.cs:line 836 column 27
at JetBrains.UI.Shell.UIApplicationShell.InvokePendingActions() in c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.UI\src\Shell\UIApplicationShell.cs:line 267 column 15
at JetBrains.UI.Shell.UIApplicationShell.InvokeReentrantSafe(Action) in c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.UI\src\Shell\UIApplicationShell.cs:line 549 column 5
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.QueueAction(Action) in c:\Agent\work\Server\be08dc054b0f1225\src\VSAddin\src\Editor\VSDocumentManager.cs:line 991 column 9
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnBeforeLastDocumentUnlock(UInt32, UInt32, UInt32, UInt32) in c:\Agent\work\Server\be08dc054b0f1225\src\VSAddin\src\Editor\VSDocumentManager.cs:line 828 column 9

at JetBrains.Util.Logger.Fail(String messageText) in c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135

Hello Grant,

we received this error a number of times but are still lacking a reliable
way to repeat it. Could you please try to check if the problem is repeatable
for you?

Thanks.

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

While running a solution in the IDE, stepped into some source code for
a component not part of this project, causing the source code file to
be loaded in the IDE. After stopping debugging, went to close all code
windows in the IDE, when it got to the class file not belonging to
this solution got this message:

JetBrains.Util.InternalErrorException: Attempted to retrieve document
for invalid project file

at JetBrains.Util.InternalErrorException..ctor(String, Exception) in
c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\
InternalErrorException.cs:line 29 column 7
at JetBrains.Util.Logger.Fail(String) in
c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\
Logger\Logger.cs:line 135 column 5
at JetBrains.Util.Logger.Assert(Boolean, String) in
c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\
Logger\Logger.cs:line 110 column 3
at
JetBrains.ReSharper.Editor.Impl.DocumentManagerImpl.GetDocument(IProje
ctFile) in
c:\Agent\work\Server\be08dc054b0f1225\src\DocumentManager\src\impl\Doc
umentManagerImpl.cs:line 72 column 7
at
JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnUnregiste
rTextBuffer(UInt32) in
tManager.cs:line 474 column 11
at
JetBrains.ReSharper.Editor.VSIntegration.<>c__DisplayClass11.<OnBefore
LastDocumentUnlock>b__f() in
tManager.cs:line 836 column 27
at JetBrains.UI.Shell.UIApplicationShell.InvokePendingActions() in
c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.UI\src\Sh
ell\UIApplicationShell.cs:line 267 column 15
at JetBrains.UI.Shell.UIApplicationShell.InvokeReentrantSafe(Action)
in
c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.UI\src\Sh
ell\UIApplicationShell.cs:line 549 column 5
at
JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.QueueAction
(Action) in
tManager.cs:line 991 column 9
at
JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnBeforeLas
tDocumentUnlock(UInt32, UInt32, UInt32, UInt32) in
tManager.cs:line 828 column 9
at JetBrains.Util.Logger.Fail(String messageText) in
c:\Agent\work\Server\be08dc054b0f1225\Platform\src\JetBrains.Util\src\
Logger\Logger.cs:line 135

I have been getting this also (submitted through the standard R# exception reporting route).

I can reliably repeat it if, as Grant says, the set of open docments in the IDE contains at least one file that is not in the solution.

E.G. I just opened a couple of files from one of the projects in my open solution, then also opened a Spring.NET .cs file (that is not a part of any project in my solution). Window > Close All causes this error to occur.

Hello James,

still no luck repeating it :( Could you please specify how exactly do you
open the file that is not a part of the solution:
via File|Open, via Windows Explorer or any other way?

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I have been getting this also (submitted through the standard R#
exception reporting route).

I can reliably repeat it if, as Grant says, the set of open docments
in the IDE contains at least one file that is not in the solution.

E.G. I just opened a couple of files from one of the projects in my
open solution, then also opened a Spring.NET .cs file (that is not a
part of any project in my solution). Window > Close All causes this
error to occur.

Its repeatable every time for me. Drag/drop a class file not belonging to the solution into the IDE with other windows belonging to the IDE open as well. Then switch back to a valid code window tab. then right-click close all and watch it blow up...

Grant.

Thanks a lot, I finally managed to repeat it. What turns out to be crucial
is to have 'Show Miscellaneous Files project' option enabled, but
'0' as the number of files saved in Misc Files project. These options are
located on the Tools|Options|Environment|Documents page. Could
you please confirm that these are also your settings?

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Its repeatable every time for me. Drag/drop a class file not belonging
to the solution into the IDE with other windows belonging to the IDE
open as well. Then switch back to a valid code window tab. then
right-click close all and watch it blow up...

Grant.

I actually get this bug quite often as well, and don't have either of
these options set.

Instead, I find that I hit this when I'm doing script debugging in Interenet
Explorer and open up a file not in the solution from the ScriptExplorer
window (which you can access from the Debug->Windows menu in Visual Studio).
You can repro this by creating and running a Website Project with Script
Debugging enabled in Internet Explorer, which allows you to browse the files
that Internet Explorer is running/executing. By choosing a file that's not
part of the solution -- say, the file called "localhost" (which is the
homepage of the Website) -- the rendered HTML file will appear in Visual
Studio. If you then immediately stop debugging while you're viewing that
file, R# goes Kaboom!

Hope this helps,

Donovan

"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a8945d20bd8c9a2a65bc0632e@news.intellij.net...

Thanks a lot, I finally managed to repeat it. What turns out to be crucial
is to have 'Show Miscellaneous Files project' option enabled, but
'0' as the number of files saved in Misc Files project. These options are
located on the Tools|Options|Environment|Documents page. Could you please
confirm that these are also your settings?

>

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>
>
>> Its repeatable every time for me. Drag/drop a class file not belonging
>> to the solution into the IDE with other windows belonging to the IDE
>> open as well. Then switch back to a valid code window tab. then
>> right-click close all and watch it blow up...
>>
>> Grant.
>>
>

I don't have the "Show Miscellaneous files" option ticked either.

Grant.

I don't have the "Show Miscellaneous files" option ticked either.

I am running R# 3.0.506.8

Here is my simplest way to repeat this error. I don't even need to open a solution or project:

1. Start VS 2005
2. Open any text file. I do File > Open and browse to "C:\Program Files\..." to open a Spring.NET .cs file
3. This causes VS to create a solution. The Solution Explorer contains a single node: Solution 'Solution1' (0 projects)
4. Select Window > Close All
5. BANG!:

c__DisplayClass11.b__f() in c:\Agent\work\Server\ReSharper-3.0.2\src\VSAddin\src\Editor\VSDocumentManager.cs:line 836 column 27
at JetBrains.UI.Shell.UIApplicationShell.InvokePendingActions() in c:\Agent\work\Server\ReSharper-3.0.2\Platform\src\JetBrains.UI\src\Shell\UIApplicationShell.cs:line 267 column 15
at JetBrains.UI.Shell.UIApplicationShell.InvokeReentrantSafe(Action) in c:\Agent\work\Server\ReSharper-3.0.2\Platform\src\JetBrains.UI\src\Shell\UIApplicationShell.cs:line 549 column 5
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.QueueAction(Action) in c:\Agent\work\Server\ReSharper-3.0.2\src\VSAddin\src\Editor\VSDocumentManager.cs:line 991 column 9
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnBeforeLastDocumentUnlock(UInt32, UInt32, UInt32, UInt32) in c:\Agent\work\Server\ReSharper-3.0.2\src\VSAddin\src\Editor\VSDocumentManager.cs:line 828 column 9

at JetBrains.Util.Logger.Fail(String messageText) in c:\Agent\work\Server\ReSharper-3.0.2\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135
]]>

I don't have the "Show Miscellaneous files" option ticked either.

I am running R# 3.0.506.8

Here is my simplest way to repeat this error. I don't even need to open a solution or project:

1. Start VS 2005
2. Open any text file. I do File > Open and browse to "C:\Program Files\..." to open a Spring.NET .cs file
3. This causes VS to create a solution. The Solution Explorer contains a single node: Solution 'Solution1' (0 projects)
4. Select Window > Close All
5. BANG!:

c__DisplayClass11.b__f() in c:\Agent\work\Server\ReSharper-3.0.2\src\VSAddin\src\Editor\VSDocumentManager.cs:line 836 column 27
at JetBrains.UI.Shell.UIApplicationShell.InvokePendingActions() in c:\Agent\work\Server\ReSharper-3.0.2\Platform\src\JetBrains.UI\src\Shell\UIApplicationShell.cs:line 267 column 15
at JetBrains.UI.Shell.UIApplicationShell.InvokeReentrantSafe(Action) in c:\Agent\work\Server\ReSharper-3.0.2\Platform\src\JetBrains.UI\src\Shell\UIApplicationShell.cs:line 549 column 5
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.QueueAction(Action) in c:\Agent\work\Server\ReSharper-3.0.2\src\VSAddin\src\Editor\VSDocumentManager.cs:line 991 column 9
at JetBrains.ReSharper.Editor.VSIntegration.VSDocumentManager.OnBeforeLastDocumentUnlock(UInt32, UInt32, UInt32, UInt32) in c:\Agent\work\Server\ReSharper-3.0.2\src\VSAddin\src\Editor\VSDocumentManager.cs:line 828 column 9

at JetBrains.Util.Logger.Fail(String messageText) in c:\Agent\work\Server\ReSharper-3.0.2\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 135
]]>