SMT

Member
  • Content count

    70
  • Joined

  • Last visited

Everything posted by SMT

  1. it contains string newName = aName + name + PATH_SEPARATOR; if((Util::stricmp(newName + PATH_SEPARATOR, SETTING(TEMP_DOWNLOAD_DIRECTORY)) != 0) && shareFolder(newName)) { 1st param of stricmp will be double-ended with PATH_SEPARATOR, so never matches with 2nd param
  2. at least three clients implemented this feature very correctly: they are checking IP+exact share size, or IP+nick (if share size is 0). i've tested this much and didn't find troubles with users beyond NAT
  3. Released: ApexDC++ 1.0.0 Beta

    omg, so much dumps for same error. flylink team has figured out reason of this: conflict with NOD32 antivirus software, but only on multicore CPUs. uninstall nod and try again (stopping does not help). if it works, please PM me, want to collect statistics
  4. Ну вы дали :))

    (very interesting. please give link to origin, is there a way to fight licence restrictions using 'devel' versions?)
  5. [bug] [0.4.0] Download queue

    bug is not dvd-related. it happens when user have complex download folders structure
  6. attached example of Queue.xml is a real-life queue cutted to 3 files (enough to see a bug). files from folder VIDEO_TS are downloading, but user can't see them in queue and can't abort (delete) download. if you don't like puzzles, diff your sources with mine to see a solution Queue.xml
  7. it will solve another problem: incomplete localization in config-saved strings. for example, download log format initialized as setDefault(LOG_FORMAT_POST_DOWNLOAD, "%Y-%m-%d %H:%M: %[target]" + STRING(DOWNLOADED_FROM) + "%[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time]"); and after user switched language, it is also in default (english). so it will be good to set laguage.xml before first client start
  8. Apex DC++ speed mod

    no, it should be defined by connection protocol. for now, dc++ does not have a lot of useful things (u/d ranking like in e-mule will be very good) also i think clients must create private keys and user CID must be hash of key, not just username+hubname if protocol allow cheat, user can't be considered as cheater
  9. Apex DC++ speed mod

    well, it's up to user to decide, how much segments to use
  10. i've catched one crash when accessing invalid OnlineUser pointer. the reason is unguarded pointer usage in ClientManager::setPkLock, user become offline and was deleted in another thread void setPkLock(const User::Ptr& p, const string& aPk, const string& aLock) { OnlineUser* ou; { Lock l(cs); OnlineIterC i = onlineUsers.find(p->getCID()); if(i == onlineUsers.end()) return; ou = i->second; ou->getIdentity().set("PK", aPk); ou->getIdentity().set("LO", aLock); } ou->getClient().updated(*ou); // <- ou valid only when ConnectionManager::cs locked } well, i've changed code into void setPkLock(const User::Ptr& p, const string& aPk, const string& aLock) { OnlineUser* ou; { Lock l(cs); OnlineIterC i = onlineUsers.find(p->getCID()); if(i == onlineUsers.end()) return; ou = i->second; ou->getIdentity().set("PK", aPk); ou->getIdentity().set("LO", aLock); ou->getClient().updated(*ou); // !SMT!-fix } } and got deadlock after 30 minutes consider threads: _____________________thread 3052: UserConnection::on(BufferedSocketListener::Line, aLine = "$Lock=... Pk=...") ...fire(UserConnectionListener::CLock()) <= Speaker<UserConnectionListener>::cs locked! ConnectionManager::on(UserConnectionListener::CLock) ClientManager::setPkLock() ...Lock l(cs) <= ClientManager::cs locked! Client::updated ...fire(ClientListener::UserUpdated() <= Speaker<ClientListener>::cs locked! _____________________thread 2268: NmdcHub::onLine(aLine = "$Search...") ...fire(ClientListener::NmdcSearch()) <= Speaker<ClientListener>::cs locked! ClientManager::on(NmdcSearch) ...fire(ClientManagerListener::IncomingSearch()) <= Speaker<ClientManagerListener>::cs locked! _____________________thread 844: NmdcHub::onLine(aLine = "$MyInfo $All ...") NmdcHub::getUser() ClientManager::putOnline() ...fire(ClientManagerListener::UserConnected() <= Speaker<ClientManagerListener>::cs locked! QueueManager::on(ClientManagerListener::UserConnected) ConnectionManager::getDownloadConnection() ...Lock l(cs) <= ConnectionManager::cs locked! _____________________thread 2216: BufferedSocket::checkEvents() BufferedSocket::fail() ...fire(BufferedSocketListener::Failed()) <= Speaker<BufferedSocketListener>::cs locked! UserConnection::on(BufferedSocketListener::Failed) ...fire(UserConnectionListener::Failed()) <= Speaker<UserConnectionListener>::cs locked! ________________________________________________________________________________ ___ as you see, each thread locked by next and last thread locked by first. huh, it's really was not easy to debug, deadlock appeared when Apex got 96 threads. i want to see locks hierarhy graph from program architect (every upper-level lock should not locked if lower-level lock is already locked), but i don't know who developed original 'client' library code the only solution is not to pass OnlineUser& into on(UserUpdated) event, but User::Ptr instead. bugfix code will be available on new version (affects many files but now my working copy contains a lot of unfinished things, unrelated to this problem, needed to be done) ps: some functions in NmdcHub, also invokes getUser(nick) and this OnlineUser pointer is not guarded. i think, all ClientListener events, that passing OnlineUser& should be rewritten in same way
  11. Tab interface improvement

    i think there need be a tabs management popup panel with buttons to show/hide some group of tabs. for example, hide all unconnected hubs (but don't close, let them try co connect) or hide privates for some time (to review later) this in my todo list, but i dont know does it worth to spare time on GUI or implement some better things
  12. Winamp toolbar position never saved

    btw, i've also has been requested this feature. but postponed - there are many more useful thing to implement
  13. random crashes

    apex crushed when trying to display user, that leaving hub in this moment. this bug was confirmed by 3 users. here is report Code: c0000005 (Access violation) Version: s10.1 (2007-01-04) Major: 5 Minor: 1 Build: 2600 SP: 2 Type: 1 Time: 2007-01-05 01:47:03 exception code C0000005 at eip=0042CA9A, nested: 00000000 eax=00D97260 ebx=00000000 ecx=00000000 edx=00000000 esi=00000000 edi=0012C5A4 ebp=0012C578 esp=0012C568 ApexDC-s10_1!0x0042CA9A: ? ApexDC-s10_1!0x004A9967: ? ApexDC-s10_1!0x004A84A3: ? ApexDC-s10_1!0x0044E7C7: ? ApexDC-s10_1!0x0041D55D: ? USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3B368: DefWindowProcW USER32!0x77D3B3B4: DefWindowProcW ntdll!0x7C90EAE3: KiUserCallbackDispatcher USER32!0x77D3B7AB: SendMessageW COMCTL32!0x773DAF7B: Ordinal414 COMCTL32!0x773DB009: Ordinal341 COMCTL32!0x7742C307: FlatSB_SetScrollProp COMCTL32!0x77407720: FlatSB_SetScrollProp COMCTL32!0x7740D520: FlatSB_SetScrollProp COMCTL32!0x7740E4C6: FlatSB_SetScrollProp COMCTL32!0x77410DDA: FlatSB_SetScrollProp USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3C00E: DestroyCaret USER32!0x77D3C034: CallWindowProcW ApexDC-s10_1!0x0047C5E3: ? USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3B368: DefWindowProcW USER32!0x77D3B3B4: DefWindowProcW ntdll!0x7C90EAE3: KiUserCallbackDispatcher COMCTL32!0x7740B75E: FlatSB_SetScrollProp COMCTL32!0x7740B7C0: FlatSB_SetScrollProp COMCTL32!0x774106D7: FlatSB_SetScrollProp USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3C00E: DestroyCaret USER32!0x77D3C034: CallWindowProcW ApexDC-s10_1!0x0047C5E3: ? USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3B368: DefWindowProcW USER32!0x77D3B3B4: DefWindowProcW ntdll!0x7C90EAE3: KiUserCallbackDispatcher COMCTL32!0x7740DB4F: FlatSB_SetScrollProp COMCTL32!0x77410951: FlatSB_SetScrollProp USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3C00E: DestroyCaret USER32!0x77D3C034: CallWindowProcW ApexDC-s10_1!0x0047C5E3: ? USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D3B368: DefWindowProcW USER32!0x77D3B3B4: DefWindowProcW ntdll!0x7C90EAE3: KiUserCallbackDispatcher USER32!0x77D3B7AB: SendMessageW COMCTL32!0x773DAF7B: Ordinal414 COMCTL32!0x773FF71C: Ordinal384 COMCTL32!0x77401E79: Ordinal384 COMCTL32!0x77403053: Ordinal384 USER32!0x77D38709: GetDC USER32!0x77D387EB: GetDC USER32!0x77D389A5: GetWindowLongW USER32!0x77D389E8: DispatchMessageW the error is in the following code, bolded is dereferenced null-object: LRESULT HubFrame::onCustomDraw(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/) { LPNMLVCUSTOMDRAW cd = (LPNMLVCUSTOMDRAW)pnmh; switch(cd->nmcd.dwDrawStage) { case CDDS_PREPAINT: return CDRF_NOTIFYITEMDRAW; case CDDS_ITEMPREPAINT: { UserInfo* ui = (UserInfo*)cd->nmcd.lItemlParam; if (FavoriteManager::getInstance()->isFavoriteUser(ui->getUser())) { cd->clrText = SETTING(FAVORITE_COLOR); } else if (UploadManager::getInstance()->hasReservedSlot(ui->getUser())) { cd->clrText = SETTING(RESERVED_SLOT_COLOR); } else if (ignoreList.find(ui->getUser()) != ignoreList.end()) { cd->clrText = SETTING(IGNORED_COLOR); } else if(ui->getUser()->isSet(User::FIREBALL)) { cd->clrText = SETTING(FIREBALL_COLOR); } else if(ui->getUser()->isSet(User::SERVER)) { cd->clrText = SETTING(SERVER_COLOR); } else if(ui->getIdentity().isOp()) { cd->clrText = SETTING(OP_COLOR); } else if(!ui->getIdentity().isTcpActive()) { cd->clrText = SETTING(PASIVE_COLOR); } else { cd->clrText = SETTING(NORMAL_COLOUR); } [...]
  14. random crashes

    really there is no to discuss. the only purpose of this topic is to warn DC++ client developers (that, of course, visits this site but don't watch out for changelogs of all unofficial mods) to update code. PM-ing will delay updates until new official Apex version, that it's not preferrable
  15. Balloon popups settings page

    use 'Arial' / 'Courier New', it works in any windows version ;-)
  16. on windows 2003 sp1 after some expriments, i've figured, that default apex' font 'MS Shell Dlg' does not installed in win2003 changed line inside Popups::onFont(), onTitleFont() from CFontDialog dlg(&font, CF_EFFECTS | CF_SCREENFONTS); intoCFontDialog dlg(&font, CF_EFFECTS | CF_SCREENFONTS | CF_FORCEFONTEXIST); // !SMT!-F and dialog appears in debug build, but not in release (strange?). well, then i changed SettingsManager::SettingsManager(), replaced all "MS Shell Dlg,-11,... to "Arial,-11, now all works fine
  17. Client tags explained

    what is O:xx? Apex never generates this, but other clients do
  18. $Supports BanMsg

    banned users on speedmod, Domolink DC++ (and hopefully, in future in more mods) receive ban description via $Error, if client $Supports BanMsg. Otherwise, private message is used. it will be good, if official client will support this (it's just a few lines of code, commented with !SMT!-B in sources), so many users will get additional info without spaming PM. it's not a 'leecher' feature, because you dont ban anydody, just inform users
  19. Compiling ApexDC++

    post build log here, i'm just curious what kind of errors prevails
  20. fix in searchframe is redundant, i think. see PM for better one
  21. [BUG][0.3.0] Readd sources

    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
  22. when unchecking some folder in shared folders tree, then checking it again, then unchecking, and checking again, you share size on hub grows with some large random numbers. it easy to "share" 10-20 terabytes with this nice feature here is screenshots and video examples, provided by AniNerbe: http://slil.ru/23556284 http://slil.ru/23556284/1822252535/clip0002.avi
  23. look to DownloadManager::FileMover::run() in this case should be a record in log, but nothing in my case. and file is not removed from download queue, but it should be removed regardless of rename result. so i think, there is no signal 'download complete'