www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - resize problem with arrays of arrays?

reply wade <swadenator gmail.com> writes:
Hi all,

Many apologies if this is the wrong forum, but I noticed that nobody has


I'm getting odd behavior with DMD 1.026 on both windows and linux when I
attempt to resize an array of arrays as in:

import std.stdio;

int main(char [][] args)
{
  fwritef(stderr, "starting...\n");
  int[int][] stacks;
  stacks.length = 30;
  fwritef(stderr, "done...\n");
  return 0;
}

This code never gets to the "done..." writef.  I'm sure I'm probably doing
something wrong (newbie), but any help or advice would be appreciated.

thanks,

wade

PS, despite some hiccups, it's been a real pleasure to write some code in D...
definitely much nicer than c++!
Feb 06 2008
parent reply downs <default_357-line yahoo.de> writes:
Congratulations, you found a longstanding Phobos bug that should have been
fixed by now, given that I provided a patch for it four months back!
Now go grab a stick and hit a Phobos maintainer until he commits it.

Thanks.

 --downs, pissed off
Feb 06 2008
parent reply wade <swadenator gmail.com> writes:
Is there a patched version of phobos that fixes this bug elsewhere? 
Unfortunately, in Win32 I don't have the necessary tools to fully rebuild the
library from sources.

thanks,

wade


downs Wrote:

 Congratulations, you found a longstanding Phobos bug that should have been
fixed by now, given that I provided a patch for it four months back!
 Now go grab a stick and hit a Phobos maintainer until he commits it.
 
 Thanks.
 
  --downs, pissed off
Feb 06 2008
parent downs <default_357-line yahoo.de> writes:
wade wrote:
 Is there a patched version of phobos that fixes this bug elsewhere? 
Unfortunately, in Win32 I don't have the necessary tools to fully rebuild the
library from sources.
 
 thanks,
 
 wade
 
 
 downs Wrote:
 
 Congratulations, you found a longstanding Phobos bug that should have been
fixed by now, given that I provided a patch for it four months back!
 Now go grab a stick and hit a Phobos maintainer until he commits it.

 Thanks.

  --downs, pissed off
To be precise, we don't know what causes it. There's a way to work around the problem in the phobos sources, but apparently indefinitely postponed bug fixing is considered better than a quick band-aid. As was apparent from my post, I strongly disagree with that stance :) Anyway, not that I know of. Sorry. --downs
Feb 06 2008