Melchior FRANZ writes: > * Melchior FRANZ -- Thursday 13 April 2006 17:06: > > Can we *please* finally fix the notorious crashes in tower.cxx? > > And, yes, I really meant "we". But as it looks, I'm pretty much on my > own (apart from Olaf who did a lot of the hard work already). > > Now the cause for the segfault is proven. I've added some debug > messages, and found that not only aircraft are at the same time in > several state lists, such as: > > - depList circuitList trafficList > - rwyList vacatedList > - holdList vacatedList trafficList (quite frequent combination!) > - circuitList vacatedList trafficList > - holdList rwyList vacatedList trafficList > - appList trafficList > > where each of the lines is one list combination for one aircraft > during a one-hour test. But it's just an ugly bug, and wouldn't cause > a crash. But this beats them all: > > - circuitList holdList vacatedList trafficList trafficList > > trafficList twice? That's a crash-condition! FGTower::RemovePlane() > removes an aircraft once from each list (which is a design bug already) > and then deletes the associated TowerPlaneRec! And when the code processes > the other trafficList entry for that same aircraft, the pointer points > to invalid memory. Everything can happen now. Quite often it's a crash. > > If nobody is willing to fix it properly, then I'll commit a crude > workaround for this crash condition today at 2400. It won't fix > the broken list shuffling, but only sweep the dirt deeper under the > rug. I'm afraid the code can really only be fixed by its author. >
Hi Melchior, It hasn't dropped off my radar, honest guv! A spring-clean of tower.cxx is right at the top of my FG todo list, and hopefully I'll get it done before 1.0, since you've done a lot of fantastic work with the festival stuff and I'd hate to see it wasted due to segfaults from my side. *However*, fitting a sink into the bathroom is currently completely top of my TODO list :-( A certain person is gently insistent that I try not to get distracted by "the computer" so it's back to diy for now I'm afraid... Thanks for looking into this, please commit the crude fix, and I'm still there or thereabouts, in spirit if not in bug-fixes at the moment, Cheers - Dave ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Flightgear-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/flightgear-devel

