Saving XML file in VS 2008 on x64 with R# 3.1 throws OOM

I have VS 2008 on Vista x64 with R# 3.1. When I save an XML file (app.config or some such) in VS, the document instantly closes. When I attach to VS using another instance of VS debugger, it appears that saving the doc is causing an OutOfMemory exception in R#.

This is really annoying as it makes it imossible to work with XML files in VS. Is there any way to disable R# for XML files until this is fixed?

Thanks,
--Oren

7 comments
Comment actions Permalink

Hello Oren,

could you please check if there is any stack trace for the OOM exception
in the debugger? Thanks.


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


I have VS 2008 on Vista x64 with R# 3.1. When I save an XML file
(app.config or some such) in VS, the document instantly closes. When
I attach to VS using another instance of VS debugger, it appears that
saving the doc is causing an OutOfMemory exception in R#.

This is really annoying as it makes it imossible to work with XML
files in VS. Is there any way to disable R# for XML files until this
is fixed?

Thanks,
--Oren



0
Comment actions Permalink

From an attached VS instance set to catch on throw -- also, I've attached the log file which shows this an another unrelated exception about the format of the SDK version (v6.0A):

> ntdll.dll!_ZwWaitForSingleObject@12() + 0x15 bytes
kernel32.dll!_WaitForSingleObjectEx@12() + 0x8f bytes
ntdll.dll!ExecuteHandler2@20() + 0x26 bytes
ntdll.dll!ExecuteHandler@20() + 0x24 bytes
ntdll.dll!_KiUserExceptionDispatcher@8() + 0xf bytes
kernel32.dll!_RaiseException@16() + 0x59 bytes

JetBrains.VSAddin.dll!JetBrains.VSAddin.ActionManagement.VSIntegration.DataRules.GetPopupWindowContext(EnvDTE.Window window = {System.__ComObject}) Line 140 + 0x9 bytes C#
JetBrains.VSAddin.dll!JetBrains.VSAddin.ActionManagement.VSIntegration.DataRules.GetActivePopupWindowContext() Line 131 + 0xa bytes C#
JetBrains.VSAddin.dll!JetBrains.VSAddin.ActionManagement.VSIntegration.DataRules.OnSelectionChanged(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierOld = {System.__ComObject}, uint itemidOld = 39890880, Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISOld = null, Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCOld = {Microsoft.XmlEditor.XmlDocumentProperties}, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierNew = null, uint itemidNew = 4294967295, Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISNew = null, Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCNew = {Microsoft.XmlEditor.XmlDocumentProperties}) Line 237 + 0x8 bytes C#

msenv.dll!CVsMonSel::NotifySelCtxChange() + 0x56fa5 bytes
msenv.dll!CVsSelCtx::OnSelectChangeEx() + 0x122 bytes
msenv.dll!CDockObjSite::HrReleaseDoc() + 0x6f bytes
msenv.dll!CPane::CloseFrame() + 0x11f bytes
msenv.dll!HrCloseItem() + 0x70 bytes
msenv.dll!CSolution::CloseSolutionElement() + 0x2b69d bytes
msenv.dll!CVsDocument::Close() + 0x1bb bytes

Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.Package.ConnectionManager.FindOrCreateConfig(EnvDTE.Project project, string configFileName, string configItemTemplate, bool createConfig) + 0x291 bytes
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.Package.ConnectionManager.FindOrCreateAppConfig(EnvDTE.Project project, bool createConfig) + 0x9d bytes
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.Package.ConnectionManager.GetConfigFilePath(EnvDTE.Project project, bool createConfig) + 0x79 bytes
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.Package.ConnectionManager.ExtractConnStringsIntoHash(EnvDTE.Project project = {System.__ComObject}, bool createConfig) + 0x54 bytes
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.Package.ConnectionManager.OnAfterSaveFile(object sender, Microsoft.Data.Entity.Design.VisualStudio.Package.ModelChangeEventArgs args) + 0xbf bytes
Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualStudio.Package.ModelChangeEventListener.OnAfterSave(uint docCookie) + 0x23 bytes

