PDA

View Full Version : Cleaned up Build for Visual Studio .NET


alkrun
01-30-2002, 09:32 AM
I imported the project into Visual Studio .NET and tried to build. The old C++ iostreams headers are deprecated for Visual Studio .NET so in the interest of not getting tons of deprecated errors, I converted all of the iostream.h and iomanip.h includes to their new format (without the extension) then added 'using namespace std;' to the source files as needed. This builds on .NET and should build on VS6.

I've uninstalled my copy of Visual Studio 6 as I believe .NET is a large improvement, and anything old is bad for you, so if anyone wants to test this in 6, that would be great.

As a suggestion, I would suggest not adding the .sln or .vcproj files for .NET to the distribution, since you would then need to keep 2 sets of workspace / project files updated. Importing the .dsw and .dsp files into .NET worked fine for me.

Oh, I also removed the references to Chat Server and Login Server from the .dsw file. I'm not too familiar with the project yet, but I'm guessing those projects aren't distributed.

My changes can be found at:

ftp://ftp.ofasoft.com/pub/eqemu_dotnetfix.zip

-Jon

Shawn319
01-30-2002, 10:20 AM
Cool i was going to try to do that myself but i couldnt figure out how to get rid of the iostream errors :)


VS.net rocks

alkrun
01-30-2002, 10:25 AM
Also, a question... I plan on helping out with the source a bit when I can, what's the standard procedure for getting changes / patches added into the official build here? I've never worked with an opensource project, so this is all new to me.

I saw a couple people posting zips of their modified source, I'm guessing someone will take that zip and run a diff on it then roll in the changes? Or is there a better way to do things?

Shawn319
01-30-2002, 10:30 AM
It would probably be best to post snippits here (and not the full source code) because its easier to see what got changed.

Just chat with the dev's in the chat room and either send it to them (small bits in a tell, in coder room or dcc) or post it here.

alkrun
01-31-2002, 10:56 AM
POSTING DIFF FILES

Commandline:
diff --context=0 -d -B eqemu.original/common eqemu/common

The basic format is:

diff cmd for file
*** original file name and timestamp
--- new file name and timestamp
***********
*** line # in old file ***
! original line
--- lines # in new file ---
! new line


