Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Martaigne
Wanderer


Joined: 05 Jan 2002
Posts: 88
Location: Atlanta, GA

PostPosted: Wed Jun 09, 2010 5:58 pm   

Possible bug: Hard crash when using #DELITEM after a long #SWITCH (3.18d)
 
I have a piece of code that I wrote in 2.37 and maintained through 3.14-3.17. I made the move to 3.18d a few days ago, fixing some things along the way, but this one piece of code I cannot get working again.

The premise of this code is that I have 42 stringlists that contain data for use with a customizable highlighting system. I have a speedmenu item that will check to see if the selected text exists in any of the stringlists, then add it to the desired 'color' highlight string. This works just fine. I have another speedmenu item that checks for selected test in each of the stringlists, then removes it from the 'color' that has it. This causes CMUD to throw a memory error and crash to the desktop with no dump log. Granted, I may not have written the most efficient of code, but it never crashed in previous versions.

The crash message screenshot can be seen here.

The code for the removal is as follows (sorry for formatting illegibility):

Code:
StringToHighlight = %trim(%-1)
#IF (@StringToHighlight = "") {#SHOW %ansi(green)Cannot remove an empty string from highlights.  Please select the text you wish to unhighlight.} {#SWITCH (%ismember(@StringToHighlight,@HLBeige)) {#DELITEM HLBeige @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBlueViolet)) {#DELITEM HLBlueViolet @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBlue)) {#DELITEM HLBlue @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBrown)) {#DELITEM HLBrown @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight'  removed from highlights.} (%ismember(@StringToHighlight,@HLDarkBlue)) {#DELITEM HLDarkBlue @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLDarkGreen)) {#DELITEM HLDarkGreen @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLGold)) {#DELITEM HLGold @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLGreen)) {#DELITEM HLGreen @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight'  removed from highlights.} (%ismember(@StringToHighlight,@HLLightBlue)) {#DELITEM HLLightBlue @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLLightGreen)) {#DELITEM HLLightGreen @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLMagenta)) {#DELITEM HLMagenta @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLOrange)) {#DELITEM HLOrange @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLPink)) {#DELITEM HLPink @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLPurple)) {#DELITEM HLPurple @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLRed)) {#DELITEM HLRed @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLSilver)) {#DELITEM HLSilver @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLTeal)) {#DELITEM HLTeal @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLViolet)) {#DELITEM HLViolet @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLWhite)) {#DELITEM HLWhite @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLYellow)) {#DELITEM HLYellow @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLYellowGreen)) {#DELITEM HLYellowGreen @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBeigePhrase)) {#DELITEM HLBeigePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBlueVioletPhrase)) {#DELITEM HLBlueVioletPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBluePhrase)) {#DELITEM HLBluePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLBrownPhrase)) {#DELITEM HLBrownPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLDarkBluePhrase)) {#DELITEM HLDarkBluePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLDarkGreenPhrase)) {#DELITEM HLDarkGreenPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLGoldPhrase)) {#DELITEM HLGoldPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLGreenPhrase)) {#DELITEM HLGreenPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLLightBluePhrase)) {#DELITEM HLLightBluePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLLightGreenPhrase)) {#DELITEM HLLightGreenPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLMagentaPhrase)) {#DELITEM HLMagentaPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLOrangePhrase)) {#DELITEM HLOrangePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLPinkPhrase)) {#DELITEM HLPinkPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLPurplePhrase)) {#DELITEM HLPurplePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLRedPhrase)) {#DELITEM HLRedPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLSilverPhrase)) {#DELITEM HLSilverPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLTealPhrase)) {#DELITEM HLTealPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLVioletPhrase)) {#DELITEM HLVioletPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLWhitePhrase)) {#DELITEM HLWhitePhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLYellowPhrase)) {#DELITEM HLYellowPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} (%ismember(@StringToHighlight,@HLYellowGreenPhrase)) {#DELITEM HLYellowGreenPhrase @StringToHighlight;#SHOW %ansi(green)'@StringToHighlight' removed from highlights.} {#SHOW %ansi(green)Highlight does not exist.  Please select an existing highlight to remove.}
StringToHighlight = ""
}
_________________
Unwritten Legends
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 09, 2010 6:50 pm   
 
You need to also give me the command line or procedure for reproducing the crash with the above script. I'll also need to see the actual contents of the string list variables that you are using in the script. Basically I need a step-by-step procedure for reproducing the crash to help more with this.

Odd that your screenshot doesn't have the normal "Show bug" and "Send bug" buttons. That makes it look more like a crash somewhere in a windows driver rather than something in CMUD. All CMUD crashes should have the crash dump buttons, so I'm not sure what's going on here.
Reply with quote
Martaigne
Wanderer


Joined: 05 Jan 2002
Posts: 88
Location: Atlanta, GA

PostPosted: Wed Jun 09, 2010 7:47 pm   
 
Okay. The menu item simply calls the above alias to accomplish the removal. I can export the entire highlights code to xml and ship it to sales@zuggsoft.com. Look for it shortly. :)
_________________
Unwritten Legends
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jun 12, 2010 3:22 am   
 
I didn't have a chance to test the files you sent, but give the 3.19c version a try since I did fix some crashes and a memory problem in the recent version that might have affected this.
Reply with quote
Martaigne
Wanderer


Joined: 05 Jan 2002
Posts: 88
Location: Atlanta, GA

PostPosted: Sat Jun 12, 2010 3:43 am   
 
Will do.
_________________
Unwritten Legends
Reply with quote
Martaigne
Wanderer


Joined: 05 Jan 2002
Posts: 88
Location: Atlanta, GA

PostPosted: Sat Jun 12, 2010 3:48 am   
 
Appears to be fixed in 3.19c. I will continued testing to make sure everything else works.
_________________
Unwritten Legends
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net