msenv.dll!CRunningDocTable::Impl::NotifyOnAfterSave() + 0x5f bytes
msenv.dll!CRunningDocTable::NotifyOnAfterSave() + 0x2f bytes
msenv.dll!CSaveTreeItem::HrSave() + 0x38e bytes
msenv.dll!CSaveTreeItem::HrSave() + 0x6b bytes
msenv.dll!CSaveTree::SaveChanges() + 0x397e0 bytes
msenv.dll!CSaveTree::PromptSaveChanges() + 0x68 bytes
msenv.dll!HrPromptSaveItem() + 0xb9 bytes
msenv.dll!CRunningDocTable::Impl::SaveDocuments() + 0x30004 bytes
msenv.dll!CRunningDocTable::SaveDocuments() + 0x37 bytes
msenv.dll!HrExecSaveEx() + 0x5ed bytes
msenv.dll!HrShellExec() - 0x4a89 bytes
msenv.dll!CVSCommandTarget::ExecCmd() + 0xbe4 bytes
msenv.dll!FTranslateAcceleratorEx() + 0x11951d bytes
msenv.dll!FTranslateAccelerator() + 0x49 bytes
msenv.dll!MainFTranslateMessage() + 0xcd bytes
msenv.dll!CMsoComponent::FPreTranslateMessage() + 0x47 bytes
msenv.dll!SCM_MsoStdCompMgr::FPreTranslateMessage() + 0x55 bytes
msenv.dll!EnvironmentMsgLoop() + 0x8f bytes
msenv.dll!CMsoCMHandler::FPushMessageLoop() + 0x36 bytes
msenv.dll!SCM::FPushMessageLoop() + 0x4f bytes
msenv.dll!SCM_MsoCompMgr::FPushMessageLoop() + 0x28 bytes
msenv.dll!CMsoComponent::PushMsgLoop() + 0x28 bytes
msenv.dll!VStudioMainLogged() + 0x19b bytes
msenv.dll!_VStudioMain() + 0x7d bytes
devenv.exe!util_CallVsMain() + 0xd8 bytes
devenv.exe!CDevEnvAppId::Run() + 0x5cb bytes
devenv.exe!_WinMain@16() + 0x60 bytes
devenv.exe!License::GetPID() - 0x4cf9 bytes
kernel32.dll!@BaseThreadInitThunk@12() + 0xe bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x23 bytes



Attachment(s):
JetBrainsLog.2008-01-08T06-57-00.devenv#6616.log
0
Comment actions Permalink

Hello Oren,

it looks like the OOM exception you're seeing is not actually an indication
of a memory exhaustion problem. In the stack
trace you posted, the OOM exception is expected by ReSharper (and not reported
to the user), since it's just a poor handling of an error COM HResult
in the .NET Interop layer (for some reason COM / .NET Interop maps an erroneous
COM HResult to an OutOfMemoryException). By itself, this shouldn't cause
any real troubles.

Does the original problem (that the document inadvertently closes when saving)
happen with any file of a specific type (e.g. with any app.config)
or only with a particular file? Does it happen always?

Thanks.

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


From an attached VS instance set to catch on throw -- also, I've
attached the log file which shows this an another unrelated exception
about the format of the SDK version (v6.0A):

>> ntdll.dll!_ZwWaitForSingleObject@12() + 0x15 bytes
>>

kernel32.dll!_WaitForSingleObjectEx@12() + 0x8f bytes
ntdll.dll!ExecuteHandler2@20() + 0x26 bytes
ntdll.dll!ExecuteHandler@20() + 0x24 bytes
ntdll.dll!_KiUserExceptionDispatcher@8() + 0xf bytes
kernel32.dll!_RaiseException@16() + 0x59 bytes


JetBrains.VSAddin.dll!JetBrains.VSAddin.ActionManagement.VSIntegration
.DataRules.GetPopupWindowContext(EnvDTE.Window window =
{System.__ComObject}) Line 140 + 0x9 bytes C#

JetBrains.VSAddin.dll!JetBrains.VSAddin.ActionManagement.VSIntegration
.DataRules.GetActivePopupWindowContext() Line 131 + 0xa bytes C#

JetBrains.VSAddin.dll!JetBrains.VSAddin.ActionManagement.VSIntegration
.DataRules.OnSelectionChanged(Microsoft.VisualStudio.Shell.Interop.IVs
Hierarchy pHierOld = {System.__ComObject}, uint itemidOld = 39890880,
Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISOld =
null, Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCOld
= {Microsoft.XmlEditor.XmlDocumentProperties},
Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierNew = null,
uint itemidNew = 4294967295,
Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISNew =
null, Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCNew
= {Microsoft.XmlEditor.XmlDocumentProperties}) Line 237 + 0x8 bytes C#