COMMON DIRECTORY
-------------------------------------------------------------------------------
diff --context=0 -d -B eqemu.original/common/EQPacket.cpp eqemu/common/EQPacket.cpp
*** eqemu.original/common/EQPacket.cpp Wed Jan 9 01:46:12 2002
--- eqemu/common/EQPacket.cpp Thu Jan 31 15:48:14 2002
***************
*** 5 ****
! #include <iostream.h>
--- 5 ----
! #include <iostream>
***************
*** 14 ****
--- 15,16 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/EQPacketManager.cpp eqemu/common/EQPacketManager.cpp
*** eqemu.original/common/EQPacketManager.cpp Mon Jan 21 02:19:54 2002
--- eqemu/common/EQPacketManager.cpp Thu Jan 31 15:48:14 2002
***************
*** 3 ****
! #include <iostream.h>
--- 3 ----
! #include <iostream>
***************
*** 4 ****
--- 5,6 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/EQPacketManager.h eqemu/common/EQPacketManager.h
*** eqemu.original/common/EQPacketManager.h Fri Jan 4 12:11:54 2002
--- eqemu/common/EQPacketManager.h Thu Jan 31 15:48:14 2002
***************
*** 4 ****
! #include <iostream.h>
--- 4 ----
! #include <iostream>
***************
*** 13 ****
--- 14,15 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/database.cpp eqemu/common/database.cpp
*** eqemu.original/common/database.cpp Mon Jan 21 07:43:06 2002
--- eqemu/common/database.cpp Thu Jan 31 15:48:14 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 14 ****
--- 15,16 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/packet_dump.cpp eqemu/common/packet_dump.cpp
*** eqemu.original/common/packet_dump.cpp Mon Jan 14 13:23:54 2002
--- eqemu/common/packet_dump.cpp Thu Jan 31 15:48:14 2002
***************
*** 1,2 ****
! #include <iostream.h>
! #include <iomanip.h>
--- 1,2 ----
! #include <iostream>
! #include <iomanip>
***************
*** 5 ****
--- 6,7 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/packet_dump.h eqemu/common/packet_dump.h
*** eqemu.original/common/packet_dump.h Fri Jan 4 17:14:08 2002
--- eqemu/common/packet_dump.h Thu Jan 31 15:48:14 2002
***************
*** 4 ****
! #include <iostream.h>
--- 4 ----
! #include <iostream>
***************
*** 6 ****
--- 7,9 ----
+
+ using namespace std;
+
diff --context=0 -d -B eqemu.original/common/packet_dump_file.cpp eqemu/common/packet_dump_file.cpp
*** eqemu.original/common/packet_dump_file.cpp Mon Jan 7 19:16:34 2002
--- eqemu/common/packet_dump_file.cpp Thu Jan 31 15:58:16 2002
***************
*** 1,2 ****
! #include <iostream.h>
! #include <iomanip.h>
--- 1,2 ----
! #include <iostream>
! #include <iomanip>
***************
*** 4 ****
! #include <fstream.h>
--- 4 ----
! #include <fstream>
***************
*** 14 ****
--- 15,16 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/packet_dump_file.h eqemu/common/packet_dump_file.h
*** eqemu.original/common/packet_dump_file.h Sun Jan 6 03:27:12 2002
--- eqemu/common/packet_dump_file.h Thu Jan 31 15:58:16 2002
***************
*** 4 ****
! #include <iostream.h>
--- 4 ----
! #include <iostream>
***************
*** 5 ****
--- 6,7 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/packet_functions.cpp eqemu/common/packet_functions.cpp
*** eqemu.original/common/packet_functions.cpp Thu Jan 3 14:32:44 2002
--- eqemu/common/packet_functions.cpp Thu Jan 31 15:48:14 2002
***************
*** 1,2 ****
! #include <iostream.h>
! #include <iomanip.h>
--- 1,2 ----
! #include <iostream>
! #include <iomanip>
***************
*** 9 ****
--- 10,11 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/common/timer.cpp eqemu/common/timer.cpp
*** eqemu.original/common/timer.cpp Wed Jan 9 17:58:38 2002
--- eqemu/common/timer.cpp Thu Jan 31 15:48:14 2002
***************
*** 8 ****
! #include <iostream.h>
--- 8 ----
! #include <iostream>
***************
*** 10 ****
--- 11,12 ----
+
+ using namespace std;

alkrun
01-31-2002, 10:56 AM
WORLD DIRECTORY
---------------------------------------------------------
diff --context=0 -d -B eqemu.original/world/LoginServer.cpp eqemu/world/LoginServer.cpp
*** eqemu.original/world/LoginServer.cpp Sun Jan 20 21:34:46 2002
--- eqemu/world/LoginServer.cpp Thu Jan 31 15:51:22 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 4 ****
! #include <iomanip.h>
--- 4 ----
! #include <iomanip>
***************
*** 38 ****
--- 39,40 ----
+
+ using namespace std;
Only in eqemu/world: World.vcproj
diff --context=0 -d -B eqemu.original/world/client.cpp eqemu/world/client.cpp
*** eqemu.original/world/client.cpp Mon Jan 21 10:17:06 2002
--- eqemu/world/client.cpp Thu Jan 31 15:51:22 2002
***************
*** 1,2 ****
! #include <iostream.h>
! #include <iomanip.h>
--- 1,2 ----
! #include <iostream>
! #include <iomanip>
***************
*** 27 ****
--- 28,29 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/world/console.cpp eqemu/world/console.cpp
*** eqemu.original/world/console.cpp Sun Jan 20 17:59:38 2002
--- eqemu/world/console.cpp Thu Jan 31 15:51:22 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 30 ****
--- 31,32 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/world/net.cpp eqemu/world/net.cpp
*** eqemu.original/world/net.cpp Mon Jan 21 07:59:50 2002
--- eqemu/world/net.cpp Thu Jan 31 15:51:22 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 26 ****
--- 27,28 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/world/zoneserver.cpp eqemu/world/zoneserver.cpp
*** eqemu.original/world/zoneserver.cpp Mon Jan 21 09:23:06 2002
--- eqemu/world/zoneserver.cpp Thu Jan 31 15:51:22 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 31 ****
--- 32,33 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/world/zoneserver.h eqemu/world/zoneserver.h
*** eqemu.original/world/zoneserver.h Fri Jan 18 22:12:04 2002
--- eqemu/world/zoneserver.h Thu Jan 31 15:52:40 2002
***************
*** 145 ****
--- 146,148 ----
+ else{
+ return false;
+ }

