Opened 10 years ago

Closed 10 years ago

#2423 closed defect (duplicate)

[NEEDS INFO] Simple CTD when creating a new random map (ChangeDisplaySettings failed with status=-1)

Reported by: Patrick Donghia Owned by:
Priority: If Time Permits Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by historic_bruno)

ChangeDisplaySettings failed with status=-1
Location: wsdl.cpp:440 (SDL_SetVideoMode)

Call stack:

OnActivate (wsdl.cpp:853)
    hWnd = (unavailable)
    state = (unavailable)
    __formal = (unavailable)
    fMinimized = (unavailable)
    changed_app_state = 0 (0x00)
    buf = "ret=-1"
    context = [2048] 
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00) ...
    buf = "ret=-1"
    context = [2048] 
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00)
        0 (0x00) ...

OnMessage (wsdl.cpp:1306)
    hWnd = 0x000603BE (..)
    uMsg = 6 (0x00000006)
    wParam = 0 (0x00000000)
    lParam = 0 (0x00000000)

gapfnScSendMessage (:0)

GetThreadDesktop (:0)

GetClientRect (:0)

CallWindowProcW (:0)

wglSwapBuffers (:0)

gapfnScSendMessage (:0)

GetThreadDesktop (:0)

GetThreadDesktop (:0)

GetThreadDesktop (:0)

KiUserCallbackDispatcher (:0)

PeekMessageW (:0)

SDL_PumpEvents (wsdl.cpp:1357)
    msg = 
        hwnd = 0x000603BE (see above)
        message = 257 (0x00000101)
        wParam = 17 (0x00000011)
        lParam = 3223126017 (0xC01D0001)
        time = 4993389 (0x004C316D)
        pt = { x = 1231 (0x000004CF), y = 317 (0x0000013D) }


SDL_PollEvent (wsdl.cpp:1367)
    ev = 0x0034F814 -> 
        type = [8] { 24 (0x18), 119 (0x77), 107 (0x6B), 1 (0x01), 163 (0xA3), 136 (0x88), 157 (0x9D), 212 (0xD4) }
        active = { type = 24 (0x18), gain = 119 (0x77), state = 107 (0x6B) }
        key = 
            type = 24 (0x18)
            keysym = { sym = -727873373, unicode = 13845 (0x3615) }

        motion = { type = 24 (0x18), x = 363 (0x016B), y = 34979 (0x88A3) }
        button = 
            type = 24 (0x18)
            button = 119 (0x77)
            state = 107 (0x6B)
            x = 34979 (0x88A3)
            y = 54429 (0xD49D)

        resize = { type = 24 (0x18), w = 3567093923 (0xD49D88A3), h = 1084765717 (0x40A83615) }
        expose = { type = 24 (0x18) }
        quit = { type = 24 (0x18) }
        user = { type = 24 (0x18), code = 3567093923 (0xD49D88A3), data1 = 0x40A83615 }


PumpEvents (main.cpp:183)
    profile2__ = 
        m_Name = 0x016328B0 -> "dispatch events"

    ev = 
        ev = 
            type = 24 (0x18)
            active = { type = 24 (0x18), gain = 119 (0x77), state = 107 (0x6B) }
            key = 
                type = 24 (0x18)
                keysym = { sym = -727873373, unicode = 13845 (0x3615) }

            motion = { type = 24 (0x18), x = 363 (0x016B), y = 34979 (0x88A3) }
            button = 
                type = 24 (0x18)
                button = 119 (0x77)
                state = 107 (0x6B)
                x = 34979 (0x88A3)
                y = 54429 (0xD49D)

            resize = { type = 24 (0x18), w = 3567093923 (0xD49D88A3), h = 1084765717 (0x40A83615) }
            expose = { type = 24 (0x18) }
            quit = { type = 24 (0x18) }
            user = { type = 24 (0x18), code = 3567093923 (0xD49D88A3), data1 = 0x40A83615 (see above) }


    profile2__ = 
        m_Name = 0x016328B0 (see above)

    data = (unsupported basic_string<char,char_traits<char> >)

Frame (main.cpp:321)
    realTimeSinceLastFrame = 0.101355 (0x3DCF9347)
    need_update = true 
    profile2__ = 
        m_Name = 0x016329EC -> "frame"

    need_render = true 
    profile2__ = 
        m_Name = 0x016329EC (see above)

    profile2__ = 
        m_Name = 0x016329EC (see above)


