R# 4.0 Build 729 - frequent VS silent exists when building

hello,
I've installed Build 729. Now, during a build, VS silently exits (without any exception or message). Not every time, but about once an hour. This seems to relate to R# Build 729, since it didn't happen before.

When I have no code windows open, it doesn't seem to happen. Maybe it has to do with the parser, trying to parse something while building?

Note that I have lots of LINQ constructs in my code which aren't supported yet by R#.

7 comments
Comment actions Permalink

Hello Urs,

the best way to diagnose such a problem would be to try running VS with debugger
attached for some time, and breaking on any non-handled exceptions enabled.
If a fatal exception occurs at some point, the debugger should break on it.


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


hello,
I've installed Build 729. Now, during a build, VS silently exits
(without any exception or message). Not every time, but about once an
hour. This seems to relate to R# Build 729, since it didn't happen
before.
When I have no code windows open, it doesn't seem to happen. Maybe it
has to do with the parser, trying to parse something while building?

Note that I have lots of LINQ constructs in my code which aren't
supported yet by R#.



0
Comment actions Permalink

when I do that, I get dozens of Exceptions during building, meaning I cannot build anything at all without having to press "continue" dozens of time. I'm willing to assist you with this problem - but can you give me some hints how to work around this? which exceptions are most like to show up just before a crash?

0
Comment actions Permalink

Hello Urs,

the reason you get many exceptions is that some exceptions are normal and
handled by ReSharper. Most likely the exception that causes a silent crash
as of sudden is a stack overflow.
It therefore makes sense to uncheck all checkboxes in the Exception dialog
except for System.StackOverflowException and try to debug in such a way.
I'm not 100% sure it will work,
since unfortunately CLR is quite reluctant to break on stack overflows, but
it is worth trying.

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


when I do that, I get dozens of Exceptions during building, meaning I
cannot build anything at all without having to press "continue" dozens
of time. I'm willing to assist you with this problem - but can you
give me some hints how to work around this? which exceptions are most
like to show up just before a crash?



0
Comment actions Permalink

Hello Dmtry,
I did what you told me and only intercepted StackOverflow Exception. But to no luck, VS still silently vanishes during build.
I saw that there are some messages posted in the event log when this happens:

Faulting application devenv.exe, version 9.0.21022.8, faulting module msvcr90.dll, version 9.0.21022.8, fault address 0x00065e53.

and

.NET Runtime version 2.0.50727.1433 - Fatal Execution Engine Error (79FFEE24) (80131506)

I checked all events in the event log: These types of events never occurred before I installed Build 729. So it is very likely that R# is the cause.

Regards,
Urs

0
Comment actions Permalink

it happened once more. this time I got a box which said "visual studio encountred an error", and I could press the "Debug" button.

I got the message:
Unhandled exception at 0x7c812a5b in devenv.exe: 0xC0020001: The string binding is invalid.

Stack trace looked like this:
kernel32.dll!7c812a5b()

kernel32.dll!7c812a5b()
user32.dll!7e41885a()
mscorwks.dll!7a106274()
mscorwks.dll!7a0a3cfb()
mscorwks.dll!79fd996a()
user32.dll!7e4318e3()
user32.dll!7e46ae04()
user32.dll!7e41b50c()
ntdll.dll!7c90eae3()
user32.dll!7e4193e9()
user32.dll!7e4193a8()
user32.dll!7e419402()
user32.dll!7e41929b()
msenv.dll!3b24a938()
msenv.dll!3b2b5b91()
msenv.dll!3b2b5b21()
msenv.dll!3b2b5abc()
msenv.dll!3b2b5a8b()
msenv.dll!3b208322()
msenv.dll!3b20810a()
msenv.dll!3b207ef9()
msenv.dll!3b207ebf()
user32.dll!7e418734()
user32.dll!7e418816()
user32.dll!7e41b4c0()
user32.dll!7e41b50c()
ntdll.dll!7c90eae3()
user32.dll!7e4194be()
user32.dll!7e41d890()
user32.dll!7e41b903()
msenv.dll!3b207e67()
csproj.dll!43b2f5ce()
csproj.dll!43b2ef73()
VssProvider.dll!45d6eef4()
VssProvider.dll!45d6ef94()
> msvcr90.dll!free(void * pBlock=0xce7c93be) Line 110 C
c5ffffff()

the debugger stopped in a file "free.c":
/***
*free.c - free an entry in the heap
*

  • Copyright (c) Microsoft Corporation. All rights reserved.

*
*Purpose:

  • Defines the following functions:

  • free() - free a memory block in the heap

*
*******************************************************************************/

#ifdef WINHEAP

#include <cruntime.h>
#include <malloc.h>
#include <winheap.h>
#include <windows.h>
#include <internal.h>
#include <mtdll.h>
#include <dbgint.h>
#include <rtcsup.h>

/***
*void free(pblock) - free a block in the heap
*
*Purpose:

  • Free a memory block in the heap.

*

  • Special ANSI Requirements:

*

  • (1) free(NULL) is benign.

*
*Entry:

  • void *pblock - pointer to a memory block in the heap

*
*Return:

  • <void>

*
*******************************************************************************/

