Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#503 closed defect (fixed)

Invalid UTF-8 sequence when running in Unicode paths

Reported by: Philip Taylor Owned by:
Priority: Should Have Milestone: Alpha 1
Component: Core engine Keywords:
Cc: Patch:

Description

Running from E:\0ad-test-é\, argv[0] is something like win1252, not utf8:

Function call failed: return value was -100703 (Invalid UTF-8 sequence)
Location: utf8.cpp:81 (RaiseError)

Call stack:

RaiseError (utf8.cpp:74)
    err = 3272664 (0x0031EFD8)
    perr = 0x02FACFB9 -> 3452816640 (0xCDCDCD00)

UTF8Codec::Decode (utf8.cpp:120)
    srcPos = 0x0031F1D8 -> 0xCCCCCCCC
    srcEnd = 0x0031F1F8 -> [8] { 0 (0x00), 0 (0x00), 0 (0x00), 0 (0x00), 204 (0xCC), 204 (0xCC), 204 (0xCC), 204 (0xCC) }
    err = 0x00000000
    size = 1 (0x00000001)
    offsets = [5] { 0 (0x00000000), 0 (0x00000000), 12416 (0x00003080), 925824 (0x000E2080), 63447168 (0x03C82080) }
    u = 23346901 (0x01643ED5)

wstring_from_utf8 (utf8.cpp:217)
    src = 0x6F8CB5CA -> (error -100500 while analyzing string<﻾td::char_traits<char> >)
    err = 0x0031FCD0 -> 3276112 (0x0031FD50)
    srcEnd = 0x00000031
    srcPos = 0xCCCCCCCC
    dst = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

Paths::Paths (paths.cpp:31)
    this = 0xCCCCCCCC
    args = 0x0031FD14 -> 
        m_Args = (error -100500 while analyzing vector<pair<CStr8,CStr8> >)
        m_Arg0 = { (error -100500 while analyzing string<﻾td::char_traits<char> >) }

    subdirectoryName = 0xCCCCCCCC

InitVfs (gamesetup.cpp:506)
    args = 0x0031FD14 (see above)
    hooks = 
        override_gl_upload_caps = 0xCCCCCCCC
        get_log_dir = 0xCCCCCCCC
        bundle_logs = 0xCCCCCCCC
        translate = 0xCCCCCCCC
        translate_free = 0xCCCCCCCC
        log = 0xCCCCCCCC
        display_error = 0xCCCCCCCC

    readonlyConfig = 
        m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

    mods = (error -100500 while analyzing vector<CStr8 >)
    LINE_507_ = 
        m_t0 = -3689348814741910324 (0xCCCCCCCCCCCCCCCC)
        m_description = 0xCCCCCCCC

    logs = 
        m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

    modLoosePath = 
        m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

    modArchivePath = 
        m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

    paths = 
        m_root = 
            m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

        m_rdata = 
            m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

        m_data = 
            m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

        m_config = 
            m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

        m_cache = 
            m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)

        m_logs = 
            m_path = (error -100500 while analyzing basic_string<wchar_t,char_traits<wchar_t> >)


    cacheSize = 3435973836 (0xCCCCCCCC)

Init (gamesetup.cpp:855)
    args = 0x00000001
    flags = 49970672 (0x02FA7DF0)
    setup_vmode = 204 (0xCC)
    hooks = 
        override_gl_upload_caps = 0xCCCCCCCC
        get_log_dir = 0xCCCCCCCC
        bundle_logs = 0xCCCCCCCC
        translate = 0xCCCCCCCC
        translate_free = 0xCCCCCCCC
        log = 0xCCCCCCCC
        display_error = 0xCCCCCCCC

    setup_gui = 204 (0xCC)
    quality = 3435973836 (0xCCCCCCCC)
    missing = 0xCCCCCCCC
    windowed = 204 (0xCC)

RunGameOrAtlas (main.cpp:384)
    argc = 1 (0x00000001)
    argv = 0x02FA7DF0 -> 0x02FA7DF8 -> "E:\0ad-test-é\binaries\system\pyrogenesis_dbg.exe"
    ran_atlas = false
    args = 
        m_Args = (error -100500 while analyzing vector<pair<CStr8,CStr8> >)
        m_Arg0 = { (error -100500 while analyzing string<﻾td::char_traits<char> >) }

    res = 1.6976e-314 (0x00000000CCCCCCCC)

main (main.cpp:421)
    argc = 3276292 (0x0031FE04)
    argv = 0x00FAD184 -> 0xC7E04589 -> (unavailable - internal error)


__tmainCRTStartup (crtexe.c:410)

mainCRTStartup (crtexe.c:393)

CallStartupWithinTryBlock (wseh.cpp:357)
    ret = 3276240 (0x0031FDD0)

00000000
    ret = 23186032 (0x0161CA70)

00000000
    ret = 0 (0x00000000)

RtlInitializeExceptionChain (:0)


errno = 0 (?)
OS error = 50 (The request is not supported.
)

Change History (5)

comment:1 by Jan Wassenberg, 14 years ago

(In [7544]) avoid non-utf8 encoded characters being passed to main() on windows refs #503

comment:2 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:3 by Andrew, 14 years ago

Milestone: Backlog

comment:4 by fabio, 14 years ago

Milestone: BacklogAlpha 3
Resolution: fixed
Status: newclosed

Looks like this is fixed.

comment:5 by Kieran P, 14 years ago

Milestone: Alpha 3Alpha 1
Note: See TracTickets for help on using tickets.