Jump to page: 1 2
Thread overview
VisualD: VisualDComServer.exe crashes frequently inside D_Parser.dll to stackoverflow.
May 01, 2015
Random D-user
May 03, 2015
Rainer Schuetze
May 03, 2015
Random D-user
May 06, 2015
Random D-user
May 06, 2015
Random D-user
May 08, 2015
Rainer Schuetze
May 08, 2015
Rainer Schuetze
May 09, 2015
Random D-user
May 10, 2015
Rainer Schuetze
May 25, 2015
Random D-user
May 25, 2015
Kagamin
May 25, 2015
qdgj
May 09, 2015
Kagamin
May 10, 2015
Rainer Schuetze
May 01, 2015
I've been toying around with my hobby project lately and VisualD parser often (randomly) crashes in the background (and popping crashed program dialog of course). So I decided to post this quick bug report on the off chance it helps to fix it.

My project compiles with latest DMD 2.067.1 without errors or warnings, but it uses quite a bit of legacy d1.0 idioms, since I just ported to 2.0 recently.

For Visual D I've been using v0.3.41 beta 1 and 2. MSVC2013 shell.

Launching visual studio debugger on crash gives:

An unhandled exception of type 'System.StackOverflowException' occurred in D_Parser.dll

>	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)	
 	D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)	
 	D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)	
 	D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)	
 	D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)	
 	D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)	
 	D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)	
 	D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)	
 	D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)	
 	D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()	
 	D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)	

...
May 03, 2015
Seems like it is recursing endlessly while generating a string representation of some code, maybe a tool tip.

Can you reduce the relevant code that triggers this and post it here?

Rainer

On 01.05.2015 09:26, Random D-user wrote:
> I've been toying around with my hobby project lately and VisualD parser
> often (randomly) crashes in the background (and popping crashed program
> dialog of course). So I decided to post this quick bug report on the off
> chance it helps to fix it.
>
> My project compiles with latest DMD 2.067.1 without errors or warnings,
> but it uses quite a bit of legacy d1.0 idioms, since I just ported to
> 2.0 recently.
>
> For Visual D I've been using v0.3.41 beta 1 and 2. MSVC2013 shell.
>
> Launching visual studio debugger on crash gives:
>
> An unhandled exception of type 'System.StackOverflowException' occurred
> in D_Parser.dll
>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>> t, bool pretty)
>       D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>
>      D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>       D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>
>      D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>       D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>
>      D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>       D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>
>      D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>       D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>
>      D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>
> ...
May 03, 2015
Thans for reply.

Unfortunately I don't have a clue what it's parsing when it crashes. It pretty much just randomly crashes (suddenly pops crash dialog (typically after 10 to 30 min)) as I'm typing code. I really haven't seen any crashes directly after attempting to use autocomplete, goto definition etc.

My codebase size is 15K+ loc, so isolating the crash is not trivial.

Is there any kind of log, debug message etc. for the visuald parser?
It would really help if I knew what type it was parsing when it crashed.

On Sunday, 3 May 2015 at 13:55:05 UTC, Rainer Schuetze wrote:
>
> Seems like it is recursing endlessly while generating a string representation of some code, maybe a tool tip.
>
> Can you reduce the relevant code that triggers this and post it here?
>
> Rainer
>
> On 01.05.2015 09:26, Random D-user wrote:
>> I've been toying around with my hobby project lately and VisualD parser
>> often (randomly) crashes in the background (and popping crashed program
>> dialog of course). So I decided to post this quick bug report on the off
>> chance it helps to fix it.
>>
>> My project compiles with latest DMD 2.067.1 without errors or warnings,
>> but it uses quite a bit of legacy d1.0 idioms, since I just ported to
>> 2.0 recently.
>>
>> For Visual D I've been using v0.3.41 beta 1 and 2. MSVC2013 shell.
>>
>> Launching visual studio debugger on crash gives:
>>
>> An unhandled exception of type 'System.StackOverflowException' occurred
>> in D_Parser.dll
>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>> t, bool pretty)
>>      D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>      D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>      D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>      D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>      D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>
>>     D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>
>> ...

