visual C++ runtime error

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

Moderator: Moderators

Locked
J0ke
Posts: 9
Joined: 2004-01-13 04:25

visual C++ runtime error

Post by J0ke » 2004-01-14 17:25

So i finally made my oDC mod version but, some users get "visual C++ runtime error". Funny thing is that i got WinXP SP2 and no errors... (maybe its because i got lots of other stuff installed... net framework, etc...) Seems like with other ver. winxp SP1 & win2k ppl get this error after working with proggy for ~5 minutes. Help :?

UPDATE
Found that if i type space and press enter it crashes with that message...

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-01-15 12:51

This could be related to the seemingly continuing line of problems with some chat text in oDC. Try changing main chat from a RichEdit to regular Edit (though the oDC options)... I'd suspect that it doesn't crash on a regular CEdit.

In any case, you should be able to break into the process and figure out what's crashing it (trace the call stacks on each thread)...

J0ke
Posts: 9
Joined: 2004-01-13 04:25

Post by J0ke » 2004-01-15 16:17

GargoyleMT wrote:This could be related to the seemingly continuing line of problems with some chat text in oDC. Try changing main chat from a RichEdit to regular Edit (though the oDC options)... I'd suspect that it doesn't crash on a regular CEdit.

In any case, you should be able to break into the process and figure out what's crashing it (trace the call stacks on each thread)...
got a bunch of testers and while refreshing hub scripts we all got runtime error at the same time... that hub window froze but i could type messages in other hubs...

weird

J0ke
Posts: 9
Joined: 2004-01-13 04:25

Post by J0ke » 2004-02-24 17:04

so now i'm sure when i or someone types space (chr32) in "chat" window client crashes...

this is what i got by launching debug:

Code: Select all

First-chance exception at 0x77e8877a in DCPlusPlus.exe: Microsoft C++ exception: 

_STL::out_of_range @ 0x0262e7d4.
autos:

Code: Select all

-	__msg	0x00801ecc "basic_string"	const char *
		98 'b'	const char
call stack:

Code: Select all

 	kernel32.dll!77e8877a() 	
 	kernel32.dll!77e8877a() 	
 	msvcr71d.dll!_CxxThrowException(void * pExceptionObject=0x0262e7d4, const _s__ThrowInfo * 

pThrowInfo=0x0081dc7c)  + 0x39	C++
>	DCPlusPlus.exe!_STL::__stl_throw_out_of_range(const char * __msg=0x00801ecc)  Line 73	

C++
 	DCPlusPlus.exe!_STL::_String_base<char,_STL::allocator<char> >::_M_throw_out_of_range()  

Line 527 + 0xa	C++
 	DCPlusPlus.exe!_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> 

>::substr(unsigned int __pos=6, unsigned int __n=9)  Line 1158	C++
 	DCPlusPlus.exe!oUtil::isBadNmdcMessage(const 

_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > & s={...})  Line 153 + 

0x15	C++
 	DCPlusPlus.exe!HubFrame::onAction(ClientListener::Types type=MESSAGE, Client * 

__formal=0x01349d30, const _STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> 

> & line={...})  Line 1521 + 0x9	C++
 	DCPlusPlus.exe!Speaker<ClientListener>::fire<Client 

*,_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > >(ClientListener::Types 

type=MESSAGE, Client * const & p=0x01349d30, const 

_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > & p2={...})  Line 55 + 

0x1f	C++
 	DCPlusPlus.exe!Client::onLine(const 

_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > & aLine={...})  Line 145 

+ 0x42	C++
 	DCPlusPlus.exe!Client::onAction(BufferedSocketListener::Types type=LINE, const 

_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > & aLine={...})  Line 740 

+ 0xf	C++
 	

DCPlusPlus.exe!Speaker<BufferedSocketListener>::fire<_STL::basic_string<char,_STL::char_traits<ch

ar>,_STL::allocator<char> > >(BufferedSocketListener::Types type=LINE, const 

_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > & param={...})  Line 46 + 

0x19	C++
 	DCPlusPlus.exe!BufferedSocket::threadRead()  Line 330 + 0x2c	C++
 	DCPlusPlus.exe!BufferedSocket::run()  Line 446 + 0xb	C++
 	DCPlusPlus.exe!Thread::starter(void * p=0x0134a16c)  Line 126 + 0xd	C++
 	kernel32.dll!77e70dfb()

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-02-28 14:42

Then Opera's chat colorization/parsing code must have a bug.
DCPlusPlus.exe!oUtil::isBadNmdcMessage( ... ) Line 153
Also, I hear Todi has sent you an interesting email! :wink:

J0ke
Posts: 9
Joined: 2004-01-13 04:25

Post by J0ke » 2004-03-01 05:56

GargoyleMT wrote:Then Opera's chat colorization/parsing code must have a bug.
DCPlusPlus.exe!oUtil::isBadNmdcMessage( ... ) Line 153
Also, I hear Todi has sent you an interesting email! :wink:
Yea and I gave him interesting answer ;)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-03-01 22:25

J0ke wrote:Yea and I gave him interesting answer ;)
Yes, you basically said you felt didn't have to comply with the GPL. :(


Anyway, did you run oDC in debug mode under the debugger, and figure out what the bug in the message parsing routine is? As he's on hiatus (perhaps never to return), if you want it fixed, you'll need to fix it yourself.

J0ke
Posts: 9
Joined: 2004-01-13 04:25

Post by J0ke » 2004-03-02 04:23

GargoyleMT wrote: Anyway, did you run oDC in debug mode under the debugger, and figure out what the bug in the message parsing routine is? As he's on hiatus (perhaps never to return), if you want it fixed, you'll need to fix it yourself.
debug version works fine... only when release is compiled bug appears...

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-03-11 22:27

J0ke wrote:debug version works fine... only when release is compiled bug appears...
You can still run a Release version under the debugger...

earl
Posts: 4
Joined: 2004-03-23 22:17

Post by earl » 2004-03-23 23:08

Add symbols to the release version. If it still happens, you're golden.

Otherwise, break out ntsd. Create an external symbol file and attach to the process after you start it.

-earl-

Locked