RunGameOrAtlas (main.cpp:473)
    argc = 1 (0x00000001)
    argv = 0x00BEE190 -> 0x0081AD00 -> "C:\Users\pat!\AppData\Local\0 A.D. alpha\binaries\system\pyrogenesis.exe"
    args = 
        m_Args = (unsupported vector<pair<CStr8,CStr8> >)
        m_Arg0 = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 92 ('\')


    paths = 
        m_root = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 4

        m_rdata = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 3993

        m_gameData = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 1

        m_userData = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 16

        m_config = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 65535

        m_cache = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 64000

        m_logs = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 0


    replay = 
        m_Stream = 0x00000000

    mod = 
        path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
        separator = 21528

    zip = 
        path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
        separator = 47821

    paths = 
        m_root = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 4

        m_rdata = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 3993

        m_gameData = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 1

        m_userData = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 16

        m_config = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 65535

        m_cache = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 64000

        m_logs = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 0


    builder = 
        m_VFS = 
            px = 0x00BEE1A4 -> (IVFS)
            pn = 
                pi_ = 0x016B542C -> 
                    use_count_ = 0 (0x00000000)
                    weak_count_ = 539628880 (0x202A1550)



        m_Files = (unsupported vector<Path >)
        m_TempDir = 
            path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >)
            separator = 31464



main (main.cpp:516)
    argc = 1 (0x00000001)
    argv = 0x00BEE190 (see above)

wmain (wseh.cpp:380)
    argc = 1 (0x00000001)
    argv = 0x00BEEF10 -> 0x00BEEF18 -> "C:\Users\pat!\AppData\Local\0 A.D. alpha\binaries\system\pyrogenesis.exe"
    utf8_argv = (unsupported vector<char * >)
    ret = 0 (0x00000000)
    utf8 = (unsupported basic_string<char,char_traits<char> >)

CallStartupWithinTryBlock (wseh.cpp:397)
    ret = 0 (0x00000000)

RtlInitializeExceptionChain (:0)

RtlInitializeExceptionChain (:0)


errno = 13 (Insufficient access rights to open file)
OS error = 0 (no error code was set)

Attachments (2)

crashlog.txt (18.5 KB ) - added by memoconq 10 years ago.
user.cfg (393 bytes ) - added by memoconq 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Josh, 10 years ago

Could you please post your logs? See ReportingErrors and GameDataPaths

Last edited 10 years ago by historic_bruno (previous) (diff)

comment:2 by historic_bruno, 10 years ago

Description: modified (diff)

As Josh said, crashlogs would be helpful and system_info.txt for good measure.

Also, was the game running fullscreen? Did it take a while to generate the map? Did you press Ctrl+Alt+Del or switch to the desktop or did the computer go to sleep meanwhile?

We need to know more to have a chance of reproducing and fixing the error.

comment:3 by historic_bruno, 10 years ago

Milestone: Backlog
Resolution: needsinfo
Status: newclosed
Summary: Simple CTD when creating a new random map[NEEDS INFO] Simple CTD when creating a new random map (ChangeDisplaySettings failed with status=-1)

comment:4 by memoconq, 10 years ago

Resolution: needsinfo
Status: closedreopened

I got this same error, too. I was playing Alpha 16 in full screen. I saved and paused the game then pressed Win+L (shortcut for locking the computer). After a while I unlocked the computer and this error message was on the screen. I clicked continue and a second error message said:

ChangeDisplaySettings failed with ret=-1
Location: wsdl.cpp:853 (OnActivate)

Call stack:

(error while dumping stack: No stack frames found)
errno = 0 (No error reported here)
OS error = 0 (no error code was set)

I clicked continue again. Game continued to work, but in windowed mode.

by memoconq, 10 years ago

Attachment: crashlog.txt added

by memoconq, 10 years ago

Attachment: user.cfg added

in reply to:  4 comment:5 by historic_bruno, 10 years ago

Resolution: duplicate
Status: reopenedclosed

Replying to memoconq:

I got this same error, too. I was playing Alpha 16 in full screen. I saved and paused the game then pressed Win+L (shortcut for locking the computer). After a while I unlocked the computer and this error message was on the screen.

That is a known problem, in Windows you can't leave your "desktop" while the game is running, regardless of the shortcut used. If you get to the login screen while the game is running, it will probably break (reasons give on #1733 which I believe reports the same issue).

I believe it's a bug in our WSDL implementation and I tested that it's fixed by the SDL2 upgrade, which I actually want to happen this next release.

Note: See TracTickets for help on using tickets.