Trying to rename a book crashes the shard

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
ThisIsMe
Distro Developer
Posts: 101
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Trying to rename a book crashes the shard

Post by ThisIsMe »

I seem to have broken something, but not sure what.

This is the little bit of code that appears to be the issue, I may have something wrong here, though I don't know.

I've tried both SetName and book.name to change the books name and both crash the server. I do have concern with the RequestInput as I changed to using that instead of a text entry gump which it originally was. Below this little blob is the much awaited file pol kicks me, if anyone can tell me what is going on.

Code: Select all

exported function SetBookName( book, who, auto:=0 )
	if ( book.movable == 0 )
		SendSysMessageCL ( who, 502413, color := 33 ); // That cannot be done while the book is locked down.
		return 0;
	endif
	
	var charge_prop := GetObjProperty ( book, "%Charges%" );
	var charges := charge_prop["charges"];
	if( !charges )
		charges := 0;
	endif

	var getname := GetObjProperty ( book, "Name" );
	if( !getname )
		getname := "a runic atlas";
	endif

	if( !auto )
		getname := RequestInput ( who, book, "Something" );
		SendSysMessageCL ( who, 502414, color := 66 ); // Please enter a title for the runebook:
		if( !getname )
			getname := "a runic atlas";
		endif
	endif

	SetObjProperty( book, "Name", CStr( getname ));
	//SetName( book, name+" [charges: "+charges+"]" );
	book.name := getname+" [charges: "+CStr(charges)+"]";
	return 1;
endfunction
20170729010615-0.dmp
(95.35 KiB) Downloaded 227 times
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: Trying to rename a book crashes the shard

Post by Nando »

Did you compile the core yourself? We'd also need the .exe and .pdb files to look into it. What is the console output? How reproducible is the crash? :)
ThisIsMe
Distro Developer
Posts: 101
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Re: Trying to rename a book crashes the shard

Post by ThisIsMe »

It is 100% reproducible.

the garbage in question:

Code: Select all

[07/29 01:00:40] ##########################################################
Unhandled Exception! Writing Minidump file. 
Post this file with explanation and last lines from log files on http://forums.polserver.com/tracker.php for the development team.
Saved dump file to '20170729005957-0.dmp'

Last Script: pkg/systems/spawnSystem/spawnSystem.ecl PC: 306
##########################################################
[07/29 01:06:35] Logfile opened.
[07/29 01:06:35] 99.0.1 Break Everything Even Rudder (VS2015) compiled on Jul 17 2017 17:46:02 running.
[07/29 01:06:35] Game is active.
[07/29 01:06:37] Client#1 connected from 127.0.0.1 (1 connections) on interface 127.0.0.1
[07/29 01:06:37] Account admin logged in from 127.0.0.1
[07/29 01:06:43] Client#1 (127.0.0.1): disconnected (account admin)
[07/29 01:06:43] Client#2 connected from 127.0.0.1 (1 connections) on interface 127.0.0.1
[07/29 01:06:43] Account admin logged in from 127.0.0.1
[07/29 01:06:44] Account admin selecting character Admin
[07/29 01:06:44] [scripts/misc/logon.ecl]: IP: 127.0.0.1 Account: admin Character: Admin logged on.
[07/29 01:06:57] 
##########################################################
Current StackBackTrace
(function-name not available) - 0x14026f997
  (filename not available)
(function-name not available) - 0x14026459f
  (filename not available)
(function-name not available) - 0x140264180
  (filename not available)
UnhandledExceptionFilter - 0x7ffad99c6913
  (filename not available)
memset - 0x7ffadd1fda9d
  (filename not available)
_C_specific_handler - 0x7ffadd1e6466
  (filename not available)
_chkstk - 0x7ffadd1fa07d
  (filename not available)
RtlLookupFunctionEntry - 0x7ffadd169c58
  (filename not available)
KiUserExceptionDispatcher - 0x7ffadd1f90fe
  (filename not available)
(function-name not available) - 0x1400445e4
  (filename not available)
(function-name not available) - 0x140044273
  (filename not available)
(function-name not available) - 0x14018c720
  (filename not available)
(function-name not available) - 0x14018acbb
  (filename not available)
(function-name not available) - 0x140265a2d
  (filename not available)
(function-name not available) - 0x140263058
  (filename not available)
(function-name not available) - 0x1402632ce
  (filename not available)
(function-name not available) - 0x1402b0df5
  (filename not available)
BaseThreadInitThunk - 0x7ffadceb2774
  (filename not available)
RtlUserThreadStart - 0x7ffadd1c0d51
  (filename not available)
##########################################################
[07/29 01:06:57] ##########################################################
Unhandled Exception! Writing Minidump file. 
Post this file with explanation and last lines from log files on http://forums.polserver.com/tracker.php for the development team.
Saved dump file to '20170729010615-0.dmp'

Last Script: pkg/systems/control/initializer/cmdbarmenus.ecl PC: 1464
##########################################################
Edit:
I also tried just this:

Code: Select all

exported function SetBookName (book, who, auto:=0)
getname := RequestInput ( who, book, "Something" );
endfunction
and the same result, it is almost as if it is not waiting for a response and jumping ahead and when a response is given the server does not like it since it was past that part and spews forth the mess above.
Last edited by ThisIsMe on Sat Jul 29, 2017 1:57 pm, edited 1 time in total.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Trying to rename a book crashes the shard

Post by Turley »

How did you compile the core? Usually the traceback shows more information then function-name not available :p
ThisIsMe
Distro Developer
Posts: 101
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Re: Trying to rename a book crashes the shard

Post by ThisIsMe »

I did not compile the core, Yukiko compiled it and sent it to me. I know it is not the "proper" way :D but alas that is the truth.

As for this issue, my issue is resolved, had RequestInput in a method script when it should not have been and was causing the shard to crash.

Thanks again Nando and Kevin, I will try not to break anything else.
Post Reply