DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

File open failure caused by Max Group ID overflow

Started by Dr PR, June 24, 2009, 08:18:31 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dr PR

DesignCAD V19.0
Vista 64 SP1

I worked on a file for a few hours last night, then saved it and shut down DesignCAD. Then I saved a copy of the file to a USB flash drive. A while later I turned off the machine.

This morning I turned on the machine, started DesignCAD V19.0, and tried to open the file. The program reported that it was unable to open the file, and left an odd assortment of blank windows on the screen. I shut down V19.0, restarted it and tried again to open the file. No Joy.

I shut down V19.0 and tried to open the file by right clicking on it and selecting "Open With" DC V19.0. It wouldn't open.

I shut down V19.0 and installed the flash drive. Then I tried to open the file from the flash drive by right clicking on it and selecting "Open With" DC V19.0. It wouldn't open.

I shut down V19.0 and then renamed the file. Then I renamed the .bak file to .dcd and tried to open the file by right clicking on it and selecting "Open With" DC V19.0. It wouldn't open.

Then I started good ole' reliable DesignCAD V15.3, selected the original renamed file and opened it. No problems. I saved the file under a new name and closed V15.3.

I then restarted V19.0 and opened the V15 file. It opened correctly.

*****

Has anyone else seen a problem like this?

It's just one more reason to keep DesignCAD V15.3 around. It is the only really reliable version of the program.




DesignCAD user since 1987

Rick V.

Dr PR,

One of those chilling reports...

I went from v19.0 to v19.1, but if you still have, and want to post the original file, I'll see if it opens on v19.1.

Sounds like whatever happened took place prior to the .bak file being written. I know you know about this, but did you try to open the original with the ignore drawing view data box checked?

You are so right about v15.3. I'll never let go of that one.

Dr PR

More ...

I edited the file a bit more, saved it, and shut down V19.0. Then I remembered something else and tried to open the file - "Failed to open document."

I opened the file in V15.3 and saved it (V15 format).

Then I opened the V15 file in V19.0, and the Status Bar was missing from the screen. I looked in "View/Show-Hide" and the Status Bar box was not checked. In 20+ years of working with DesignCAD I have NEVER deliberately disabled the Status Bar.

I edited the file a bit in V19.0,saved it, and then tried to open it again and got the "Failed" message again.

Again, I opened the file in V15.3 and all the newly added parts were there, so I saved it in V15.3 once again.

****

Next I switched to an XP Pro SP3 machine and tried to open the problem file (saved with V19.0) with V19.0. I got the same "Failed to open" message. Interestingly, the file wizard dialog showed the preview of the file before I opened it. After the open failed the Main, Front and Top windows were open and blank but the side window was missing (the space for it was there but no window). In the Status Bar (it was there this time) the file open progress bar was hung at 7%.

I tried to open the file again and DesignCAD reported that the file was already open! I selected "File/Close? and the program asked if I wanted to save the changes! I clicked "No" and all the empty windows disappeared, butthe Status Bar still showed the file open stuck at 7%.

I opened several other files successfully with V19.0 on the XP machine.

I decided to experiment a bit more with V19.0. After failing to open the file, but with the blank editing windows showing, I drew a line (V) - obviously DesignCAD thought that some file was open. Then I tried to use "Save As" to save the modified file. The program crashed and I got the Windows meassage "DesignCAD must close ... do you want to send an error report?". However, the DesignCAD window remained on the screen. I opened the Task manager and it showed two copies of V19.0 open! I selected one and told Task Manager to kill it, and both copies of V19.0 closed.

I tried to open the unopenable file again in V19.0. Then I looked at the Layers dialog and it showed only one layer that was not empty. It was enabled and unlocked, but nothing showed on the screen. I made this layer the active layer, but still nothing showed.

"Help/Drawing Info" reported

951 grid surface entities
497 planes

I tried various shading options and nothing showed.

Now it gets really weird! I tried gravity snapping to an object, and the cursor moved to something but nothing was selected. Then I dragged a selection box and something appeared. I dragged it around the screen an was able to "paint" an image of the things that were supposed to be on the layer!

****

Clearly, there is something about the file that totally screws up DesignCAD V19.0, and whatever it is was put into the file by V19.0.

This is just another example of screwed up files in the V18-V19 DesignCADs. Others are:

1. Solid Boolean operations on one solid screw up rendering of another (shading for the hidden side appears) and the file must be shut down and reopened to get it to render correctly.

2. Point number order in planes gets messed up and the plane no longer renders (the background shows through even if there are other planes/solids behind the invisible plane).

3. Shadows are projected toward the light source instead of away from it. Selecting the object that causes the shadow and reversing point order in the Info Box sometimes fixes this. CAUTION: this operation can cause other problems with solids. It is safest to explode the solid and try each plane/grid one at a time to find the culprit.

4. Occasionally, after a solid Boolean operation part of the resulting solid is moved to layer 1.

Personally, I think this screwed up file problem should be at the top of the list of bugs to be fixed. Nothing else should be done until this problem is found and corrected.

****

Now I have a file that was supposed to be the last part of a project, but it is unuseable. I don't dare copy any part of this file to another for fear that it will "infect" the new file and make all of that work unuseable. This is VERY bad!

DesignCAD user since 1987

herbertjackson

To me it sounds like the flash drive was removed, or the computer was just down before the file was completly saved. (depending on the computer, it will take longer to save to another drive other then the C drive.)

I also agree with keeping version 15.3 on the computer.

Dr PR

#4
hj,

I was working on a 500 Gb hard drive that is less than 10% full when the problem originally appeared. Likewise, on the XP machine I was working from a hard drive.

I just learned something new. I opened the file I saved from V15.3 in V15.3.

