PDA

View Full Version : Panic while starting Zone servers with Perl quests


Liem
12-13-2003, 04:11 PM
I was trying to use perl quest as the 5.2 server crashes with .qst files, and i've installed ActivePERL and tried installing IO::Scalar, but still I get a panic while I try to start the Zone server... anyone have any idea how to fix this?

SaguratuS
12-13-2003, 04:14 PM
Liem, i've been having the same problems with a custom build - I'll let you know if I can figure a way around this.

-- Copy and paste this into a new test.pl file, and do: "perl test.pl" from the command line to verify that you have Scalar working correctly

Liem
12-13-2003, 04:17 PM
copy and paste what?

SaguratuS
12-13-2003, 04:18 PM
sorry, had to post it from the comp which had it on it.

### use 5.005;
use IO::Scalar;
$data = "My message:\n";

### Open a handle on a string, and append to it:
$SH = new IO::Scalar \$data;
$SH->print("Hello");
$SH->print(", world!\nBye now!\n");
print "The string is now: ", $data, "\n";

### Open a handle on a string, read it line-by-line, then close it:
$SH = new IO::Scalar \$data;
while (defined($_ = $SH->getline)) {
print "Got line: $_";
}
$SH->close;

### Open a handle on a string, and slurp in all the lines:
$SH = new IO::Scalar \$data;
print "All lines:\n", $SH->getlines;

### Get the current position (either of two ways):
$pos = $SH->getpos;
$offset = $SH->tell;

### Set the current position (either of two ways):
$SH->setpos($pos);
$SH->seek($offset, 0);

### Open an anonymous temporary scalar:
$SH = new IO::Scalar;
$SH->print("Hi there!");
print "I printed: ", ${$SH->sref}, "\n"; ### get at value

SaguratuS
12-13-2003, 04:33 PM
Hmm, looks like even the prebuilt exe returns the panic, odd

Liem
12-13-2003, 04:38 PM
should "install IO:Scalar" work??
I couldn't run the test you posted, and now I'm trying to reinstall ActivePerl as I fu*ked alot around with \lib to try to get scalar to work

SaguratuS
12-13-2003, 04:39 PM
install IO::Scalar must work correctly and return "install_finished", if not, you probably haven't set your nmake directory - do so by configuring perl correctly with "o config"

Liem
12-13-2003, 05:06 PM
Ok, i got scalar to work.... but I still get the panic :(
Thanks for your help on getting scalar to work, any luck with getting the zone server up?

Eglin
12-13-2003, 05:09 PM
sorry, had to post it from the comp which had it on it.

### use 5.005;
use IO::Scalar;
$data = "My message:\n";

### Open a handle on a string, and append to it:
...

ack!perl -MIO::Scalar -e "print 'AOK'"should be all you need.

SaguratuS
12-13-2003, 05:15 PM
haha, you have to type that in though, mine you just have to double click =)

besides, all i did was copy/paste a demo script into a file from the build's readme.

Eglin
12-13-2003, 05:17 PM
Hmm, looks like even the prebuilt exe returns the panic, oddIf the problem is indeed related to your Perl install, then of course the binary will also fail. Try compiling with #EMBPERL but not #EMBPERL_PLUGIN, and see if that works for you, please?

Also, you guys need to be a whole lot more specific about these errors if you want to get good help. You got a panic? Which panic? Which perl version are you using? How did you verify your IO::Scalar installation? At what point are you getting errors? What OS? What is your path set to? etc...

Liem
12-13-2003, 05:22 PM
This is the output if I try to start a zone server:
[Status] CURRENT_ZONE_VERSION: EQEMu 0.5.2
[Status] Loading Variables
[Status] Loading zone names
[Status] Loading items
[Status] EMuShareMem loaded
[Status] Loading npcs
[Status] Loading NPCTypes from database...
[Status] Loading npc faction lists
[Status] Loading NPC Faction Lists from database...
[Status] Loading loot tables
[Status] Loading Loot tables from database...
[Status] Loading doors
[Status] Loading Doors from database...
[Status] FileLoadSPDat() Loading spells from spells_us.txt
[Status] FileLoadSPDat() spells loaded: 4294
[Status] Loading guilds
[Status] Loading factions
[Status] Loading corpse timers
[Status] Loading what ever is left
[Status] Loading commands
[Status] 150 commands loaded
[Status] Loading embedded perl
panic: top_env

I'm using ActivePerl-5.6.1.635-MSWin32-x86 on a Windows 2003 Server, I veryfied the Scalar install by executing the test.pl SaguratusS posted, and my path look like this:

Path=C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C :\WINDOWS\System32\Wbem;C:\php4\php;C:\Program Files\cvsnt

EDIT: I just cleaned up my PATH

SaguratuS
12-13-2003, 05:54 PM
using perl 5.8 on xp and windows server 2003, scalar is installed and verified via script I posted earlier.

zone.exe dies regardless if EMBPERL_PLUGIN is defined with panic: top_env

Just tried it with 0.5.3DR1, same result.

Edit:
Perl 5.8-latest was installed using all defaults, same with the installation of scalar via install IO::Scalar (except for the location of nmake.exe).

