Rikis

[BUG][0.3.0] Readd sources

9 posts in this topic

Readd sources -> all

leads to total interface freeze (5 times out 5).

I apreciate if it will be fixed faster, and not after few months.

(sorry for my spelling)

Share this post


Link to post
Share on other sites

Readd sources -> all

leads to total interface freeze (5 times out 5).

I apreciate if it will be fixed faster, and not after few months.

(sorry for my spelling)

I have the same problem ! (WIN XP SP2, AMD Athlon 64)

Also web server is sometimes hard accesible (it need many refreshes) even network is set right and it is NOT due to overload . . .

Share this post


Link to post
Share on other sites

Sadly, but same problem for me, when - readd source, remove user from source (any operation with source) - freezing dc. ^_^ And sometimes when remove user from queue..

Share this post


Link to post
Share on other sites

It is a known bug of StrongDC++ 2.03 (cvs200) on which APEX 0.3.0 is based. This bug is already fixed in cvs201. But because BM don't want to open his cvs for public use I fix this bug myself. I upload source files needed for fixing this bug here (may be this would be useful for somebody).

P.S. I don't known why but I can't add this file as attachment

Share this post


Link to post
Share on other sites

Sorry, but now I understand that my previous changes with fixing of this bug also creates new other :) . So the correct fixing for now is changing this lines of QueueFrame.cpp

if(wID == IDC_READD) {

			// re-add all sources

			for(QueueItem::SourceIter s = ii->getBadSources().begin(); s != ii->getBadSources().end(); ) {

				QueueManager::getInstance()->readd(ii->getTarget(), s->getUser());

				//reset the iterator since it won't be valid after the call to readd

				s = ii->getBadSources().begin();

			}


...


		if(wID == IDC_REMOVE_SOURCE) {

			for(QueueItem::SourceIter si = ii->getSources().begin(); si != ii->getSources().end(); ) {

				QueueManager::getInstance()->removeSource(ii->getTarget(), si->getUser(), QueueItem::Source::FLAG_REMOVED);

				//reset the iterator since it won't be valid after the call to readd

				si = ii->getSources().begin();

			}
to
if(wID == IDC_READD) {

			// re-add all sources

			for(QueueItem::SourceIter s = ii->getBadSources().begin(); s != ii->getBadSources().end(); s++) {

				QueueManager::getInstance()->readd(ii->getTarget(), s->getUser());

				//reset the iterator since it won't be valid after the call to readd

				//s = ii->getBadSources().begin();

			}


...


		if(wID == IDC_REMOVE_SOURCE) {

			for(QueueItem::SourceIter si = ii->getSources().begin(); si != ii->getSources().end(); si++) {

				QueueManager::getInstance()->removeSource(ii->getTarget(), si->getUser(), QueueItem::Source::FLAG_REMOVED);

				//reset the iterator since it won't be valid after the call to readd

				//si = ii->getSources().begin();

			}

Share this post


Link to post
Share on other sites

may be it's too late, but i like the following:

if(wID == IDC_READD) { // re-add all sources

						vector<User::Ptr> ul;

						for(QueueItem::SourceIter s = ii->getBadSources().begin(); s != ii->getBadSources().end(); s++)

								ul.push_back(s->getUser());

						for(vector<User::Ptr>::const_iterator s = ul.begin(); s != ul.end(); s++)

								QueueManager::getInstance()->readd(ii->getTarget(), *s);

				} else {


[...]


				if(wID == IDC_REMOVE_SOURCE) {

						vector<User::Ptr> ul;

						for(QueueItem::SourceIter s = ii->getSources().begin(); s != ii->getSources().end(); s++)

								ul.push_back(s->getUser());

						for(vector<User::Ptr>::const_iterator s = ul.begin(); s != ul.end(); s++)

								QueueManager::getInstance()->removeSource(ii->getTarget(), *s, QueueItem::Source::FLAG_REMOVED);

				} else {

technically no difference, but thinking that in future getBadSources() will not return just a constant vector, it will be better

Share this post


Link to post
Share on other sites

Who's to say it hasn't already been fixed? :)

BugMaster, you probably couldn't upload an attachement because your browser still has the old javascript for the site cached? Clear your cache (Ctrl+F5 probably) to fix this problem... (it's due to upgrading forum.)

Share this post


Link to post
Share on other sites