www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Visual D expanding invalid arrays crashes visual studio

reply Amex <Amex gmail.com> writes:
Usually one would get some warning box but now it just crashes. 
May be a new bug for VS2019.

These arrays may be "valid" in some sense but have very large 
lengths.
Jun 10 2019
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 10/06/2019 10:54, Amex wrote:
 Usually one would get some warning box but now it just crashes. May be a
 new bug for VS2019.
 
 These arrays may be "valid" in some sense but have very large lengths.
I've hit that, too. Probably needs a limit on how many elements get expanded. C++ does that, too, at 1_000_000.
Jun 12 2019
parent reply Amex <Amex gmail.com> writes:
On Wednesday, 12 June 2019 at 07:31:15 UTC, Rainer Schuetze wrote:
 On 10/06/2019 10:54, Amex wrote:
 Usually one would get some warning box but now it just 
 crashes. May be a new bug for VS2019.
 
 These arrays may be "valid" in some sense but have very large 
 lengths.
I've hit that, too. Probably needs a limit on how many elements get expanded. C++ does that, too, at 1_000_000.
I think it should be much smaller, one really doesn't want to see more than 100 elements or so.. hell, even 50 might be too much(maybe have it configurable). but I have an alternative: How about creating some visualizers? If the type is a struct or class just "pretty print" the members? (probably just take the first level to avoid too much work) If it is a array also have it pretty print... sorta like the memory window if the type is a primitive... if it is a struct or class array can then print using one but print a few of the elements. I routinely use the memory window to investigate arrays and even sometimes structs and classes... Would be much faster if I could just see their contents with a click on the magnifier like I can with strings.
Jun 13 2019
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 14/06/2019 07:34, Amex wrote:
 On Wednesday, 12 June 2019 at 07:31:15 UTC, Rainer Schuetze wrote:
 On 10/06/2019 10:54, Amex wrote:
 Usually one would get some warning box but now it just crashes. May
 be a new bug for VS2019.

 These arrays may be "valid" in some sense but have very large lengths.
I've hit that, too. Probably needs a limit on how many elements get expanded. C++ does that, too, at 1_000_000.
I think it should be much smaller, one really doesn't want to see more than 100 elements or so.. hell, even 50 might be too much(maybe have it configurable).
Implemented in https://github.com/dlang/visuald/releases/tag/v0.50.0-beta3 with a default limit of 1000. The last element is a slice of the remainder.
 
 but I have an alternative:
 
 How about creating some visualizers?
 
 If the type is a struct or class just "pretty print" the members?
 (probably just take the first level to avoid too much work)
 
 If it is a array also have it pretty print... sorta like the memory
 window if the type is a primitive... if it is a struct or class array
 can then print using one but print a few of the elements.
 
 I routinely use the memory window to investigate arrays and even
 sometimes structs and classes...
 
 Would be much faster if I could just see their contents with a click on
 the magnifier like I can with strings.
 
I don't think it adds much over the quick watch, but loses the possibility of drilling into further expansions.
Jun 15 2019