Build 7283
Christian K. has finally given the latest build a clean bill of health- all of the waterline problems seem to be gone. Run a "Check for Updates" and update now.
This was one of the more difficult bugs to find. It took about 10 days of deep digging to find two bugs. One was in a previous optimization that I had to partially undo. The more difficult one involved a bad interaction between the multiple threads and the Microsoft compiler optimizing part of my code away. The random waterline gouges that Christian found happen to be perfectly laid out to cause this rare bug almost every time. If have ever gotten gouges that move around each time the toolpath is calculated then this build probably a fix for it.
When MeshCAM generates a toolpath the "Analyzing Geometry" section is actually dividing the model up so it can be checked against the cutter more quickly. The toolpath is then divided between several threads, each with a separate section of the model to check. Some triangles will overlap multiple sections and can be checked by more than one thread at a time. There are some shared flags that are used to avoid conflict. Unfortunately I found that Visual C++ assumed that only one thread would ever access these flags and changed the code drastically when optimizing the output to run faster. This probably never showed up much before because users tend to have large models with lots of triangles. This would usually mean that the threads stay far enough away to not interfere with each other. Christian was the opposite- his files might only use a few dozen triangles so the potential for conflict was increased. I can say this is the first bug I’ve ever had to look at assembly code to find.
Comments
6 Responses to “Build 7283”


Robert, my copy of 7250 (running on XP Pro) says “You have the latest release of MeshCAM” when I run Check for Updates…
Randy
There is a quirk in the Windows/IE function that I use to download the current version information. It will only download it the first time you run the Check for Updates and then it will just return a cached version. If you restart MeshCAM and do it again then it should work.
This had me confused for a while until I figured out what it was doing.
-Robert
Robert, I restarted MC four times to verify the problem. You mention “IE” and that is maybe a clue. I use Firefox and don’t have IE (or even the core components) installed, having used nLite to create a highly stripped-down XP installation without IE.
Since you aren’t using build numbers in the installer filename any more (I’m adding them after downloading…) I just used the link in your 7250 blog entry to download the new version.
Randy
It is possible that the functions I call could be modified by nLite. Has Check for Updates ever worked before on your system?
-Robert
Robert, I thought it had worked in the past. So I just uninstalled 7283 and deleted the MC directory structure, installed and registered 6926 (the earliest copy I have). 6926 also says “You have the latest release of MeshCAM” when I run Check for Updates. So I guess it really has never worked for me–I must jump on your blog entries too quick to have to check from within MC…
Randy
This version runs without problems. All of the problems I had with the older versions are gone. You`ve done a great job! A s soon as i find bugs i let you know..:)
Florian