Ticket #7400 (closed crash bug: fixed)

Opened 19 months ago

Last modified 18 months ago

Fatal Error in mapsql()?

Reported by: adam.l.m@… Owned by:
Priority: crash Milestone:
Keywords: Cc:
Visibility: Private

Description (last modified by raevnos) (diff)

I'm not exactly certain how this causes my MUSH to crash, but it does. The MUSH in question is a freshly compiled copy of 1.8.3p3 running on Ubuntu 6.10 (Edgy). While I have an AMD64, the OS and Penn server are plain 32bit. The text from the @version, just in case it's of any use, is:

You are connected to TestMUSH
Last restarted: Tue Jul 03 23:05:18 2007
PennMUSH version 1.8.3 patchlevel 3 [06/13/2007]
Build date: Tue Jul 03 22:09:32 Or EDT 2007
Compiler: gcc -std=gnu99
Compilation flags: -ggdb -O -W -Wall -pedantic -Wno-comment -I/usr/include/
    mysql -DBIG_JOINS=1   -I.. -I../hdrs
Malloc package: 0

I created a character for myself, Adam, with One and set him wizard. I then logged on to Adam and inputted the following commands to build an (incomplete) object for testing:

@create TaskSystem

@power TaskSystem=can_nspemit pemit_all sql_ok

@set TaskSystem=!no_command

@sql CREATE TABLE tasksys_tasks (id MEDIUMINT NOT NULL AUTO_INCREMENT, task_name VARCHAR(50) NOT NULL, workers VARCHAR(100), task_desc TEXT, sub_tasks VARCHAR(100), super_task MEDIUMINT, status TINYINT not null, creation_date INT NOT NULL, last_activity INT NOT NULL, PRIMARY KEY (id));

&DAT`MSG_HEAD TaskSystem=TaskSys [ansi(BHx,:)]

&DAT`SUPERTASK_QUERY TaskSystem=SELECT task_name,sub_tasks,status,creation_date,last_activity,task_desc FROM tasksys_tasks WHERE super_task IS NULL

&CMD`VIEW_TASKS TaskSystem=$@tasksys/supertasks:@nspemit %#=mapsql(FUN`FORMAT_TASK_LIST,v(DAT`SUPERTASK_QUERY))

&FUN`FORMAT_TASK_LIST TaskSystem=ljust(ansi(switch(%3,0,r,1,g),left(%1,29)),30,.)[words(%2)][u(FUN`FORMAT_TIME,%4)][u(FUN`FORMAT_TIME,%5)][left(%6,sub(width(%#),66))]

&FUN`FORMAT_TIME TaskSystem=timefmt($d $b $y $H:$M $Z,%0)

&CMD`CREATE_TASK TaskSystem=$@tasksys/newtask *:@assert lte(strlen(setr(0,secure(%0))),50)=@nspemit %#=u(DAT`MSG_HEAD) ERROR: Task name is too long\, shorten by [sub(strlen(%q0),50)] characters.;@sql INSERT INTO tasksys_tasks (task_name, workers, status, creation_date, last_activity) VALUES ('[sqlescape(%q0)]', '%:', 0, [secs()], [secs()]);@nspemit %#=u(DAT`MSG_HEAD) Task created successfully with name %q0.

&CMD`CREATE_SUBTASK TaskSystem=$@tasksys/newsubtask *=*:@assert lte(strlen(setr(0,secure(%0))),50)=@nspemit %#=u(DAT`MSG_HEAD) ERROR: Subtask name is too long\, shorten by [sub(strlen(%q0),50)] characters.;@assert setr(i,sql(SELECT id FROM tasksys_tasks WHERE task_name='[sqlescape(%1)]';))=@nspemit %#=u(DAT`MSG_HEAD) ERROR: Supertask does not exist.;@sql INSERT INTO tasksys_tasks	(task_name, workers, super_task, status, creation_date, last_activity) VALUES ('[sqlescape(%q0)]', %:, %qi, 0, [secs()], [secs()]);@sql UPDATE tasksys_tasks SET sub_tasks=[setunion(sql(SELECT sub_tasks FROM tasksys_tasks WHERE id=%qi),sql(SELECT id FROM tasksys_tasks WHERE name='[sqlescape(%q0)]'))];@nspemit %#=u(DAT`MSG_HEAD) Sub-task %q0 created.

At this point, doing @tasksys/supertasks doesn't give any input--and also doesn't crash the game. But, after doing @tasksys/newtask Foo, running @tasksys/supertasks causes the game to crash. I'm really not certain what's going on here, to be honest, just that it isn't supposed to happen. ;) I have a copy of the core dump from this also, if you should need it.

Change History

Changed 18 months ago by raevnos

A copy of the backtrace from the core file would be useful, yes.

Changed 18 months ago by raevnos

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

Or not. I was able to replicate it and fix the problem.

Note: See TracTickets for help on using tickets.