alkrun
01-31-2002, 10:57 AM
ZONE DIRECTORY
----------------------------------------------------------
diff --context=0 -d -B eqemu.original/zone/Map.cpp eqemu/zone/Map.cpp
*** eqemu.original/zone/Map.cpp Fri Jan 18 14:36:00 2002
--- eqemu/zone/Map.cpp Thu Jan 31 15:56:46 2002
***************
*** 3 ****
! #include <iostream.h>
--- 3 ----
! #include <iostream>
***************
*** 7 ****
--- 8,9 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/Quest.cpp eqemu/zone/Quest.cpp
*** eqemu.original/zone/Quest.cpp Thu Jan 17 09:44:50 2002
--- eqemu/zone/Quest.cpp Thu Jan 31 15:56:46 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 14 ****
--- 15,16 ----
+
+ using namespace std;
Only in eqemu/zone: Zone.vcproj
diff --context=0 -d -B eqemu.original/zone/client.cpp eqemu/zone/client.cpp
*** eqemu.original/zone/client.cpp Mon Jan 21 06:08:16 2002
--- eqemu/zone/client.cpp Thu Jan 31 15:56:46 2002
***************
*** 1,2 ****
! #include <iostream.h>
! #include <iomanip.h>
--- 1,2 ----
! #include <iostream>
! #include <iomanip>
***************
*** 32 ****
--- 33,34 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/client_process.cpp eqemu/zone/client_process.cpp
*** eqemu.original/zone/client_process.cpp Mon Jan 21 07:41:34 2002
--- eqemu/zone/client_process.cpp Thu Jan 31 15:56:46 2002
***************
*** 1,2 ****
! #include <iostream.h>
! #include <iomanip.h>
--- 1,2 ----
! #include <iostream>
! #include <iomanip>
***************
*** 28 ****
--- 29,30 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/entity.cpp eqemu/zone/entity.cpp
*** eqemu.original/zone/entity.cpp Sun Jan 20 16:15:18 2002
--- eqemu/zone/entity.cpp Thu Jan 31 15:59:42 2002
***************
*** 684 ****
--- 685 ----
+ return name;
diff --context=0 -d -B eqemu.original/zone/faction.cpp eqemu/zone/faction.cpp
*** eqemu.original/zone/faction.cpp Fri Jan 4 21:33:38 2002
--- eqemu/zone/faction.cpp Thu Jan 31 15:56:46 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 15 ****
--- 16,17 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/hate_list.cpp eqemu/zone/hate_list.cpp
*** eqemu.original/zone/hate_list.cpp Sat Jan 19 22:53:42 2002
--- eqemu/zone/hate_list.cpp Thu Jan 31 15:56:48 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 5 ****
--- 6,7 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/loottables.cpp eqemu/zone/loottables.cpp
*** eqemu.original/zone/loottables.cpp Fri Jan 4 22:22:20 2002
--- eqemu/zone/loottables.cpp Thu Jan 31 15:56:48 2002
***************
*** 2 ****
! #include <iostream.h>
--- 2 ----
! #include <iostream>
***************
*** 8 ****
--- 9,10 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/net.cpp eqemu/zone/net.cpp
*** eqemu.original/zone/net.cpp Mon Jan 21 05:19:18 2002
--- eqemu/zone/net.cpp Thu Jan 31 15:59:44 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 28 ****
--- 29,30 ----
+ using namespace std;
+
***************
*** 372 ****
! size_t len;
--- 374 ----
! size_t len = 0;
diff --context=0 -d -B eqemu.original/zone/spawngroup.cpp eqemu/zone/spawngroup.cpp
*** eqemu.original/zone/spawngroup.cpp Fri Jan 4 21:12:38 2002
--- eqemu/zone/spawngroup.cpp Thu Jan 31 15:56:48 2002
***************
*** 4 ****
! #include <iostream.h>
--- 4,6 ----
! #include <iostream>
!
! using namespace std;
diff --context=0 -d -B eqemu.original/zone/worldserver.cpp eqemu/zone/worldserver.cpp
*** eqemu.original/zone/worldserver.cpp Mon Jan 21 06:08:14 2002
--- eqemu/zone/worldserver.cpp Thu Jan 31 15:56:48 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 4 ****
! #include <iomanip.h>
--- 4 ----
! #include <iomanip>
***************
*** 42 ****
--- 43,44 ----
+
+ using namespace std;
diff --context=0 -d -B eqemu.original/zone/zone.cpp eqemu/zone/zone.cpp
*** eqemu.original/zone/zone.cpp Mon Jan 21 03:19:36 2002
--- eqemu/zone/zone.cpp Thu Jan 31 15:56:48 2002
***************
*** 1 ****
! #include <iostream.h>
--- 1 ----
! #include <iostream>
***************
*** 23 ****
--- 24,25 ----
+
+ using namespace std;