the panic: top_env was reproduced on both the 2003 and xp box, and so far I've done the following while compiling:
added the embparser h/c++ and embperl h/c++
added \perl\lib\core to include dir
added perl58.lib to compilation
standard preprocessor define of EMBPERL
compiled using the release configuration.

Eglin
12-13-2003, 06:04 PM
You get the same error when you compile without #def EMBPERL_PLUGIN ?

Based on the fact that the last thing you see prior to the error is the 'loading embperl' msg, I think that we can say pretty safely that you are dying inside of Embperl::Embperl(). This should be pretty easy to debug, if you're up to the task. Embperl isn't dependent upon eqemu, so you can include it in a standalone program, if you need. Either way, you should be able to determine where it is dying pretty easily.

I can't really do it for you, since I can't reproduce your problem.

I've got to say, though, that I have a sneaking suspicion that your IO::Scalar isn't installed properly. This error is too weird for it to have a plethera of causes.

SaguratuS
12-13-2003, 06:10 PM
I'm working on debugging it now, meanwhile scalar checks out correctly, and the install is done exactly how I said before:
install perl 5.8, all defaults
hit enter on all config defaults except for location of nmake.exe
perl -MCPAN -e shell
install IO::Scalar
Install finishes successfully
run zone.exe, same panic error
copy compiled scalar modules to perl/site and perl/lib directories
same zone.exe panic error

Liem
12-13-2003, 06:58 PM
This happens with the linux version too, but they got it to work.
http://www.everquestserver.com/forums/viewtopic.php?t=11457

mollymillions
12-14-2003, 08:45 PM
as far as I know, perl isn't *quite* working just yet with windows - if you have it working, let us all know here: http://www.everquestserver.com/forums/viewtopic.php?t=11720

I have been using the Perl mods with EQEmu 5.1.2 and 5.2 on WinXP with ActivePerl 5.8.1.807, compiled with VS6 C++.

SaguratuS
12-14-2003, 08:50 PM
Mind telling us what you did exactly?

mollymillions
12-14-2003, 09:42 PM
-Added embperl.cpp/h and embparser.cpp/h.
-Defined EMBPERL,EMBPERL_PLUGIN for the Zone project (Win32 Release build).
-Added the pearl\lib\CORE directory to the Include and Library directories.
-Optional: Modify embparser.cpp

perl->eval(std::string("$").append(pkgprefix).append("::").append(varname).append("=qq(").append(value).append(");").c_str());
to:
perl->eval(std::string("$").append(pkgprefix).append("::").append(varname).append("=q(").append(value).append(");").c_str());

You should be able to define EMBPERL only, if there is a problem with your IO::Scalar install (quests should work without the plugging support).

SaguratuS
12-14-2003, 09:58 PM
Hmm, what compiler are you using?

Eglin
12-15-2003, 09:49 AM
Molly said vs6 in the post...

SaguratuS
12-15-2003, 09:52 AM
Just got VS6, I'll test it tonight and let everyone know of the outcome. I also did some thorough debugging of the perl module in VS .net, but the problem ends up on perl's side, not the emu's.

brinks
12-15-2003, 07:45 PM
getting same error, custon build or binaries, with or without EMBPERL_PLUGIN defined.

winxp sp1, perl 5.8, path is set correctly
added the path to lib files for perl in vc6
with
perl->eval(std::string("$").append(pkgprefix).append("::").append(varname).append("=q(").append(value).append(");").c_str());

E:\EQEMU\5C9DC~1.2PE>perl -MIO::Scalar -e "print 'AOK'"
AOK


with EMBPERL_PLUGIN
[Status] 150 commands loaded
[Status] Loading embedded perl
panic: top_env

without EMBPERL_PLUGIN
[Status] 148 commands loaded
[Status] Loading embedded perl
panic: top_env

sigh, dont know what to do now.

Liem
12-15-2003, 07:50 PM
Anyone have any ideas, anything... EQ is not EQ without quests

SaguratuS
12-15-2003, 08:18 PM
I finally figured it out, it has to do with some very unusual occurences. The app is actually looking for the perl lib's in the wrong place when launched - working on a fix now

Liem
12-15-2003, 08:50 PM
can't I just copy the libs to where the app is looking for 'em??
do u know where that is?

SaguratuS
12-15-2003, 09:34 PM
Yeah, i could, but then it'd be messy, I'd rather see what is wrong specifically and fix it, doing more debugging now

Liem
12-15-2003, 09:47 PM
I just want to set it up without recompiling. But if u do fix it I guess I'll just have to compile :wink:

SaguratuS
12-15-2003, 09:55 PM
This isn't a compiling issue, but rather it's directly related with the perl install. I'm trying to find what is causing perl to look elsewhere for it's libraries.

Liem
12-15-2003, 10:24 PM
Ah, I re-read your post, sorry, I misunderstood. Please let me know what u find out.

Liem
12-17-2003, 06:24 PM
Any progress? If not, please tell me where PERL looks for its libs so I can copy 'em there.

SaguratuS
12-17-2003, 08:11 PM
Liem - long since fixed, look a few threads below named perl fix found!
heh