Archived

This forum has been archived. Please start a new discussion on GitHub.

How to transfer files with Chinese filename in IcePatch2?

Dear Sir:
For some reasons, I recompiled icepatch2server.exe in Debug mode. When using this Debug icepatch2server.exe to transfer files with Chinese filename, it occurs to "Debug assertion failed: (unsigned)(c+1) <= 256, file isctype.c, line59" error. I looked up some materials, the reason for this error seems to be Debug mode.If compiling it in release mode, perhaps will avoid this error. So I modify config\Make.rules.mak set "OPTIMIZE = yes" and execute nmake cmd
and get the following link error:
E:\source\Ice-3.3.0\cpp\src\IcePatch2>nmake /f Makefile.mak
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
Ignoring ICE_HOME environment variable to build current source tree.
link.exe /LIBPATH:"C:\Ice-3.3.0-ThirdParty-VC80\lib" /LIBPATH:"..\..\lib
" /nologo /FIXED:no /OPT:REF /pdb:none /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:ms
vcrt.lib setargv.obj Server.obj FileServerI.obj /out:..\..\bin\icepatch2serv
er.exe ice.lib iceutil.lib rpcrt4.lib advapi32.lib icepatch2.lib IcePatch2Serve
r.res
Server.obj : error LNK2019: unresolved external symbol __imp___invalid_parameter
_noinfo referenced in function "public: bool __thiscall std::_Vector_const_itera
tor<class std::basic_string<char,struct std::char_traits<char>,class std::alloca
tor<char> >,class std::allocator<class std::basic_string<char,struct std::char_t
raits<char>,class std::allocator<char> > > >::operator==(class std::_Vector_cons
t_iterator<class std::basic_string<char,struct std::char_traits<char>,class std:
:allocator<char> >,class std::allocator<class std::basic_string<char,struct std:
:char_traits<char>,class std::allocator<char> > > > const &)const " (??8?$_Vecto
r_const_iterator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V
?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@st
d@@QBE_NABV01@@Z)
..\..\bin\icepatch2server.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\l
ink.exe"' : return code '0x460'
Stop.

Please tell me how to compile icePatch2server.exe in Release version?
Thanks a lot!

