Chronic Logic

Pontifex => Problems => Topic started by: beaujob on October 24, 2001, 03:57:06 AM

Title: OH NO!  Where'd my bridge go!?
Post by: beaujob on October 24, 2001, 03:57:06 AM
I was putzing around in a custom level where I was attempting to make an extremely large suspension bridge, which due to the limitations of cable required that I have lots of the stuff, so of course, I had very large towers and a reinforced roadway and all the fixin's.

I god-moded the bridge to smithereenes, and only registered about 8000 broken links, but I venture to guess that there were a great deal more.

At any rate, after adding a couple more pieces of cable, I went back into test mode, and my level appeared to have only a couple cables dangling in midair!

I can only guess that whatever data structure was keeping track of my links got filled up and cycled back round.  Deleting the links that I could see in the editor and then going back into test mode made my whole bridge reappear.

Hmmm....

In case you think this is my fault, keep in mind that I have 256 MB of RAM and a 1.5 GB pagefile.  I don't think I'm running out of memory.  :)

Title: OH NO!  Where'd my bridge go!?
Post by: falkon2 on October 24, 2001, 05:34:46 AM
LOL Alex is probably kneeling and weeping in front of his monitor crying "Boo hoo hoo you people killed my baby"
Title: OH NO!  Where'd my bridge go!?
Post by: baggio on November 02, 2001, 08:23:18 AM
I had the same thing happen while building my colossal tower. I'm planning 16 stories, and I ran into the too many links problem on the 6th! Building has ground to a halt until the problem is fixed.

I have observered in the mean time, that while the links may be gone, the verticies are still there. What I mean is, in the edit screen, move the sun until it is night. Then when you test the "bridge" you will see the verticies suspended where links used to be.

The second thing I noticed that removing extranious cable, that wasn't really providing any support was not providing me with additional beams of steel. For that reason, I suspect that the limit may be on verticies, and not beams.

I hope this is a limitation that Alex lifts soon. If I don't have the building completed soon, I'll begin to owe the city money, and the workers are being paid, even if there aren't building materials. I had to pay them time and a half yesterday, it being halloween and all.

Title: OH NO!  Where'd my bridge go!?
Post by: Entroper on November 03, 2001, 08:14:51 PM
Yeah, 32-bit registers are cool.  Which is why I'm still confused on this one.  I keep trying to think of other things that could mess it up, because it seems like an artificial limit would be more likely to make the new links disappear than the old ones.
Title: OH NO!  Where'd my bridge go!?
Post by: beaujob on November 02, 2001, 10:05:40 PM
I do believe that this limitation is due to using stack memory to store beams.  This constrains the number of beams to roughly 16000, give or take.  It's a simple matter to instead store beams on the heap.
Title: OH NO!  Where'd my bridge go!?
Post by: Entroper on November 02, 2001, 10:44:32 PM
Thanks for giving me credit for the stack thing, beaujob.  :P  But anyway, that's interesting that all the vertices are still there.

My theory is that links are allocated dynamically, but that there's an array of pointers to link objects which overflows at around 16,000.  Interestingly, pointers are 4 bytes, and 4x16,000 is roughly the size of a 'segment' in memory.  The stack used to be typically limited to a single segment due to interesting issues with x86.  :)  So that's why I thought it might have something to do with running out of stack space.  But it may have nothing at all to do with the stack, and just be a freak behavior of segments and such.  I don't think the array of links would be statically allocated.  :)

Title: OH NO!  Where'd my bridge go!?
Post by: baggio on November 03, 2001, 09:01:15 AM
Perhaps in the olden days of yore... In Windows, those limitations don't really exist though. I'm pretty certain that this is somehow and artificial limit, and not because of an archaic segmented memory problem. That was one of the reasons for dos extenders back before windows.

Anyone remember any programs that used Dos4gw?