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
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Mar 19, 2008 11:23 pm   

[2.20] Invalid regex pattern causes crash
 
I am guessing any bad pattern would do it, but this one works well enough.

Procedure
1. Launch CMud
2. Close Sessions Window (ESC)
3. Enter at the command line
Code:
#CALL %regex("","**")

Code:
date/time         : 2008-03-19, 19:34:40, 224ms
computer name     : CHAOTIC
user name         : <admin>
registered owner  : James Dean / Chaotic
operating system  : Windows XP Service Pack 2 build 2600
system language   : English
system up time    : 6 days 2 hours
program up time   : 10 seconds
processor         : AMD Athlon(tm) Processor
physical memory   : 136/383 MB (free/total)
free disk space   : (C:) 7.54 GB
display mode      : 1024x768, 32 bit
process id        : $d4c
allocated memory  : 35.07 MB
executable        : cMUD.exe
exec. date/time   : 2008-03-14 21:43
version           : 2.20.0.0
compiled with     : BCB 2006
madExcept version : 3.0e
callstack crc     : $cbdd48d6, $3fee6ace, $3fee6ace
count             : 2
exception number  : 1
exception class   : EInvalidOperation
exception message : Canvas does not allow drawing.

untitled Comline ($da8):
0048ab68 +0040 cMUD.exe Graphics              TCanvas.RequiredState
0048aa5f +0013 cMUD.exe Graphics              TCanvas.GetHandle
004e6fe1 +0035 cMUD.exe Dialogs               GetAveCharSize
004e771f +00ab cMUD.exe Dialogs               CreateMessageDialog
004e7c3d +0021 cMUD.exe Dialogs               CreateMessageDialog
004e7d86 +0062 cMUD.exe Dialogs               MessageDlgPosHelp
004e7c7e +001a cMUD.exe Dialogs               MessageDlgPos
004e7db9 +000d cMUD.exe Dialogs               ShowMessagePos
004e7da6 +0006 cMUD.exe Dialogs               ShowMessage
00a708fd +0495 cMUD.exe Search2      666  +79 FindPattern
00d1eb1c +2d04 cMUD.exe MAIN       13139 +396 TMUDForm.ExecFunction
00db689d +00b9 cMUD.exe CodeExec     891   +9 ExecMUDFunction
00dbad3f +05b7 cMUD.exe CodeExec    2039  +84 HandleFunc
00dbae91 +0035 cMUD.exe CodeExec    2081   +5 HandleFuncRef
00dbebdc +05dc cMUD.exe CodeExec    3174 +105 TCodeExec.InternalExecute
00db5d64 +0070 cMUD.exe CodeExec     544   +9 TCodeExec.Expression
00dba390 +0014 cMUD.exe CodeExec    1837   +1 BoolExpression
00dbc99b +020f cMUD.exe CodeExec    2522  +10 HandleCom
00dbec00 +0600 cMUD.exe CodeExec    3177 +108 TCodeExec.InternalExecute
00db59e3 +005f cMUD.exe CodeExec     456   +8 TCodeExec.Execute
00cbe724 +0154 cMUD.exe CodeThread  1715  +21 TRunCodeThread.Run
00916861 +0151 cMUD.exe IdThread     374  +50 TIdThread.Execute
0047f8cc +0034 cMUD.exe Classes               ThreadProc
00405d54 +0028 cMUD.exe System        21   +0 ThreadWrapper

Main ($c08):
7c90eb94 +0 ???
>> stack will be calculated soon


I believe that the problem spot is in FindPattern. One of my tests had this not crash when there was a trigger in existence, so I am guessing that FindPattern is attempting to look into a trigger and doesn't know about %regex. Interestingly when I had the no crash test going it was reporting the correct pattern in the error box.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Mar 20, 2008 3:53 am   
 
I tried this a few times in a blank session, and I couldn't get a crash. Then I finally got one. I did go through several error message windows (some with the valid error dialogs, and some with blank, odd-sized dialogs).
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Mar 21, 2008 4:56 pm   
 
Yep. The FindPattern routine is trying to report the syntax error in the bad regex, but crashes when called from a thread running in the background (like the command line in this case). Threads are not supposed to access the user interface, so the bug will be intermittent and system dependent. But thanks for catching it, I've added it to the bug list.
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