void __cdecl freebase (void * pBlock)
{

int retval = 0;


if (pBlock == NULL)
return;

RTCCALLBACK(_RTC_Free_hook, (pBlock, 0));

#ifndef _WIN64
if ( __active_heap == __V6_HEAP )
{
PHEADER pHeader;

_mlock( HEAPLOCK );
__try {

if ((pHeader = __sbh_find_block(pBlock)) != NULL)
__sbh_free_block(pHeader, pBlock);

}
__finally {
_munlock( HEAPLOCK );
}

if (pHeader == NULL)
{
retval = HeapFree(_crtheap, 0, pBlock);
if (retval == 0)
{
errno = geterrno_from_oserr(GetLastError());
}
}

}
#ifdef CRTDLL
else if ( __active_heap == __V5_HEAP )
{
__old_sbh_region_t *preg;
__old_sbh_page_t * ppage;
__old_page_map_t * pmap;
mlock(HEAP_LOCK );
__try {

if ( (pmap = __old_sbh_find_block(pBlock, &preg, &ppage)) != NULL )
__old_sbh_free_block(preg, ppage, pmap);

}
__finally {
munlock(HEAP_LOCK );
}

if (pmap == NULL)
{
retval = HeapFree(_crtheap, 0, pBlock);
if (retval == 0)
{
errno = geterrno_from_oserr(GetLastError());
}

}
}
#endif /* CRTDLL */
else // __active_heap == __SYSTEM_HEAP
#endif /* _WIN64 */
{
retval = HeapFree(_crtheap, 0, pBlock);
if (retval == 0)
{
errno = geterrno_from_oserr(GetLastError());
}
}
}

#else /* WINHEAP */


#include <cruntime.h>
#include <heap.h>
#include <malloc.h>
#include <mtdll.h>
#include <stdlib.h>
#include <dbgint.h>

/***
*void free(pblock) - free a block in the heap
*
*Purpose:

  • Free a memory block in the heap.

*

  • Special Notes For Multi-thread: The non-multi-thread version is renamed

  • to freenolock(). The multi-thread free() simply locks the heap, calls

  • freenolock(), then unlocks the heap and returns.

*
*Entry:

  • void *pblock - pointer to a memory block in the heap

*
*Return:

  • <void>

*
*******************************************************************************/


void __cdecl freebase (
void *pblock
)
{
/* lock the heap
*/
mlock(HEAP_LOCK);

/* free the block
*/
freebase_nolock(pblock);

/* unlock the heap
*/
munlock(HEAP_LOCK);
}


/***
*void freenolock(pblock) - non-locking form of free
*
*Purpose:

  • Same as free() except that no locking is performed

*
*Entry:

  • See free

*
*Return:
*
*******************************************************************************/

void __cdecl freebase_nolock (


REG1 void *pblock
)
{
REG2 _PBLKDESC pdesc;


/*

  • If the pointer is NULL, just return .

*/

if (pblock == NULL)
return;

/*

  • Point to block header and get the pointer back to the heap desc.

*/

pblock = (char *)pblock - _HDRSIZE;
pdesc = (_PBLKDESC)pblock;

/*

  • Validate the back pointer.

*/

if (_ADDRESS(pdesc) != pblock)
heapabort();

/*

  • Pointer is ok. Mark block free.

*/

SETFREE(pdesc);

/*

  • Check for special conditions under which the rover is reset.

*/
if ( (_heap_resetsize != 0xffffffff) &&
(_heap_desc.proverdesc->pblock > pdesc->pblock) &&
(_BLKSIZE(pdesc) >= heapresetsize) )
{
heapdesc.proverdesc = pdesc;
}
else if ( heapdesc.proverdesc == pdesc->pnextdesc )
{
heapdesc.proverdesc = pdesc;
}
}

#endif /* WINHEAP */

there it stopped in line 110, which reads " retval = HeapFree(_crtheap, 0, pBlock);"

Hope that helps?!

PS. When I look at the stack trace, it seems to have something to do with the VSS Provider. I'm going to deactivate this, since I don't use VSS integration anyway. But still the problem remains: I never got errors like this with R#3.1 or any version before.

0
Comment actions Permalink

I still have the problem with the silent exit of VS. I had to remove build 729 because I kept having this problem with no solution (after all I still have some work to do). I reinstalled R#3.1, and the problem didn't occur again.

0
Comment actions Permalink

Hello,

it happened once more. this time I got a box which said "visual studio
encountred an error", and I could press the "Debug" button.

I got the message:
Unhandled exception at 0x7c812a5b in devenv.exe: 0xC0020001: The
string binding is invalid.
Stack trace looked like this:
kernel32.dll!7c812a5b()
[Frames below may be incorrect and/or missing, no symbols loaded for
kernel32.dll]
kernel32.dll!7c812a5b()
user32.dll!7e41885a()



In case the exception returns, could you please capture a stack trace with
symbols resolved, so that it included function names?


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.