May 06, 2015
I've been playing more with this and it seems that now my msvc2013 shell also crashes from time to time. But I think it only crashes after VisualDComServer.exe has crashed first.

So, it looks like the issue might be editor/visuald trying to build a "data tip" on mouse hover.
That would match your tool tip guess. And I guess this could also explain why it's so random, since the mouse cursor probably just randomly hovers on top of some code while I type.

Perhaps I just need to bite the bullet and try to build visualDComParser myself so that I can debug what's wrong with it. (no promises though :))

Anyway, the msvc2013 crash exception is:

-$exception	{System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.VisualStudio.TextManager.Interop.IVsTextViewFilter.GetDataTipText(TextSpan[] pSpan, String& pbstrText)
at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession session, TextSpan[] dataBufferTextSpan, String& tipText)
at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession session, IList`1 qiContent, ITrackingSpan& applicableToSpan)
at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()
at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()
at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e)
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnHoverTimer(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
...

On Sunday, 3 May 2015 at 14:26:22 UTC, Random D-user wrote:
> Thans for reply.
>
> Unfortunately I don't have a clue what it's parsing when it crashes. It pretty much just randomly crashes (suddenly pops crash dialog (typically after 10 to 30 min)) as I'm typing code. I really haven't seen any crashes directly after attempting to use autocomplete, goto definition etc.
>
> My codebase size is 15K+ loc, so isolating the crash is not trivial.
>
> Is there any kind of log, debug message etc. for the visuald parser?
> It would really help if I knew what type it was parsing when it crashed.
>
> On Sunday, 3 May 2015 at 13:55:05 UTC, Rainer Schuetze wrote:
>>
>> Seems like it is recursing endlessly while generating a string representation of some code, maybe a tool tip.
>>
>> Can you reduce the relevant code that triggers this and post it here?
>>
>> Rainer
>>
>> On 01.05.2015 09:26, Random D-user wrote:
>>> I've been toying around with my hobby project lately and VisualD parser
>>> often (randomly) crashes in the background (and popping crashed program
>>> dialog of course). So I decided to post this quick bug report on the off
>>> chance it helps to fix it.
>>>
>>> My project compiles with latest DMD 2.067.1 without errors or warnings,
>>> but it uses quite a bit of legacy d1.0 idioms, since I just ported to
>>> 2.0 recently.
>>>
>>> For Visual D I've been using v0.3.41 beta 1 and 2. MSVC2013 shell.
>>>
>>> Launching visual studio debugger on crash gives:
>>>
>>> An unhandled exception of type 'System.StackOverflowException' occurred
>>> in D_Parser.dll
>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>> t, bool pretty)
>>>     D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>     D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>     D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>     D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>     D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>
>>>    D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>
>>> ...

May 06, 2015
I went through hovering all the symbols and it turns out that the bindings in Derelict lib actually trigger the crash.
From there I managed to quickly do a small repro case that crashes for me in completely new empty visuald project:

module mytest;

int function(uint) TestCase;
TestCase test;

class TestClass
{
    this()
    {
        test(); // <--- hover on this
    }
}


On Wednesday, 6 May 2015 at 14:36:52 UTC, Random D-user wrote:
> I've been playing more with this and it seems that now my msvc2013 shell also crashes from time to time. But I think it only crashes after VisualDComServer.exe has crashed first.
>
> So, it looks like the issue might be editor/visuald trying to build a "data tip" on mouse hover.
> That would match your tool tip guess. And I guess this could also explain why it's so random, since the mouse cursor probably just randomly hovers on top of some code while I type.
>
> Perhaps I just need to bite the bullet and try to build visualDComParser myself so that I can debug what's wrong with it. (no promises though :))
>
> Anyway, the msvc2013 crash exception is:
>
> -$exception	{System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
> at Microsoft.VisualStudio.TextManager.Interop.IVsTextViewFilter.GetDataTipText(TextSpan[] pSpan, String& pbstrText)
> at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession session, TextSpan[] dataBufferTextSpan, String& tipText)
> at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession session, IList`1 qiContent, ITrackingSpan& applicableToSpan)
> at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()
> at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()
> at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e)
> at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()
> at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnHoverTimer(Object sender, EventArgs e)
> at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
> ...
>
> On Sunday, 3 May 2015 at 14:26:22 UTC, Random D-user wrote:
>> Thans for reply.
>>
>> Unfortunately I don't have a clue what it's parsing when it crashes. It pretty much just randomly crashes (suddenly pops crash dialog (typically after 10 to 30 min)) as I'm typing code. I really haven't seen any crashes directly after attempting to use autocomplete, goto definition etc.
>>
>> My codebase size is 15K+ loc, so isolating the crash is not trivial.
>>
>> Is there any kind of log, debug message etc. for the visuald parser?
>> It would really help if I knew what type it was parsing when it crashed.
>>
>> On Sunday, 3 May 2015 at 13:55:05 UTC, Rainer Schuetze wrote:
>>>
>>> Seems like it is recursing endlessly while generating a string representation of some code, maybe a tool tip.
>>>
>>> Can you reduce the relevant code that triggers this and post it here?
>>>
>>> Rainer
>>>
>>> On 01.05.2015 09:26, Random D-user wrote:
>>>> I've been toying around with my hobby project lately and VisualD parser
>>>> often (randomly) crashes in the background (and popping crashed program
>>>> dialog of course). So I decided to post this quick bug report on the off
>>>> chance it helps to fix it.
>>>>
>>>> My project compiles with latest DMD 2.067.1 without errors or warnings,
>>>> but it uses quite a bit of legacy d1.0 idioms, since I just ported to
>>>> 2.0 recently.
>>>>
>>>> For Visual D I've been using v0.3.41 beta 1 and 2. MSVC2013 shell.
>>>>
>>>> Launching visual studio debugger on crash gives:
>>>>
>>>> An unhandled exception of type 'System.StackOverflowException' occurred
>>>> in D_Parser.dll
>>>>
>>>>>  D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>>> t, bool pretty)
>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor vis)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType t)
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType t, bool pretty)
>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>
>>>>   D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol t)
>>>>
>>>> ...

