Ruby program hanging SU on test - is there a log file?

I won’t attempt to get into the discussion on code, which I know nothing about, but on the arch itself, some things might make it easier:

  1. There is no floor 97, just a variable ceiling height on floor 96, up to 18’2" floor to ceiling.
  2. You can leave the end to end floor measurements. There are going to be several terraces up there, protruding out of the sides of the arch, and many floors in the inner arch too, though there’s less sun down there. This will actually extend the floors outside then.
  3. This may make it harder, so feel free to ignore it: But there’s going to be plaza levels from 4-32 in the apx. center of the 4th floor as a wedge cut-out. This can come later, but just so you don’t think the building it just a dense mass. Other stuff will be added onto the outside later too.
  4. The channel for the external elevators is actually 15’ D X 21’ W
  5. We do need to have more segments near the top, especially on the 87 floor, so I can realistically position the external elevators up there.

OK, back to you guys…

Yes, until I switch from drawing points to drawing faces and floor lines. I found it easier to check with just points - the mesh.add_polygon command could throw a wobbly if given an invalid point!

How did you use it?

I’m still slowly finding my way using the debugger. I can’t always even get it to break at a line, so would welcome tips on how you used it.

And maybe I should find documentation for the NetBeans IDE to clarify what it can do and how.

There are two parts to the answer:

  • how I set up and activated the debugger
  • how I used it to hunt for a problem

The former we have been discussing in the other topic. I didn’t do anything special beyond what is discussed there and the changes to your code I described earlier in this topic.

Because it seemed like a crucial aspect, I put a breakpoint at that break statement. Then each time it hit that breakpoint I looked at variables to see what was happening. I noticed that the value of i was not increasing and then noticed that your UI.messagebox was actually reporting the same thing. Single-stepping forward from the break statement made it clear that the reason was the code was jumping out of the loop (as expected) which caused it to bypass the statement that increments i.

Don’t feel bad - I have about 45+ years of experience debugging code! You’ll get there!

That’s helpful, thanks.

I probably put my test breakpoint in the wrong place, and it wasn’t triggering.

Did you just move the break until later, after the increment to i? Or how is that done?

Could you upload the modified code please, so I can see it?

@john_mcclenahan, I’ve already the done the “shame on you, virtual spankin’, ‘cause ya’ didn’t use minimum good coding”, for this month in the following post.

It has a simple code template (you just use another name for the top-level “namespace” module.)

Change a menu item - #10 by DanRathbun

@DanRathbun: Consider me duly chastised!

I will indeed try to follow your excellent example in future attempts at coding, and amend this one retrospectively.

1 Like

I did the minimum to establish that was the bug. Dan will probably not find it fully up to his standards, but at least it isn’t really dirty :wink:

draw_arch_v3-3.rb (13.9 KB)

1 Like