rubydefiance
06-04-2002, 01:46 PM
Can someone post a quick walkthrough from source to exe for zone.exe? I just installed VS .Net but haven't worked with it before. Don't need a big explanation, just the basics. I have all the necessary include files but am not sure where in .Net to define what directory I put them in so they get included. When I do a build it says no such file or directory. I'm also getting depricated errors.

Lon

rubydefiance
06-04-2002, 03:17 PM
NM, got it to compile, didn't change anything really so I got those deprication warnings as well as a few others. The server executed, gonna go try that now, and then prolly fix the deprication errors as explained above. Next time I compile I'll post it.. wait I'll just do that now... here's the log of Build Zone currently:

------ Rebuild All started: Project: Zone, Configuration: Debug Win32 ------

Deleting intermediate files and output files for project 'Zone', configuration 'Debug|Win32'.
Compiling...
timer.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
serverinfo.cpp
races.cpp
packet_functions.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
packet_dump_file.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
packet_dump.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
Mutex.cpp
moremath.cpp
MiscFunctions.cpp
EQNetwork.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
database.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
classes.cpp
zone.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
worldserver.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
WesQuests.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
d:\temp\eqemu\zone\WesQuests.cpp(101) : warning C4553: '==' : operator has no effect; did you intend '='?
spells.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
spawngroup.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
spawn2.cpp
Quest.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
PlayerCorpse.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
petitions.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
Object.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
NpcAI.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
npc.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
d:\temp\eqemu\zone\npc.cpp(664) : warning C4715: 'NPC::DatabaseCastAccepted' : not all control paths return a value
net.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
mob.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
Map.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
loottables.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
hate_list.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
groups.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
faction.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
entity.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
client_process.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
client.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
d:\temp\eqemu\zone\client.cpp(3825) : warning C4715: 'Database::CheckGuildDoor' : not all control paths return a value
attack.cpp
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: '_OLD_IOSTREAMS_ARE_DEPRECATED': name was marked as #pragma deprecated
d:\temp\eqemu\zone\attack.cpp(1041) : warning C4715: 'Mob::GetMonkHandToHandDamage' : not all control paths return a value
d:\temp\eqemu\zone\attack.cpp(1105) : warning C4715: 'Mob::GetMonkHandToHandDelay' : not all control paths return a value
Linking...

Build log was saved at "file://d:\temp\eqemu\Build\Zone\Debug\BuildLog.htm"
Zone - 0 error(s), 33 warning(s)


---------------------- Done ----------------------

Rebuild All: 1 succeeded, 0 failed, 0 skipped


If you have any suggestions to get this warning free, let me know.

Lon

*** UPDATE ***

Once I zoned in for the first time, I immediately went LD, and zone.exe crashed, so I loaded debugger and got:

Unhandled exception at 0x004b25e2 in ZoneLK.exe: 0xC0000005: Access violation reading location 0x017890f2.

*** SEE NEXT POST, EXCEEDED 10000 CHAR LIMIT ON POST ***