May 08, 2015
Thanks for reducing it to a reproducible test case (I can confirm the stack overflow). I've reported a bug here: https://github.com/aBothe/D_Parser/issues/191

Alex is usually very fast fixing these issues ;-)


On 06.05.2015 16:57, Random D-user wrote:
> I went through hovering all the symbols and it turns out that the
> bindings in Derelict lib actually trigger the crash.
>  From there I managed to quickly do a small repro case that crashes for
> me in completely new empty visuald project:
>
> module mytest;
>
> int function(uint) TestCase;
> TestCase test;
>
> class TestClass
> {
>      this()
>      {
>          test(); // <--- hover on this
>      }
> }
>
>
> On Wednesday, 6 May 2015 at 14:36:52 UTC, Random D-user wrote:
>> I've been playing more with this and it seems that now my msvc2013
>> shell also crashes from time to time. But I think it only crashes
>> after VisualDComServer.exe has crashed first.
>>
>> So, it looks like the issue might be editor/visuald trying to build a
>> "data tip" on mouse hover.
>> That would match your tool tip guess. And I guess this could also
>> explain why it's so random, since the mouse cursor probably just
>> randomly hovers on top of some code while I type.
>>
>> Perhaps I just need to bite the bullet and try to build
>> visualDComParser myself so that I can debug what's wrong with it. (no
>> promises though :))
>>
>> Anyway, the msvc2013 crash exception is:
>>
>> -$exception    {System.AccessViolationException: Attempted to read or
>> write protected memory. This is often an indication that other memory
>> is corrupt.
>> at
>> Microsoft.VisualStudio.TextManager.Interop.IVsTextViewFilter.GetDataTipText(TextSpan[]
>> pSpan, String& pbstrText)
>> at
>> Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession
>> session, TextSpan[] dataBufferTextSpan, String& tipText)
>> at
>> Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession
>> session, IList`1 qiContent, ITrackingSpan& applicableToSpan)
>> at
>> Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()
>>
>> at
>> Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()
>>
>> at
>> Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object
>> sender, MouseHoverEventArgs e)
>> at
>> Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()
>>
>> at
>> Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnHoverTimer(Object
>> sender, EventArgs e)
>> at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
>> ...
>>
>> On Sunday, 3 May 2015 at 14:26:22 UTC, Random D-user wrote:
>>> Thans for reply.
>>>
>>> Unfortunately I don't have a clue what it's parsing when it crashes.
>>> It pretty much just randomly crashes (suddenly pops crash dialog
>>> (typically after 10 to 30 min)) as I'm typing code. I really haven't
>>> seen any crashes directly after attempting to use autocomplete, goto
>>> definition etc.
>>>
>>> My codebase size is 15K+ loc, so isolating the crash is not trivial.
>>>
>>> Is there any kind of log, debug message etc. for the visuald parser?
>>> It would really help if I knew what type it was parsing when it crashed.
>>>
>>> On Sunday, 3 May 2015 at 13:55:05 UTC, Rainer Schuetze wrote:
>>>>
>>>> Seems like it is recursing endlessly while generating a string
>>>> representation of some code, maybe a tool tip.
>>>>
>>>> Can you reduce the relevant code that triggers this and post it here?
>>>>
>>>> Rainer
>>>>
>>>> On 01.05.2015 09:26, Random D-user wrote:
>>>>> I've been toying around with my hobby project lately and VisualD
>>>>> parser
>>>>> often (randomly) crashes in the background (and popping crashed
>>>>> program
>>>>> dialog of course). So I decided to post this quick bug report on
>>>>> the off
>>>>> chance it helps to fix it.
>>>>>
>>>>> My project compiles with latest DMD 2.067.1 without errors or
>>>>> warnings,
>>>>> but it uses quite a bit of legacy d1.0 idioms, since I just ported to
>>>>> 2.0 recently.
>>>>>
>>>>> For Visual D I've been using v0.3.41 beta 1 and 2. MSVC2013 shell.
>>>>>
>>>>> Launching visual studio debugger on crash gives:
>>>>>
>>>>> An unhandled exception of type 'System.StackOverflowException'
>>>>> occurred
>>>>> in D_Parser.dll
>>>>>
>>>>>>
>>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>>>>
>>>>>> t, bool pretty)
>>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor
>>>>> vis)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>>> t, bool pretty)
>>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor
>>>>> vis)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>>> t, bool pretty)
>>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor
>>>>> vis)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>>> t, bool pretty)
>>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DelegateCallSymbol.Accept(D_Parser.Resolver.IResolvedTypeVisitor
>>>>> vis)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.AcceptType(D_Parser.Resolver.AbstractType
>>>>> t)
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.GenerateCode(D_Parser.Resolver.AbstractType
>>>>> t, bool pretty)
>>>>>    D_Parser.dll!D_Parser.Resolver.AbstractType.ToString()
>>>>>
>>>>> D_Parser.dll!D_Parser.Resolver.DTypeToCodeVisitor.VisitDelegateCallSymbol(D_Parser.Resolver.DelegateCallSymbol
>>>>> t)
>>>>>
>>>>> ...
>
May 08, 2015

On 08.05.2015 11:23, Rainer Schuetze wrote:
> Thanks for reducing it to a reproducible test case (I can confirm the
> stack overflow). I've reported a bug here:
> https://github.com/aBothe/D_Parser/issues/191
>
> Alex is usually very fast fixing these issues ;-)

Indeed, he is. Should be fixed in the new pre-release:

https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.41-beta3


>
>
> On 06.05.2015 16:57, Random D-user wrote:
>> I went through hovering all the symbols and it turns out that the
>> bindings in Derelict lib actually trigger the crash.
>>  From there I managed to quickly do a small repro case that crashes for
>> me in completely new empty visuald project:
>>
>> module mytest;
>>
>> int function(uint) TestCase;
>> TestCase test;
>>
>> class TestClass
>> {
>>      this()
>>      {
>>          test(); // <--- hover on this
>>      }
>> }
>>
May 09, 2015
I did some quick testing and the crash seems to be gone.

Thanks a lot.

Also, while I was testing I noticed couple new minor bugs:

struct MyStruct(T)
{
    T foo()
    {
        return def;
    }

    void foo( T var )
    {
        def = var;
    }

    T def;
}

int fun()
{
    MyStruct!(float) a;
    auto b = a.foo;         // BUG: hover on b --> "auto b" should be "float b" (note it does work with when only getter is provided)
    auto c = a.foo();       // this works ok. above should be same

    foreach( i ; 0..1 )     // BUG: hover on i --> "i" should be "int i"
    {
        i = i;
    }

    return 0;
}

On Friday, 8 May 2015 at 21:10:58 UTC, Rainer Schuetze wrote:
>
>
> On 08.05.2015 11:23, Rainer Schuetze wrote:
>> Thanks for reducing it to a reproducible test case (I can confirm the
>> stack overflow). I've reported a bug here:
>> https://github.com/aBothe/D_Parser/issues/191
>>
>> Alex is usually very fast fixing these issues ;-)
>
> Indeed, he is. Should be fixed in the new pre-release:
>
> https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.41-beta3
>
>
>>
>>
>> On 06.05.2015 16:57, Random D-user wrote:
>>> I went through hovering all the symbols and it turns out that the
>>> bindings in Derelict lib actually trigger the crash.
>>> From there I managed to quickly do a small repro case that crashes for
>>> me in completely new empty visuald project:
>>>
>>> module mytest;
>>>
>>> int function(uint) TestCase;
>>> TestCase test;
>>>
>>> class TestClass
>>> {
>>>     this()
>>>     {
>>>         test(); // <--- hover on this
>>>     }
>>> }

May 09, 2015
On Friday, 8 May 2015 at 21:10:58 UTC, Rainer Schuetze wrote:
> Indeed, he is. Should be fixed in the new pre-release:
>
> https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.41-beta3
>
>> module mytest;
>>
>> int function(uint) TestCase;
>> TestCase test;
>>
>> class TestClass
>> {
>>      this()
>>      {
>>          test(); // <--- hover on this
>>      }
>> }

It's an invalid code, though. Maybe an error should reported for it instead of some type info?
May 10, 2015
On 09.05.2015 13:45, Random D-user wrote:
> I did some quick testing and the crash seems to be gone.
>
> Thanks a lot.
>
> Also, while I was testing I noticed couple new minor bugs:

These issues are best reported directly at https://github.com/aBothe/D_Parser/issues


>
> struct MyStruct(T)
> {
>      T foo()
>      {
>          return def;
>      }
>
>      void foo( T var )
>      {
>          def = var;
>      }
>
>      T def;
> }
>
> int fun()
> {
>      MyStruct!(float) a;
>      auto b = a.foo;         // BUG: hover on b --> "auto b" should be
> "float b" (note it does work with when only getter is provided)
>      auto c = a.foo();       // this works ok. above should be same
>
>      foreach( i ; 0..1 )     // BUG: hover on i --> "i" should be "int i"
>      {
>          i = i;
>      }
>
>      return 0;
> }
>
> On Friday, 8 May 2015 at 21:10:58 UTC, Rainer Schuetze wrote:
>>
>>
>> On 08.05.2015 11:23, Rainer Schuetze wrote:
>>> Thanks for reducing it to a reproducible test case (I can confirm the
>>> stack overflow). I've reported a bug here:
>>> https://github.com/aBothe/D_Parser/issues/191
>>>
>>> Alex is usually very fast fixing these issues ;-)
>>
>> Indeed, he is. Should be fixed in the new pre-release:
>>
>> https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.41-beta3
>>
>>
>>
>>>
>>>
>>> On 06.05.2015 16:57, Random D-user wrote:
>>>> I went through hovering all the symbols and it turns out that the
>>>> bindings in Derelict lib actually trigger the crash.
>>>> From there I managed to quickly do a small repro case that crashes for
>>>> me in completely new empty visuald project:
>>>>
>>>> module mytest;
>>>>
>>>> int function(uint) TestCase;
>>>> TestCase test;
>>>>
>>>> class TestClass
>>>> {
>>>>     this()
>>>>     {
>>>>         test(); // <--- hover on this
>>>>     }
>>>> }
>
« First   ‹ Prev
1 2