Opened 7 years ago

Closed 7 years ago

#4570 closed defect (fixed)

Windows - Crash in the GUI in debug mode

Reported by: Itms Owned by: Vladislav Belov
Priority: Must Have Milestone: Alpha 22
Component: Core engine Keywords:
Cc: Patch: Phab:D484

Description

I don't know whether this also happens on Unix.

When running in Debug mode, the game will crash when opening the lobby logging window, if a username and/or password is memorized. The crash happens when trying to fill the CInputs with memorized values (more precisely when shifting the cursor to the end of the text).

Expression: vector subscript out of range

 pyrogenesis_dbg.exe!std::vector<float,std::allocator<float> >::operator[](unsigned int _Pos) Ligne 1201	C++
 pyrogenesis_dbg.exe!CInput::UpdateAutoScroll() Ligne 2081	C++
 pyrogenesis_dbg.exe!CInput::HandleMessage(SGUIMessage & Message) Ligne 850	C++
 pyrogenesis_dbg.exe!CInternalCGUIAccessorBase::HandleMessage(IGUIObject * pObject, SGUIMessage & message) Ligne 301	C++
 pyrogenesis_dbg.exe!GUI<CStrW>::SetSetting(IGUIObject * pObject, const CStr8 & Setting, const CStrW & Value, const bool & SkipMessage) Ligne 412	C++
 pyrogenesis_dbg.exe!JSI_IGUIObject::setProperty(JSContext * cx, JS::Handle<JSObject *> obj, JS::Handle<jsid> id, bool __formal, JS::MutableHandle<JS::Value> vp) Ligne 378	C++
 mozjs38-ps-debug.dll!js::CallJSPropertyOpSetter(JSContext * cx, bool (JSContext *, JS::Handle<JSObject *>, JS::Handle<jsid>, bool, JS::MutableHandle<JS::Value>) * op, JS::Handle<JSObject *> obj, JS::Handle<jsid> id, bool strict, JS::MutableHandle<JS::Value> vp) Ligne 310	C++
 	[...]

It is easy to ignore the issue by deleting the configuration option, if one wants to test the lobby in Debug mode.

Change History (5)

comment:1 by elexis, 7 years ago

This sounds like r19234

comment:2 by elexis, 7 years ago

Milestone: BacklogAlpha 22

comment:3 by Vladislav Belov, 7 years ago

Owner: set to Vladislav Belov
Status: newassigned

comment:4 by Itms, 7 years ago

Patch: Phab:D484

You can use the new "Patch" field to link differential revisions - you can also use the Phab shorthand everywhere in Trac :)

comment:5 by Itms, 7 years ago

Resolution: fixed
Status: assignedclosed

In 19579:

Fix out of range access in CInput, patch by vladislavbelov. Fixes #4570.

Some invalid cursor positions were not checked, resulting in a crash in Debug mode. This was revealed by r19234, refs #4401.

Reviewed By: echotangoecho, Itms

Differential Revision: https://code.wildfiregames.com/D484

Note: See TracTickets for help on using tickets.