rubydefiance
06-04-2002, 03:32 PM
This is the exact same error as I got when someone else on this board posted zone.exe that they compiled for my to use. Looks like I may just be waiting for the next emu release, so much work for nothing! Here's a paste of the zone.exe window right before it died:

Using database 'eq' at localhost
Loading zone names, items & NPCs...done.
Spells loaded from 'spdat.eff'.
Loading guild ranks...done.
Loading faction data...done.
Connected to worldserver: 127.0.0.1:9000
Entering sleep mode
Map: Maps\ecommons.map not found.
ZoneID = 22
Reading zhdr file './cfg/ecommons.cfg'
Using database for safe coords.
Zone safe coords are x = 4947; y = 8; z= 0
-----------
Zone server 'ecommons' listening on port:7995
-----------
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13147, lootdrop_id=338
Error in AddLootDropToNPC: dbitem=0, item#=13984, lootdrop_id=3372
Error in AddLootDropToNPC: dbitem=0, item#=13984, lootdrop_id=3372
Error in AddLootDropToNPC: dbitem=0, item#=13984, lootdrop_id=3372
182743 New client from ip: 24.49.187.141 port: 3440
Login packet 1 (OP_SetDataRate = 10)
Unexpected packet during CLIENT_CONNECTING2: OpCode: 0xe821, size: 4
0: 00 00 20 41 | .. A
Unexpected packet during CLIENT_CONNECTING2: OpCode: 0xe821, size: 4
0: 00 00 20 41 | .. A
Login packet 2
Loaded playerprofile for Wylen - size: 8244/8244
Loaded alt_adv_table for Wylen - size: 256/256
Login packet 3
Unexpected packet during CLIENT_CONNECTING4: OpCode: 0xf520, size: 8
0: 00 00 05 00 0B 00 00 00 | ........
Unexpected packet during CLIENT_CONNECTING4: OpCode: 0xf520, size: 8
0: 00 00 05 00 0B 00 00 00 | ........
Zhdr request (Login 4)
Sending zonepoints...done
Sending objects...done
Enterzone complete (Login 5)
Sending doorspawns...done


What I found interesting is that one of the bugs in the compile had something to do with doors, and the last thing I see the zone.exe window do is something with doors. Are the problems related perhaps?

Lon

rubydefiance
06-04-2002, 07:12 PM
OK I kind of found out what's going on here. Turns out, zone.exe that I generated does actually work, but it crashes some zones. I just happened that zones I was in were ones that were insta-crash, ecommons and neriakb. I found that both grobb and oggok zones work fine, but haven't had a chance to check any others. Maybe those others that have compiled their own to get back the skills should check and see if these zones crash for them too. Anyway, I was able to use #setallskill on my chars in those two good zones, equip secondary weapons where appropriate, and I am now going to load the official 3.3.1 zone.exe's back up and see if those skills stick with the stable executeables.

Lon

*** UPDATE ***

I was able to go back to using the offical zone.exe file and my skills stuck, still functioned, and I still had dual wield, so for the time being, until they get the next version of the emu out, you can still use a self-compiled zone.exe to #setallskill 252 your characters in a safe zone (oggok and grobb are two I've found that work) and revert to the official release for normal play.

Lon

