|
Author |
Thread Statistics | Show CCP posts - 11 post(s) |
|
CCP Phantom
C C P C C P Alliance
7511
|
Posted - 2017.02.15 15:17:57 -
[1] - Quote
Sometimes the story of hunting down a bug (and fixing it), is so thrilling, so intriguing, that it simply has to be shared with you!
Enjoy CCP Snorlax' story of how he hunted down and fixed one of the oldest bugs in EVE. Have fun with the latest dev blog Sleeping beauty - How one of the oldest bugs in EVE got hunted down and resolved!
CCP Phantom - Senior Community Developer
|
|
|
CCP Snorlax
C C P C C P Alliance
1158
|
Posted - 2017.02.15 16:46:01 -
[2] - Quote
Hagika wrote:You know, there is a shampoo for bugs, it also stops the itching pretty quickly... I tried that on my laptop - I had to get a new one...
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP Snorlax
C C P C C P Alliance
1158
|
Posted - 2017.02.15 16:47:06 -
[3] - Quote
Sentient Blade wrote:Kicked in the teeth by pointers.... You are now truly an elite programmer.
All the same, pretty nasty.
Then again, whoever wrote the original class didn't take much care to make it easy for themselves or their future colleagues, that's for sure...
It hurts my head to see void Synchro::RemoveSleeper( Heap &sleepers, ...) where it's being passed its own class member as a reference. Out of curiosity are there other heaps of sleepers in use or was this a nasty port of some C code?
Nice job finding it. Yes, there are two kinds of sleepers.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP karkur
C C P C C P Alliance
4093
|
Posted - 2017.02.15 22:20:48 -
[4] - Quote
Kolmogorow wrote:Thanks for sharing this! I didn't understand a lot of the details but what catched me at the end was that this bug might also have been the issue of "the overview not updating". That one I know well, as long as I play, which is long. Over the years I sometimes thought, this bug is annoying, why don't they care? I understand better now, it's not about ignoring a bug, but finding a very deep and hidden bug that is difficult to reproduce and to analyze in a complex code base. Software development is a human task, and it's not bad to sometimes show failure and success in the struggle against the single byte that doesn't do what you want it to do.
We are pretty sure this bug has been causing some overview issues, but there might very well be other issues that remain, but we are happy to get this at least out of the way
Over the years, we have spent a lot of time on overview and HUD issues, reading the code, trying to repro, adding logging but not gotten very far with it. It's especially tricky because we often don't know what else people have been doing when those weird things happen or what else had been happening. The drone case was similar, we knew it was happening but just couldn't repro it ourselves. We had spent days on looking into it (not ignoring it like many thought), but based on reports and videos we had, we saw details in the drone window (what had and had not updated) that made no sense, the code just "couldn't" fail in that way. But the good thing about the drone bug was that we had a decent idea under what circumstance it happened, so I ended up just sitting down, determined to repro like players were reporting... yeah, it probably took me like an hour and half to break it for the first time, but well worth in the end
CCP karkur | Programmer | Team Five 0 | @CCP_karkur
|
|
|
CCP Snorlax
C C P C C P Alliance
1181
|
Posted - 2017.02.16 10:18:46 -
[5] - Quote
Taryn Earendil wrote:I am a C++ newb. When I'm doing systems stuff, I use Rust. Mostly, because I'm into being a hipster developer...... but my question is with this RemoveSleeper function: void Synchro::RemoveSleeper( Heap &sleepers, Sleeper &sl ) { SleeperIt it; for( it = sleepers.begin(); it != sleepers.end(); ++it ) { if( it->channel == sl.channel ) { break; } } if( it != sleepers.end() ) { //Ok found us. Let's delete us. sleepers.Remove( it ); Py_DECREF( sl.channel ); } } Would this be a more succint way to do it? void Synchro::RemoveSleeper( Heap &sleepers, Sleeper &sl ) { SleeperIt it; for( it = sleepers.begin(); it != sleepers.end(); ++it ) { if( it->channel == sl.channel ) { //Ok found us. Let's delete us. sleepers.Remove( it ); Py_DECREF( sl.channel ); break; } } } Yeah, sure, but in this case I omitted some code that was irrelevant to the example.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP Snorlax
C C P C C P Alliance
1181
|
Posted - 2017.02.16 10:20:49 -
[6] - Quote
Thoirdhealbhach wrote:Elegbara wrote:Fascinating read.
Also I've actually tried to read the code and there's definitely something wrong in the Synchro::Tick snippet. The for loop seems corrupted. Yep, seems like the last third of the for command got eaten up during copy&paste. Anyhow, my sympathies, I've been chasing some bad reference counting myself for the better part of last month. It seems that a portion of the code looked similar to HTML so the content management system swallowed it - it's been fixed now.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP Snorlax
C C P C C P Alliance
1181
|
Posted - 2017.02.16 10:23:10 -
[7] - Quote
Branquinha wrote:(slow clap) (/bows to magnificence of analysis) You must have felt pretty good after that one! Just out of curiosity, aprox how many hours until you found it? And how many "I'm not finding anything breaks!" ? I don't know how long CCP karkur had spent on this, but after she'd basically proven in had to be in the Sleep command, I spent 3 solid working days on this, much of that in a staring contest with the code...
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP Snorlax
C C P C C P Alliance
1181
|
Posted - 2017.02.16 10:23:54 -
[8] - Quote
Illiana ShadowGlade wrote:This was an awesome read. I did IT in high school and got paid to run the the servers there over the summers after I graduated and trying to find code was always a pain.
Have you guys tried using the rubber ducky method? Grab a rubber ducky. Sit it on your desk/keyboard what have you... Explain to the duck the code. Two or three times if you have to. Eventually it'll hit you like a truck and you will probably throw the duck across the room because the 'stupid complex problem' has a simple solution, or it's something you never second guessed until that duck just gives you it's dead placid stare. I used a colleague instead. I refrained from throwing him across the room.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP Snorlax
C C P C C P Alliance
1192
|
Posted - 2017.02.16 15:02:41 -
[9] - Quote
Tonto Auri wrote:I'm wondering though. Do C++ supports the concept of destructors? In a language that does, I would place all cleanup code in a destructor and call it a day. Especially service objects cleanup. Sure, but the Python C API is just that - a C API, not a C++ API.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
CCP Snorlax
C C P C C P Alliance
1201
|
Posted - 2017.02.16 18:51:51 -
[10] - Quote
FearlessLittleToaster wrote:With this bug fixed can you work on the one that makes my ships explode when I undock drunk? I've reproduced it nearly 100% of the time when the conditions exist... I always get a headache when trying to reproduce the bug.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
|
CCP Snorlax
C C P C C P Alliance
1209
|
Posted - 2017.02.17 09:22:12 -
[11] - Quote
Gaius Ambramotte wrote:In your example code was a syntax error as far I understand C++:
if (sleepers.size()) { Be::Time nnow = BeOS->GetActualTime(); for(unsigned int i = 0; iPyError(); } <---- "}" should be " ) {" Py_DECREF(s.channel); } }
The CMS messed with the formatting of the code segments, resulting in some of it disappearing. It's been fixed now.
CCP Snorlax - Software Architect - Team RnB - @CCP_Snorlax - http://ccpsnorlax.blogspot.is/
|
|
|
|
|