Author Topic: Crash caused by trimming 2 lines  (Read 297 times)

adriank

  • Hero Member
  • *****
  • Posts: 511
Crash caused by trimming 2 lines
« on: November 29, 2017, 01:42:48 AM »
I was just thinking to myself as I worked that despite a couple of issues (just posted) DCad is so much more reliable than it used to be that it's a joy to use now.
And then it crashed.
Bigly is  the correct term I think.

The offending entity is simple - a line forming the profile of an H beam. I tried to trim the 2 lines identified in the file and DCad crashed so badly I couldn't get the frozen screen closed without re-starting the computer.
I was actually trying to trim an outlined (0.2m offset) copy of the original line when it crashed first, but then I discovered the crash happens on the original entity too. It happens in V2016 and V2018.
It does not happen when trimming any other sections on the line - and the attempted trim does not involve the first or last point either.
I worked out it's actually trimming the line between points 3-4 and 13-14.

I'd like to know if I caused this or if it's a bug?

Rob S

  • Hero Member
  • *****
  • Posts: 4522
    • Construction Estimating Program for General Contractors
Re: Crash caused by trimming 2 lines
« Reply #1 on: November 29, 2017, 07:35:46 AM »
Yup, crashes for me as well.  However, just the typical program crash in windows 10 (dcad has stopped working - close the program...)  no need to reboot.

THe similar looking opposite side of the beam trims OK no crash

Not sure yet what is troubling it about those two particular line segments.

It is a very small scale, should not matter

It offsets fine (F2) , so apparently no extraneous points.  And the  offset  copy of the object appears to trim just fine.

The shape hatches just fine.

It seems reversing the point order allows the trim to be completed without a crash. however subsequently the opposite side will not trim at all, but no crash...

A copy of it pasted into a different drawing crashes when trimmed.

I hope DT will take a look at this drawing and see why it crashes.   Most unusual.
« Last Edit: November 29, 2017, 08:12:32 AM by Rob S »
User since Pro-design

adriank

  • Hero Member
  • *****
  • Posts: 511
Re: Crash caused by trimming 2 lines
« Reply #2 on: November 29, 2017, 09:04:25 AM »
Thanks for checking that for me Rob.
The 'extremely small scale' I use is 'Meters'.
1 drawing unit = 1m, the reason I don't draw in millimeters is that a fair bit of my work is in masterplanning - sometimes large land plots in excess of 400acres and expressing dimensions in mm would be just nuts.

The only time I find the small scale is a nuisance is when I export to Sketchup which defaults in feet, I think. Anyway, it makes for some tiny facets that are not recognised so they disappear, so I always change the scale to mm before exporting - then change back in Sketchup.

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4225
Re: Crash caused by trimming 2 lines
« Reply #3 on: November 29, 2017, 01:57:25 PM »
Crash confirmed. Trying to figure out why, and in which versions...

Hmmm... crashing at least as far back as V17, so definitely not something new. I'll take a closer look at the object itself...

So, while not explaining the issue at hand, here are a couple of ways to make it trim without crashing:
1) Select the objects, open the Info Box, and reverse the points, then Trim.
2) Select the object, use the Break Line command, and then Trim the two lines.

Still digging....

Looks like scaling it up 100x also makes it Trimmable; however the result creates some kind of weird loop on the left-hand side, rather than breaking the result into two or more objects.

Also, turning off 'Trim Shorter End' seems to work. So maybe there's something going on with the 'Trim Shorter End' logic here...

Honestly, trimming these particular segments 'as is' without breaking the beast into pieces creates sort of a Frankenstein monster -- the resulting shape (assuming no crash) has a segment going from the bottom corner of the bottom left leg to the top corner of the top left leg, back down to the top corner of the bottom left leg, then around the left-edge loop to the bottom corner of the top left leg, back to the top of the top left leg, then along over to the right and back around to the starting point As a result, you have three line segments covering all or part of the upper left edge of the beam -- sure to confuse any CAD program.
« Last Edit: November 29, 2017, 02:38:13 PM by DrollTroll »
25 years with DesignCAD

Rob S

  • Hero Member
  • *****
  • Posts: 4522
    • Construction Estimating Program for General Contractors
Re: Crash caused by trimming 2 lines
« Reply #4 on: November 29, 2017, 02:29:09 PM »
Well, if as it appears no one else has previously so far and heretofore managed to make this happen since V17 and report it here, we will have to congratulate Adrian on his particular and renowned skills in producing difficult issues for Designcad to respond to!!!

It's a tough job, but somebody's gotta do it...   ;)
User since Pro-design

adriank

  • Hero Member
  • *****
  • Posts: 511
Re: Crash caused by trimming 2 lines
« Reply #5 on: November 29, 2017, 05:37:20 PM »
Thanks Rob, for the congratulations .... I think?

In all the years I've been using this little gem of a program I've always experienced random unexplained crashes from time to time, now less than ever before so it has become an unusual event worth investigating.
Usually I'm not quite sure what caused it & would just delete the suspect item & redo it, but in this case it was in a small drawing with few entities & I was very sure what I had done to cause it.

That H beam section came from a library I've built up of engineered steel sections which I've repeated hundreds of times on various jobs without ever identifying the problem. I have 8 different H beam sections in there (different sizes and weights), I checked 3 of them just now - 2 caused the crash and one caused the horizontal line on top  to disappear. I have dozens of other sections in there (box, angle & channel) that I've not checked yet.

I did those checks in V2016 so  I could continue working on my real job in 2018 while it crashed. I also see that DCad does eventually shut down but it takes a loooong time (maybe 15 minutes after the crash).