[06ad607] Crash when selecting Option Search

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [06ad607] Crash when selecting Option Search

Re: [06ad607] Crash when selecting Option Search

by _mental_ » Sun Sep 08, 2019 12:53 am

Fixed in 526a576.

Re: [06ad607] Crash when selecting Option Search

by 3saster » Sat Sep 07, 2019 2:52 pm

Seems a simple size check fixes it:

Code: Select all

		if(mDesc.mItems.size() > 0)
		{
			let last = mDesc.mItems[mDesc.mItems.size() - 1];
			bool lastIsText = (last is "OptionMenuItemStaticText");
			if (lastIsText)
			{
				String text = last.mLabel;
				bool lastIsSpace = (text == "" || text == " ");
				if (lastIsSpace)
				{
					mDesc.mItems.Pop();
				}
			}
		}

Re: [06ad607] Crash when selecting Option Search

by Graf Zahl » Sat Sep 07, 2019 1:09 pm

Oops. Here goes today's release...

Re: [06ad607] Crash when selecting Option Search

by drfrag » Sat Sep 07, 2019 1:07 pm

It crashes since "add empty line after standard options".

[06ad607] Crash when selecting Option Search

by vsonnier » Sat Sep 07, 2019 12:43 pm

Hi,
When I select Option Search in the latest GZDoom master, I got a wonderful crash like:

Code: Select all

VM execution aborted: array access out of bounds. Negative current index = -1

Called from OptionMenu.Init at gzdoom.pk3:zscript/ui/menu/optionmenu.zs, line 110
Called from os_Menu.Init at gzdoom.pk3:zscript/ui/menu/search/menu.zs, line 13
Called from OptionMenuItemSubmenu.Activate at gzdoom.pk3:zscript/ui/menu/optionmenuitems.zs, line 126
Called from OptionMenu.MenuEvent at gzdoom.pk3:zscript/ui/menu/optionmenu.zs, line 349
Called from Menu.SetMenu [Native]
Has anyone else got this ?

Top