Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Helping Out

Helping Out

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  3  

Posted by Twisol   USA  (2,257 posts)  Bio
Date Tue 15 Sep 2009 10:04 AM (UTC)
Message
I'm interested in helping out in any way I can with MUSHclient's development, is there anything needing doing that I could tackle as a newcomer to the MUSHclient codebase? On that train of thought, do you have an SVN or Git repository where one could get the bleeding-edge code?

~Jonathan

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 15 Sep 2009 03:20 PM (UTC)
Message
Twisol said:
On that train of thought, do you have an SVN or Git repository where one could get the bleeding-edge code?

I was maintaining a bzr repository for a bit with the releases, but as there was basically no interest in it I stopped. Even so, it was more of a source mirror with history than a container for the most recent code.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 15 Sep 2009 10:23 PM (UTC)
Message
If you actually want to play with the C++ code, the very first requirement would be, being able to compile it yourself. I know it can be done, there was a recent post about that, and I am happy to help with any minor problems you have getting it set up.

However to do that you need the MS compiler, and not the free one either, because it uses MFC which they don't give away.

As for the bleeding edge source - it isn't that exciting I am afraid. Basically it is the source for version 4.43 with the extra stuff added for the change to allow you to edit script files slightly differently.

I am not operating a SVN repository that is publicly available, I use CVS here on a private server.

If you have trouble merging the patches with the last full release I can make up another full release if that helps.

Your offer is appreciated, however right now I don't have a big list of changes to the core client. Most enhancements these days are being done as plugins (and I am exploring ways of improving those, basically by just smartening up the plugins themselves).

If you are able to compile the source, and are reasonably comfortable with how it is organized, perhaps get back with a specific suggestion, like "would you like me to add feature X?" and we can talk about it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #3 on Tue 15 Sep 2009 10:32 PM (UTC)
Message
Yeah, I was the one recently who asked about compiling the source. I can compile it fine (I'm using Visual Studio 2005), in fact I've been tinkering with minor behavioral tweaks just to see how it works. A minor issue I recently had was that using DoAfter* functions when you're disconnected won't work as you'd expect, because the created timers don't have the "Active when disconnected" option. I've been making little changes in the CMUSHclientDoc::DoAfterSpecial code to see how I can modify it without breaking existing functionality - if you're interesting in what I come up with, I'd be glad to let you know.

Also, if you'd like me to maintain a VS2005 project file, I could do that too.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #4 on Tue 15 Sep 2009 10:56 PM (UTC)
Message
I'm having a problem with my source compilation, where when I disconnect from the server by any means, MUSHclient crashes hard during a call to _vscprintf(). One of the stack frames shows this line of code:


CString strDuration = TFormat ("--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---",
                  PLURAL (ts.GetDays()),
                  PLURAL (ts.GetHours()),
                  PLURAL (ts.GetMinutes()),
                  PLURAL (ts.GetSeconds()));


The TFormat() function's frame shows this line:

strTranslated = CFormat (sFormat, argList);


And CFormat() shows this:

FormatV(lpszFormat, argList);

// (The arguments in this stack frame show:
// lpszFormat: "--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---"
// argList: ""


No idea what's going on here...


Full stack trace:


>	msvcr80d.dll!_output_l(_iobuf * stream=0x0012f4c4, const char * format=0x00af2187, localeinfo_struct * plocinfo=0x00000000, char * argptr=0x0012f7dc)  Line 1648 + 0x1f bytes	C++
 	msvcr80d.dll!_vscprintf_helper(int (_iobuf *, const char *, localeinfo_struct *, char *)* outfn=0x65182820, const char * format=0x00af2148, localeinfo_struct * plocinfo=0x00000000, char * ap=0x0012f7bc)  Line 405 + 0x13 bytes	C
 	msvcr80d.dll!_vscprintf(const char * format=0x00af2148, char * ap=0x0012f7bc)  Line 414 + 0x14 bytes	C
 	mfc80d.dll!ATL::ChTraitsCRT<char>::GetFormattedLength(const char * pszFormat=0x00af2148, char * args=0x0012f7bc)  Line 473 + 0xe bytes	C++
 	mfc80d.dll!ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::FormatV(const char * pszFormat=0x00af2148, char * args=0x0012f7bc)  Line 2142 + 0xd bytes	C++
 	MUSHclient.exe!CFormat::CFormat(const char * lpszFormat=0x00af2148, char * argList=0x0012f7bc)  Line 42 + 0x13 bytes	C++
 	MUSHclient.exe!TFormat(const char * sFormat=0x00af2148, ...)  Line 2835 + 0x16 bytes	C++
 	MUSHclient.exe!CWorldSocket::OnClose(int nErrorCode=0)  Line 145 + 0x108 bytes	C++
 	mfc80d.dll!CAsyncSocket::DoCallBack(unsigned int wParam=584, long lParam=32)  Line 639	C++
 	mfc80d.dll!CSocket::ProcessAuxQueue()  Line 919	C++
 	mfc80d.dll!CSocketWnd::OnSocketNotify(unsigned int wParam=584, long lParam=32)  Line 1242	C++
 	mfc80d.dll!CWnd::OnWndMsg(unsigned int message=883, unsigned int wParam=584, long lParam=32, long * pResult=0x0012fc60)  Line 2004 + 0x11 bytes	C++
 	mfc80d.dll!CWnd::WindowProc(unsigned int message=883, unsigned int wParam=584, long lParam=32)  Line 1741 + 0x20 bytes	C++
 	mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x040efa90, HWND__ * hWnd=0x00f60e42, unsigned int nMsg=883, unsigned int wParam=584, long lParam=32)  Line 240 + 0x1c bytes	C++
 	mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00f60e42, unsigned int nMsg=883, unsigned int wParam=584, long lParam=32)  Line 389	C++
 	mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00f60e42, unsigned int nMsg=883, unsigned int wParam=584, long lParam=32)  Line 411 + 0x15 bytes	C++
 	user32.dll!77351a10() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]	
 	user32.dll!77351ae8() 	
 	user32.dll!77351a91() 	
 	user32.dll!77352a47() 	
 	user32.dll!77343c8a() 	
 	mfc80d.dll!AfxInternalPumpMessage()  Line 183	C++
 	mfc80d.dll!CWinThread::PumpMessage()  Line 896	C++
 	mfc80d.dll!CWinThread::Run()  Line 625 + 0xd bytes	C++
 	mfc80d.dll!CWinApp::Run()  Line 894	C++
 	mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00d23e6e, int nCmdShow=1)  Line 47 + 0xd bytes	C++
 	MUSHclient.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00d23e6e, int nCmdShow=1)  Line 33	C++
 	MUSHclient.exe!__tmainCRTStartup()  Line 589 + 0x35 bytes	C
 	MUSHclient.exe!WinMainCRTStartup()  Line 414	C
 	kernel32.dll!776b3823() 	
 	ntdll.dll!77a7a9bd() 	
 	MUSHclient.exe!CChatSocket::Process_File_start(const ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > > strMessage="RèÌüÿƒÄˆ…küÿÿ‹ôtüÿÿÿÐŒµ")  Line 1183 + 0x38 bytes	C++
 	MUSHclient.exe!CMUSHclientDoc::FixSendText(const ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > > strSource=<Bad Ptr>, const int iSendTo=361582797, const t_regexp * regexp=0x006d009c, const char * sLanguage=0xf62183e8, const bool bMakeWildcardsLower=true, const bool bExpandVariables=true, const bool bExpandWildcards=true, const bool bFixRegexps=false, const bool bIsRegexp=true, const bool bThrowExceptions=true)  Line 1303 + 0xe bytes	C++
 	fff5ef75()	

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Wed 16 Sep 2009 12:02 AM (UTC)
Message
The simplest way of sharing code is to send me, or post here, context diffs. I do that for showing changes from one version to the next. I do it from CVS, but basically you do a diff -c naming the old file and the new file (or whole directories).