Comments

  • bernard
    bernard Jupiter, FL
    Hi Zhou,

    Welcome to our forums. Did you change the Ice build system to add these /NODEFAULTLIB flags?

    For the debug assertion, could you post the full stack trace?

    Thanks,
    Bernard
  • Hi Bernard:
    Tnanks for your immediate reply.
    I don't konw how to get full stack trace of this Error.To get release version,I set /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:ms
    vcrt.lib in Make.rules.msvc.My Assert Error's detailInfo please reference attachment picture.
    Thanks again.

    rong zhou
  • dwayne
    dwayne St. John's, Newfoundland
    To get the stack trace you should be able to press retry in the error window when you get the assert and then use the Call Stack tab in the debugger to look at the trace.
  • call stack

    msvcr80d.dll!_chvalidator(int c=-26, int mask=8) Line 56 + 0x2a bytes C++
    msvcr80d.dll!isspace(int c=-26) Line 189 + 0xb bytes C++
    icepatch233d.dll!IcePatch2::isAbsolute(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & pa="鏂板缓 鏂囨湰鏂囨。 (2).txt") Line 320 + 0x22 bytes C++
    icepatch2server.exe!00408beb()
    [Frames below may be incorrect and/or missing, no symbols loaded for icepatch2server.exe]
    icepatch233d.dll!IcePatch2::FileServer::___getFileCompressed(IceInternal::Incoming & __inS={...}, const Ice::Current & __current={...}) Line 1283 + 0x23 bytes C++
    icepatch233d.dll!IcePatch2::FileServer::__dispatch(IceInternal::Incoming & in={...}, const Ice::Current & current={...}) Line 1329 + 0x13 bytes C++
    ice33d.dll!IceInternal::Incoming::invoke(const IceInternal::Handle<IceInternal::ServantManager> & servantManager={...}) Line 447 + 0x3d bytes C++
    ice33d.dll!Ice::ConnectionI::invokeAll(IceInternal::BasicStream & stream={...}, int invokeNum=1, int requestId=8, unsigned char compress=0, const IceInternal::Handle<IceInternal::ServantManager> & servantManager={...}, const IceInternal::Handle<Ice::ObjectAdapter> & adapter={...}) Line 2445 C++
    ice33d.dll!Ice::ConnectionI::message(IceInternal::BasicStream & stream={...}, const IceInternal::Handle<IceInternal::ThreadPool> & threadPool={...}) Line 1111 C++
    ice33d.dll!IceInternal::ThreadPool::run() Line 519 + 0x3d bytes C++
    ice33d.dll!IceInternal::ThreadPool::EventHandlerThread::run() Line 759 + 0x1c bytes C++
    iceutil33d.dll!startHook(void * arg=0x007abf90) Line 150 + 0x1f bytes C++
    msvcr80d.dll!_callthreadstartex() Line 348 + 0xf bytes C
    msvcr80d.dll!_threadstartex(void * ptd=0x007aaa28) Line 331 C
    kernel32.dll!7c80b683()
  • I have encounter the same problem.

    Thank you.
  • In isctype.c Line:56

    #if defined (_DEBUG)
    extern "C" int __cdecl _chvalidator(
    int c,
    int mask
    )
    {
    _ASSERTE((unsigned)(c + 1) <= 256);
    return _chvalidator_l(NULL, c, mask);
    }
  • dwayne
    dwayne St. John's, Newfoundland
    Thanks for the stack trace, we will look into it further.
  • dwayne
    dwayne St. John's, Newfoundland
    I have posted a source patch here that should resolve the issue shown by your stack trace. Please let us know if there are any other issues.
  • patch-2.5.9-7-setup can't be downloaded

    Hi dwayne:
    Thank for your source patch for transfering non-ascii-file-names in advance! According to your suggestion,I go to Patch for Windows, download patch-2.5.9-7-setup.exe. I tried many times,but only to find download 0 Byte. It seems this download url is unavailable.Please let me know whether there are any other url to download patch-2.5.9 package or other methods to get it,Thanks a lot.

    rong zhou
  • dwayne
    dwayne St. John's, Newfoundland
    I am able to download the application from that link with no issue. This is the url I used to download the binary zip file itself.
  • Would you mind sending patch_2.5.9_setup.exe to my mailbox:zhourong4pek@gmail.com,Thanks a lot!
  • I download patch-2.5.4.tar from url:Index of /pub/gnu/patch .How can I compile it to patch.exe.
  • The url is correct, but in China we can't access sourceforge.
    I have download this tool through another way, and I hava sent patch_2.5.9_setup.exe to zhourong_bj.
  • I use U89.exe to access sourceforge.net.
  • patch process can't continue?

    Hi dwayne:
    I get patch tools and execute:patch -p1<IcePatch2.patch.txt in cmd windows, and get the following results:
    D:\source\Ice-3.3.0>patch -p1<IcePatch2.patch.txt
    patching file cpp/include/IceUtil/StringUtil.h
    patch: **** unexpected end of hunk at line 45

    D:\source\Ice-3.3.0>patch -p1<IcePatch2.patch.txt
    patching file cpp/include/IceUtil/StringUtil.h
    Reversed (or previously applied) patch detected! Assume -R? [n] n
    Apply anyway? [n] n
    Skipping patch.
    1 out of 1 hunk ignored -- saving rejects to file cpp/include/IceUtil/StringUtil
    .h.rej
    patch: **** unexpected end of hunk at line 45
    The only file(StringUtil.h) is modified,the other files(etc:Calc.cpp、Client.cpp、Util.cpp & Stringutil.cpp) aren't modified. I ensure these files are the same version with yours(especially in patch positions).
    I don't know what is the problem of it? Thanks for your consideration.