SVN 682 problem...

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

SVN 682 problem...

Post by Guitarm » 2006-10-19 13:31

Hi,

I get this dump when trying SVN 682. I have tried to localize the problem and the crash is (obviously) accuring in sharemanager.h, line 143, but I'm not sure I understand it completely. Is it a recursive call?, and how does it use the code in sharemanager.cpp, line 97. Does it use it at all?. Here's the dump:

Code: Select all

Code: c0000005
Version: 0.698
Major: 5
Minor: 1
Build: 2600
SP: 2
Type: 1
Time: 2006-10-19 20:17:59
TTH: LIRA6MQEB4ERS3F2AFAHG5GTLBG3HCFZ323O2EI

c:\dcplusplus\client\sharemanager.h(143): ShareManager::Directory::File::getRealPath
c:\dcplusplus\client\sharemanager.cpp(147): ShareManager::toReal
c:\dcplusplus\client\uploadmanager.cpp(91): UploadManager::prepareFile
c:\dcplusplus\client\uploadmanager.cpp(283): UploadManager::on
c:\dcplusplus\client\speaker.h(77): Speaker<UserConnectionListener>::fire<UserConnectionListener::X<7>=0x0229F600,UserConnection *=0x0229F650,stlp_std::basic_string<char=0x0229F630,stlp_std::char_traits<char>=0x0229F5E0,stlp_std::allocator<char> >=0x0229F9D0,__int64>
c:\dcplusplus\client\userconnection.cpp(153): UserConnection::on
c:\dcplusplus\client\speaker.h(51): Speaker<BufferedSocketListener>::fire<BufferedSocketListener::X<2>=0x1D17F300,stlp_std::basic_string<char=0x0229FAB4,stlp_std::char_traits<char>=0x1D17F6E0,stlp_std::allocator<char> > >
c:\dcplusplus\client\bufferedsocket.cpp(221): BufferedSocket::threadRead
c:\dcplusplus\client\bufferedsocket.cpp(447): BufferedSocket::checkSocket
c:\dcplusplus\client\bufferedsocket.cpp(459): BufferedSocket::run
c:\dcplusplus\client\thread.h(122): Thread::starter
kernel32!0x7C80B683: GetModuleFileNameA
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-10-19 19:53

svn682 builds for you ?
Mine fails on an error in ShareManager.cpp (line 229). :?

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2006-10-19 22:48

Pothead wrote:svn682 builds for you ?
Mine fails on an error in ShareManager.cpp (line 229). :?
Yes, it builds and works fine (except for the above, but that's not DC++'s fault).

So it doesn't find the '/' in:

Code: Select all

string::size_type i = virtualFile.find('/', 1);
 	if(i == string::npos || i == 1) {
		return false;
	}
or does it really crash there?
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-10-20 04:08

I don't think that causes the crash, it just won't build for me. Doesn't like the "return false" bit. :P

Code: Select all

Compiling...
ShareManager.cpp
.\client\ShareManager.cpp(229) : error C2664: 
'std::_Tree<_Traits>::const_iterator::const_iterator(const std::_Tree<_Traits>::const_iterator &)' : 
cannot convert parameter 1 from 'bool' to 'const std::_Tree<_Traits>::const_iterator &'
        with
        [
            _Traits=std::_Tset_traits<ShareManager::Directory::File,ShareManager::Directory::File::FileLess,
std::allocator<ShareManager>,false>
        ]
        Reason: cannot convert from 'bool' to 'const std::_Tree<_Traits>::const_iterator'
        with
        [
            _Traits=std::_Tset_traits<ShareManager::Directory::File,ShareManager::Directory::File::FileLess,
std::allocator<ShareManager>,false>
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
***Edit***
Adding a few line breaks in the above code, to stop this post making the whole topic very wide. :P
Last edited by Pothead on 2006-10-20 06:34, edited 2 times in total.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2006-10-20 04:38

Yeah, the function wants a const_iterator as return value and you pass it a bool.
I don't know why I don't get trapped in that code. I can compile fine. Have you changed some properties for compiling or?

It can only get in there if i is not found or equal to 1...
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-10-20 05:44

Have you tried a clean build ?
Errors like that, i wait to be fixed in the svn, instead of changing something which will just conflict later. :P
Only change i've made to the dc++ source i used for testing, is breaking the multiple instances thingy, so i can also test in release mode. :)

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2006-10-20 06:10

Yes, even downloaded a fresh SVN and compiled a release from start. Something is weird at your place :)
Are you using stlport 5.0.2, wtl 7.5 without any modifications?
I can't use anything but 'false' ( = 0 ) in that piece of code btw...
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Pothead
Posts: 223
Joined: 2005-01-15 06:55

Post by Pothead » 2006-10-20 06:31

STLPort has been removed from dc++ source. Make sure the STLPort directory and all it's contents have been deleted, and that you have no reference to it in the VS Include directories. Then you may experience the error i am receiving.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2006-10-20 07:04

Pothead wrote:STLPort has been removed from dc++ source.
Heh, silly me...I just read the top row of changelog :)
But, yes, I get the same error if I remove STLPort. So...don't remove it :D
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Locked