squiz Report post Posted April 2, 2008 I have the harvesting effect enabled. After a network disconnect while harvesting and then a re-connect, I sometimes notice that the harvesting effect keeps on going, although I am no longer harvesting. When I then start harvesting, the harvesting effect stopped. When I then stopped harvesting, the client crashed. This, or something similar, has happened twice so far. Share this post Link to post Share on other sites
Florian Report post Posted April 2, 2008 Could you provide a backtrace? Share this post Link to post Share on other sites
squiz Report post Posted April 2, 2008 Could you provide a backtrace? How do I do that? (I am running linux btw). Share this post Link to post Share on other sites
Florian Report post Posted April 3, 2008 (edited) Great Please run el in gdb, the gnu debugger. "gdb <el-binary>" and then at the gdb prompt "run main" or "run test" for main or test server. When el crashes, type "bt full" in the gdb console. Thanks. Edited April 3, 2008 by Florian Share this post Link to post Share on other sites
Espresso_Boy Report post Posted April 6, 2008 I can reliably reproduce this on both Mac and XP. 1) start harvesting 2) cause a resync or disconnect+reconnect or otherwise find a way to lose your actor 3) cause one of the stop harvesting messages crash in eye_candy_wrapper.cpp:580 cast_reference->effect->recall = true; Here's what I believe is going on. You start harvesting, and harvesting_effect_reference gets set up with the pretties. When you resync, or reconnect after a disconnect, destroy_all_actors() is called, and I *think* ec_actor_delete() washes the ongoing harv effect away with all the other actor associated effects. Since this isn't the normal way for the harv effect to stop, harvesting_effect_reference doesn't get cleared. When we finally do get a stop harv message, ec_recall_effect(harvesting_effect_reference); is erroneously called. Since the effect is already gone, it crashes. Possible fixes: 1) Bring harvesting_effect_reference into scope for actor_scripts.c and set it to NULL somewhere in destroy_all_actors(). This won't help us if we ever destroy just yourself, but I can't think of when that would happen off the top of my head. Since this crash is related to lag, it shouldn't happen that often anyway, so a perfect solution probably isn't necessary. 2) Make every effect check if it is the harv effect when it dies, and if so, clear harvesting_effect_reference. I think this is a waste of time, and it would probably make the client slow. 3) Have ec_actor_delete() do the check. probably still a waste of time. 4) Get rid of harvesting_effect_reference and have filter_or_ignore_text() look through all the eye candy stuff for og harv when we get a stop message. I can't wrap my mind around the ec stuff, but I'm willing to bet that would be needlessly complicated. I'm sure there are more ways to handle this, but I like option 1 because it's only a two line fix. Fixing this will also take care of not seeing the effect after resuming harvesting. There's another lag related crash that happens if we don't have our actors when we start harvesting. This one is a little harder to reproduce. At least the fix is easy. Check if get_actor_ptr_from_id(yourself) returns NULL before passing it to ec_create_ongoing_harvesting2(). Share this post Link to post Share on other sites
Florian Report post Posted April 6, 2008 1) Bring harvesting_effect_reference into scope for actor_scripts.c and set it to NULL somewhere in destroy_all_actors(). This won't help us if we ever destroy just yourself, but I can't think of when that would happen off the top of my head. Since this crash is related to lag, it shouldn't happen that often anyway, so a perfect solution probably isn't necessary. Thanks for the report, I implemented your idea, it's in CVS. A brief reconnect check looks like this solves the problem, thanks! Share this post Link to post Share on other sites
Espresso_Boy Report post Posted April 6, 2008 You're awesome! no more crashes \o/ Share this post Link to post Share on other sites