Sorry for your loss. Kathy is right that they can be hard to keep going. I've been quick to replace a queen that doesn't seem to cut it as well as pulling frames of capped brood to keep the hive population low enough that they don't think of swarming if the queen is a rock star. Knock on wood I've kept mine going for over 4 years now but I've had to keep on top of it. Some years it's been minimal work. Other years it's been a definite challenge. Last year had a re-queening that failed, then another succeed only to find it was a dink. I ended up putting in a swarm queen and she's been good but they aren't as fastidious about keeping the hive clean as most bees so there has been some dead build up at the bottom. I'll clear that today as I learned last Spring it's a perfect spot for SHB of wax moth larva to emerge and hide until a substantial population can build up.
Sugar shouldn't go bad. If dry or high enough % volume in water it's as stable as salt. When the water volume was too high you can see the streaks of bacterial/fungal growth kick up. Unless it's disgusting and beyond salvage, I'll heat it back up to kill off the growth, maybe add a little more sugar and feed it. For those that may think this is gross or mean, I've seen bees working hog wallows, cattle lots, can recycling centers and dumpsters. They're tough and little mold won't kill them off versus those other things.
I've got no idea about a what would turn the tube yellow or why they would be dying in it.