msenv.dll!CVsMonSel::NotifySelCtxChange() + 0x56fa5 bytes
msenv.dll!CVsSelCtx::OnSelectChangeEx() + 0x122 bytes
msenv.dll!CDockObjSite::HrReleaseDoc() + 0x6f bytes
msenv.dll!CPane::CloseFrame() + 0x11f bytes
msenv.dll!HrCloseItem() + 0x70 bytes
msenv.dll!CSolution::CloseSolutionElement() + 0x2b69d bytes
msenv.dll!CVsDocument::Close() + 0x1bb bytes


Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualSt
udio.Package.ConnectionManager.FindOrCreateConfig(EnvDTE.Project
project, string configFileName, string configItemTemplate, bool
createConfig) + 0x291 bytes

Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualSt
udio.Package.ConnectionManager.FindOrCreateAppConfig(EnvDTE.Project
project, bool createConfig) + 0x9d bytes

Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualSt
udio.Package.ConnectionManager.GetConfigFilePath(EnvDTE.Project
project, bool createConfig) + 0x79 bytes

Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualSt
udio.Package.ConnectionManager.ExtractConnStringsIntoHash(EnvDTE.Proje
ct project = {System.__ComObject}, bool createConfig) + 0x54 bytes

Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualSt
udio.Package.ConnectionManager.OnAfterSaveFile(object sender,
Microsoft.Data.Entity.Design.VisualStudio.Package.ModelChangeEventArgs
args) + 0xbf bytes

Microsoft.Data.Entity.Design.dll!Microsoft.Data.Entity.Design.VisualSt
udio.Package.ModelChangeEventListener.OnAfterSave(uint docCookie) +
0x23 bytes

msenv.dll!CRunningDocTable::Impl::NotifyOnAfterSave() + 0x5f bytes
msenv.dll!CRunningDocTable::NotifyOnAfterSave() + 0x2f bytes
msenv.dll!CSaveTreeItem::HrSave() + 0x38e bytes
msenv.dll!CSaveTreeItem::HrSave() + 0x6b bytes
msenv.dll!CSaveTree::SaveChanges() + 0x397e0 bytes
msenv.dll!CSaveTree::PromptSaveChanges() + 0x68 bytes
msenv.dll!HrPromptSaveItem() + 0xb9 bytes
msenv.dll!CRunningDocTable::Impl::SaveDocuments() + 0x30004 bytes
msenv.dll!CRunningDocTable::SaveDocuments() + 0x37 bytes
msenv.dll!HrExecSaveEx() + 0x5ed bytes
msenv.dll!HrShellExec() - 0x4a89 bytes
msenv.dll!CVSCommandTarget::ExecCmd() + 0xbe4 bytes
msenv.dll!FTranslateAcceleratorEx() + 0x11951d bytes
msenv.dll!FTranslateAccelerator() + 0x49 bytes
msenv.dll!MainFTranslateMessage() + 0xcd bytes
msenv.dll!CMsoComponent::FPreTranslateMessage() + 0x47 bytes
msenv.dll!SCM_MsoStdCompMgr::FPreTranslateMessage() + 0x55 bytes
msenv.dll!EnvironmentMsgLoop() + 0x8f bytes
msenv.dll!CMsoCMHandler::FPushMessageLoop() + 0x36 bytes
msenv.dll!SCM::FPushMessageLoop() + 0x4f bytes
msenv.dll!SCM_MsoCompMgr::FPushMessageLoop() + 0x28 bytes
msenv.dll!CMsoComponent::PushMsgLoop() + 0x28 bytes
msenv.dll!VStudioMainLogged() + 0x19b bytes
msenv.dll!_VStudioMain() + 0x7d bytes
devenv.exe!util_CallVsMain() + 0xd8 bytes
devenv.exe!CDevEnvAppId::Run() + 0x5cb bytes
devenv.exe!_WinMain@16() + 0x60 bytes
devenv.exe!License::GetPID() - 0x4cf9 bytes
kernel32.dll!@BaseThreadInitThunk@12() + 0xe bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x23 bytes



0
Comment actions Permalink

It seems to always happen with config files, but only if a sln is open. If I open a clean instance of VS and open the config file, I can save it fine. I do have Entity Framework bits installed and it does appear on the stack trace; is there some conflict there?

0
Comment actions Permalink

Hello Oren,

I'm not sure the Entiry Framework is related to the problem, but we'll check
it. So aren't there any other exceptions beyond the OOM
you mentioned? Thanks.


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


It seems to always happen with config files, but only if a sln is
open. If I open a clean instance of VS and open the config file, I
can save it fine. I do have Entity Framework bits installed and it
does appear on the stack trace; is there some conflict there?



0
Comment actions Permalink

I don't get any exception dialog from R#; the call stack from the attached debugger and the log file is all I get... if there's anything else I can do, please just let me know ...

0
Comment actions Permalink

Okay, I think it's releated to the EF. I uninstalled the EF Tools and Runtime and I no longer have the issue.

The specific bits I had:

Vista x64 with VS 2008 Team Suite RTM.
Entity Framework runtime and tools for the RTM Fx
R# 3.1


With that, when I had a solution open and oppened up an app.config file, when I saved, the window would close.

Not sure where the fault lies.... :)

0

Please sign in to leave a comment.