I ran the k34 macro and it reported no nested group entities removed - that's good, because there should be no nested groups.

Then I ran the gc.d3m macro to count groups:

Total Group Count = 53
Max Group ID = 65513

65513! This is right up there with the new Max Group ID number for V18-V19!

"Help/Drawing Info" reported:
Layers 5
Total Entities 18911
Total Points 164698
Arc/Circle Entity (1)
   Circle (1)
Curve Entity (1)
   Curve-Spline (1)
Grid Surface Entity (14326)
   Grid Header (805)
   Grid Line (13521)
Line (34)
Plane (4549)

File size = 7,733 Kbytes


****

This file is based upon an earlier file created in 2006. I opened it and ran gc.d3m:

Total Group Count = 90
Max Group ID = 226

"Help/Drawing Info" reported:
Layers 14
Total Entities 26505
Total Points 228532
Arc/Circle Entity (38)
   Arc (35)
   Circle (3)
Curve Entity (57)
   Curve-Spline (57)
Elliptical Arc/Ellipse Entity (11)
   Elliptical Arc (11)
Grid Surface Entity (17531)
   Grid Header (1018)
   Grid Line (16513)
Line (617)
Plane (8188)
Text Entity (63)
   2-D Text (63)

File size = 7,182 Kbytes

****

My recent modifications to this file consisted of deleting about 25% of the original and then adding no more than 20-30 new solids, planes and surfaces. At no time did I (knowingly) do anything that would create multiple copies of a group, and I added only 5 new groups to the file after deleting a bunch. So how did Max Group ID explode to 65513!?

Now I understand the problem. I had exactly the same problem in V17 when Max Group ID overflowed. The file became unopenable until I edited it in V15 to remove the most recent items (groups) I had created.

In this latest episode I started with 90 groups, deleted some, added 5 new groups and the Max Group ID went from 226 to 65513! Although the total number of entities went from 26505 in the original file to 18911 in the edited file, and every category of entity was reduced in number, the file size increased by 551 Kbytes. Clearly, V19.0 totally trashed the file. Bad Bug!

When DT changed the Max Group ID from 16000 to 65000 last year everyone thought that you couldn't possibly get a Max ID overflow. Wrong!

I will try to resurrect the drawing by copying to a new file to reset the Max Group ID and see if it works with V19.0.

****

I just used the Max ID restore procedure posted elsewhere (copy file contents to a new file with a single group in it) and:

I ran the gc.d3m macro to count groups:


Total Group Count = 54
Max Group ID = 107

"Help/Drawing Info" reported:
Layers 6
Total Entities 18911
Total Points 164698
Arc/Circle Entity (1)
   Circle (1)
Curve Entity (1)
   Curve-Spline (1)
Grid Surface Entity (14326)
   Grid Header (805)
   Grid Line (13521)
Line (34)
Plane (4549)

File size = 7,733 Kbytes

The resulting file characteristics are unchanged but now Max Group ID is a reasonable 107.

Note: if you copy and paste groups the Max Group ID increases by 2X the group count. If you Duplicate (N) the groups the Max Group ID increases by 1X the group count. This seems like another bug to me.

I will try working with this file in V19.0 and see what happens. Wish me luck!
DesignCAD user since 1987

Rick V.

Dr PR,

Thanks for getting to the bottom of this (or near the bottom). Groups again, geez... I'm starting to get afraid of using them.

I'm trying to figure out how v15.3 was able to open the original corrupted file?? And, I don't see it as a bug, I see it as a bomb that's just ticking away on a large (aka valuable) drawing.

DrollTroll

I'll have to look into the possibility of a command (or utility) to pack group and solid ids down to the lower end of the spectrum.

Dr PR, the new limit on group (and solid) ids is not 65000, but closer to 2^32. The old group limit fit into a 16-bit integer (hence the 65500 number) but was hard-coded in a few non-obvious places to only 16383. So any group id larger than 16383 might cause problems in older versions -- i.e. group ids that exceeded that number would "merge" with lower-valued groups.
25 years with DesignCAD

Dr PR

DT,

Thanks. Glad you're back!

On further thought I suspected the large Max Group ID wasn't the real problem. Whatever caused the large number is what corrupted the file. I wonder if the 65513 number is the result of loading the drawing into V15.3? Would it truncate a larger Max Group ID from a V19 file?

I have now spent hours working with V19.0 on the new drawing that resulted from copying the drawing elements from the bad file to a new file. I have executed dozens of solid Boolean operations and anything else I thought might tweak the dragon's tail, and I have had no problems. I have used the group count macro repeatedly and the group count is still low (24) and the Max Group ID is low (56).

The group packing function would be useful. Perhaps it would be a good idea to execute the procedure every time a file is opened. One or two people (in earlier forum posts) mentioned having macros that operate on specific group numbers. For them you might make group packing optional when files are loaded. For everyone else it shouldn't be a problem.

The real problem is that something is corrupting drawings. We have seen some point numbering problems causing strange shading and shadow effects, and occasionally bits and pieces are relocated to layer 1. This is not a rare phenomenon - I see it several times every day. When it happens I must close and reopen the drawing to solve the problem. I have seen dozens of occasions when these problems appear immediately after solid Boolean operations (Add and Subtract) and the strange shading is often on other solids (not a part of the Boolean operations). This isn't new to V19. I saw it in all V18 beta versions, and possibly in V17. I have never seen the problem in V15 (I have never used V16).

You mentioned solid IDs. Will copying the contents of a file into another file repack solid IDs like it does group IDs? Do solids have a Max ID number too? I typically have far more solids in a drawing than groups. I often collect elements into solids instead of groups just so I can pack several collections of objects into a single group and recover them again after the group is exploded. It is sort of a pseudo nested group.
DesignCAD user since 1987