The DoAfter fix is a good idea, I think.

As for the crash, is this related to using chat? I see this in the backtrace:

CChatSocket::Process_File_start

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #6 on Wed 16 Sep 2009 12:53 AM (UTC)
Message
No, all I had to do to reliably get the crash is start MUSHclient, have a world connect to anything (Achaea in this case), then disconnect. No chat involved. The crash doesn't occur in my 'live' version.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #7 on Wed 16 Sep 2009 01:25 AM (UTC)
Message
Have you made any changes? Can you post the diffs here?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #8 on Wed 16 Sep 2009 01:43 AM (UTC)
Message
I believe the only changes I made were the fixes between our versions of Visual Studio, which I posted in that initial thread about compiling. I'll download the most recent codebase and try again.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #9 on Wed 16 Sep 2009 03:26 AM (UTC)
Message
For what it's worth, I have a preference for releasing the source as a full archive, and not a diff, so that it's easy to get the whole, correct version of a given release. Also, the diff/patch tools tend to get kind of confused when the diffs or the files being diffed are in Windows line-ending format -- I had no end of trouble with that when I was maintaining the bzr repository. (Then again, I was doing that on Linux, so that could be it...)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #10 on Wed 16 Sep 2009 06:45 AM (UTC)
Message
All I can suggest for now is to try making a test of the offending line, by putting somewhere near the start of MUSHclient (like in InitInstance), lines like this:


CString strDuration = TFormat ("--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---",
                  PLURAL (1),
                  PLURAL (2),
                  PLURAL (3),
                  PLURAL (4));


My next steps would depend on whether that crashed or not.

My only guess is that the compiler is doing something different in handling of varargs, defines or something. Maybe change:


#define PLURAL(arg) (arg), (arg) == 1 ? "" : "s"


to:


#define PLURAL(arg) (arg), ((arg) == 1) ? "" : "s"


But that is just stabbing in the dark.

TFormat is used extensively in the code (I found 483 occurrences), so I can't see how that could be it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #11 on Wed 16 Sep 2009 07:04 AM (UTC)
Message
It doesn't crash, the value of strDuration is the expected line "--- Connected for 1 day, 2 hours, 3 minutes, 4 seconds. ---".

I haven't yet gotten around to starting afresh, but I'll post when I have results.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #12 on Wed 16 Sep 2009 07:18 AM (UTC)
Message
Maybe put a breakpoint on this line:


    CTimeSpan ts = CTime::GetCurrentTime() - m_pDoc->m_tConnectTime;


See if ts seems valid.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #13 on Wed 16 Sep 2009 08:44 PM (UTC)
Message
Seems perfectly valid. =/

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #14 on Wed 16 Sep 2009 11:27 PM (UTC)
Message
If you've merged in the changes I made from my last thread by then, is there any chance you could zip up the 4.43 source? It would save me some time fixing the code again to compile under VS2005.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


104,682 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.