Lyenu X`Arie
06-08-2002, 04:29 AM
You have to worry about more than just vs6. Does it compile on linux is what you need to worry about. As VC6 and 7 work together pretty good. Also you can compile in VC7 as is, just you get a buncha warnings because of the new standards it has, but thats oke, still works fine ;-)

ramccor
06-08-2002, 02:17 PM
I took most of his changes and tried them on the linux version. Under GCC 2.95 it works fine. In order to get it to compile under GCC 3.x it required a few more files to be modifed. I need to figure out to best fix the dump_packet.cpp and dump_packet_file.cpp to compile under GCC 3.x but otherwise it is doing well.

Once the 0.3.4 code is released, I will update the patch to work with those, plus some makefile reconstruction. Also added in my patch will be the ability to lock a zone server onto a single zone.

the question is, should I post the patch here, or just link to the patch file?

Q-Dog
06-08-2002, 04:51 PM
Does the Vs7 build run any better because of the CLR and Freakin Awsome built in memory management?.. Just wanted to know.

theCoder
06-09-2002, 05:13 AM
Just out of curiosity, what is the "Freakin Awsome built in memory management" you're talking about? I haven't played around with any of the .NET stuff (or seen a decent explanation as to what it is), so I really don't have any idea why VS.net can't compile standard c++ code. Anyone have a quick explanation for me?

rubydefiance
06-10-2002, 01:30 AM
Run any better? Like I stated above, it wasn't even stable for me. Half the zones crashed on load. The .exe file was also over double the size of the official release. I haven't checked out the memory usage at execution though.

Lon

ramccor
06-10-2002, 03:02 AM
I dont know if it is any sign or not, but the code size does increase a bit using GCC 2.95 (under linux) with this patch, but it seems just as stable. (I think I gained about 1K to each executable.)

Good luck with the .Net platform, I hope you get it working right. The more compilers it works with out of the box the better :-)

rubydefiance
06-10-2002, 02:43 PM
Are these line numbers for 3.3.1? They don't seem to line up with the code I have, and I've gotten rid of all the warnings except all the C4995: _OLD_IOSTREAMS_ARE_DEPRECATED. My server still crashes on most zones loading (official release does not crash). Oggok and Grobb are 2 that do not crash, and both Commonlands do crash, as examples. Do you think this is a problem with VC7? Someone else sent me their executable that they compiled with VC7 and I have the same problems with most zones crashing zone.exe on load. Any help would be appreciated with getting rid of the errors and also with compiling a zone.exe that won't crash on my WinXP machine, thanks.

Lon

rubydefiance
06-12-2002, 12:10 PM
*** UPDATE 6/12/2002 ***

I have finally narrowed things down. If I load the VC7 compiled 3.3.1 in east commons for example, my client immediately disconnects and my ping slowly goes to 100% and I die back to character select, and zone.exe crashes, as state above. BUT, if I take the exact same scenario, except I delete all ecommons mobs from spawn2 table in the db, my client is FINE, and no crash. As soon as I add ANY ONE MOB back to the spawn2 table, it goes right back to crashing. This happened to anyone else? If you test it, do it in east commons, as not every zone crashes for me, only about half of them :P. BTW, I am using the Lurker_39 db.

Lon

rubydefiance
06-16-2002, 03:52 PM
*** YET ANOTHER UPDATE ***

Ran the VC7 debugger upon crashof zone.exe. I must admit, not too shabby. It showed the crashing line of code, Ln 236 of faction.cpp. After seeing this, I deleted my entire npc_faction table from my eq database, and reran the emu. Guess what? NO CRASHES. So now here's my delima. Is it the code or my npc_faction data? The data was not crashing the official emu release, just my VC7 compiled zone.exe's. The error was:

Unhandled exception at 0x004be3b2 in Zone.exe: 0xC0000005: Access violation reading location 0x00e1710a.

My line 236 was:

fm->deity_mod = faction_array[faction_id]->mod_d[modd_tmp];

The only thing I can think of doing now to possibly further debug is to find out which piece(s) of data in the npc_faction table are causing the crashes. Any suggestions on how to further debug this are greatly appreciated, thanks buds.

Lon

theCoder
06-20-2002, 01:07 PM
Looks suspiciously like one of those two variables overran the length of the array, but really, it could be many things (like a freed pointer not made null). It would have been best had you left your database in the crashing state so that you could reproduce the bug and hopefully figure out what was going on. VC has typically been very good (at least VC6, the last version I've used) about debugging. If you can get it to crash there again, examine the state of the variables and objects. Try to figure out what's going on. And there may not be anything wrong with that line, just the state of the system when it gets there.

However, if repopulating the DB did make the problem go away, that probably means that the code works in good scenereos, but crashes in exceptional cases (instead of failing gracefully).

Velosity
06-17-2003, 10:04 PM
Ok i have Visual Studio 6, i downloaded the source i updated the define of max doors in doors.h, go into VS6, i had to open everything in the source, then the compile button was selectable, i click it, i get an error saying the file has no combile tool with it =-(