Jump to content
TrinityCore

"unknown column" "missing table" "duplicate column" error / sql problems / SQLDriverLogFile < answer on 1st post of 1st page


Apple
 Share

Recommended Posts

--- Canned message start ---

If this is your 1st time with TrinityCore read http://collab.kpsn.org/display/tc/TrinityCore+Home

Also read http://www.trinitycore.org/f/topic/1518-trouble-with-your-trinity-install-readme-1st-faqs/

Also please Look in upper right hand corner of the forum, there is a button labeled search field, feel free to search for your issues first before posting, most questions like this one have already been answered.

If you still cannot find the answers you seek feel free to make a post and tell us the steps you took to resolve this issue and we will do our best to help you.

--- Canned message end ---

Link to comment
Share on other sites

Someone test SQL before commiting???

What i'm doing:

Create database and execute sql file - ...sqlbaseauth_database.sql

Go to updatesauth folder, and try to execute update sql files, and what i'm getting: 

2013_09_10_00_auth_misc_434.sql:


[Err] 1146 - Table 'auth.rbac_role_permissions' doesn't exist
[Err] -- Add new permissions
DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+13;
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
(@id+0, 'modify currency'),
(@id+1, 'debug phase');


-- Add permissions to "corresponding Commands Role"
DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+13;
INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES
(3, @id+0),
(4, @id+1);
[Msg] Finished - Unsuccessfully
--------------------------------------------------
2014_05_06_00_auth_battlenet_434.sql:


[Err] 1060 - Duplicate column name 'Region'
[Err] ALTER TABLE `realmlist`
  ADD `Region` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 AFTER `gamebuild`,
  ADD `Battlegroup` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 AFTER `Region`;


--
-- Table structure for table `battlenet_account_bans`
--


DROP TABLE IF EXISTS `battlenet_account_bans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
[Err] 1050 - Table 'battlenet_account_bans' already exists
[Err] CREATE TABLE `battlenet_account_bans` (
  `id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Account id',
  `bandate` int(10) unsigned NOT NULL DEFAULT '0',
  `unbandate` int(10) unsigned NOT NULL DEFAULT '0',
  `bannedby` varchar(50) NOT NULL,
  `banreason` varchar(255) NOT NULL,
  `active` tinyint(3) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`,`bandate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Ban List';
/*!40101 SET character_set_client = @saved_cs_client */;


--
-- Dumping data for table `battlenet_account_bans`
--


LOCK TABLES `battlenet_account_bans` WRITE;
/*!40000 ALTER TABLE `battlenet_account_bans` DISABLE KEYS */;
/*!40000 ALTER TABLE `battlenet_account_bans` ENABLE KEYS */;
UNLOCK TABLES;


--
-- Table structure for table `battlenet_accounts`
--


DROP TABLE IF EXISTS `battlenet_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `battlenet_accounts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
  `email` varchar(320) NOT NULL,
  `sha_pass_hash` varchar(64) NOT NULL DEFAULT '',
  `v` varchar(256) NOT NULL DEFAULT '',
  `s` varchar(64) NOT NULL DEFAULT '',
  `joindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_ip` varchar(15) NOT NULL DEFAULT '127.0.0.1',
  `failed_logins` int(10) unsigned NOT NULL DEFAULT '0',
  `locked` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `lock_country` varchar(2) NOT NULL DEFAULT '00',
  `last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `online` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `locale` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `os` varchar(3) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='Account System';
/*!40101 SET character_set_client = @saved_cs_client */;


-- Table structure for table `battlenet_components`
--


DROP TABLE IF EXISTS `battlenet_components`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `battlenet_components` (
  `Program` varchar(4) NOT NULL,
  `Platform` varchar(4) NOT NULL,
  `Build` int(11) unsigned NOT NULL,
  PRIMARY KEY (`Program`,`Platform`,`Build`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;


--
-- Dumping data for table `battlenet_components`
--


LOCK TABLES `battlenet_components` WRITE;
/*!40000 ALTER TABLE `battlenet_components` DISABLE KEYS */;
INSERT INTO `battlenet_components` VALUES
('Bnet','Cmp1',3),
('Bnet','Win',21719),
('Bnet','Win',26487),
('Bnet','Wn64',26487),
('Tool','Win',1569),
('Tool','Win',2736),
('WoW','base',12340),
('WoW','base',15595),
('WoW','enGB',12340),
('WoW','enGB',15595),
('WoW','enUS',12340),
('WoW','enUS',15595),
('WoW','Win',12340),
('WoW','Win',15595),
('WoW','Wn64',15595);
/*!40000 ALTER TABLE `battlenet_components` ENABLE KEYS */;
UNLOCK TABLES;


--
-- Table structure for table `battlenet_modules`
--


DROP TABLE IF EXISTS `battlenet_modules`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `battlenet_modules` (
  `Hash` varchar(64) NOT NULL,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Type` varchar(8) NOT NULL,
  `System` varchar(8) NOT NULL,
  `Data` text,
  PRIMARY KEY (`Hash`),
  UNIQUE KEY `uk_name_type_system` (`Name`,`Type`,`System`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;


--
-- Dumping data for table `battlenet_modules`
--


LOCK TABLES `battlenet_modules` WRITE;
/*!40000 ALTER TABLE `battlenet_modules` DISABLE KEYS */;
INSERT INTO `battlenet_modules` VALUES
('19c91b68752b7826df498bf73aca1103c86962a9a55a0a7033e5ad895f4d927c','Password','auth','Mc64',NULL),
('1af5418a448f8ad05451e3f7dbb2d9af9cb13458eea2368ebfc539476b954f1c','RiskFingerprint','auth','Mc64',NULL),
('207640724f4531d3b2a21532224d1486e8c4d2d805170381cbc3093264157960','SelectGameAccount','auth','Mac',NULL),
('2e6d53adab37a41542b38e01f62cd365eab8805ed0de73c307cc6d9d1dfe478c','Password
[Msg] Finished - Unsuccessfully
--------------------------------------------------
2014_06_01_00_auth_battlenet_434.sql:


[Err] 1060 - Duplicate column name 'battlenet_index'
[Err] ALTER TABLE `account`
  ADD `battlenet_index` tinyint(3) unsigned DEFAULT NULL AFTER `battlenet_account`,
  ADD UNIQUE KEY `uk_bnet_acc` (`battlenet_account`, `battlenet_index`);
[Msg] Finished - Unsuccessfully
--------------------------------------------------

2014_06_23_00_auth_action_ip_logger.sql:


[Err] 1060 - Duplicate column name 'last_attempt_ip'
[Err] ALTER TABLE `account` ADD COLUMN `last_attempt_ip` VARCHAR(15) NOT NULL DEFAULT '127.0.0.1' AFTER `last_ip`;
[Err] 1050 - Table 'logs_ip_actions' already exists
[Err] CREATE TABLE `logs_ip_actions` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique Identifier',
`account_id` INT(10) UNSIGNED NOT NULL COMMENT 'Account ID',
`character_guid` INT(10) UNSIGNED NOT NULL COMMENT 'Character Guid',
`type` TINYINT(3) UNSIGNED NOT NULL,
`ip` VARCHAR(15) NOT NULL DEFAULT '127.0.0.1',
`systemnote` TEXT NULL COMMENT 'Notes inserted by system',
`unixtime` INT(10) UNSIGNED NOT NULL COMMENT 'Unixtime',
`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp',
`comment` TEXT NULL COMMENT 'Allows users to add a comment',
PRIMARY KEY (`id`)
)
COMMENT='Used to log ips of individual actions'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
[Msg] Finished - Unsuccessfully
--------------------------------------------------

Link to comment
Share on other sites

Someone test SQL before commiting???

Someone must read wiki before say stupid things.

--- Canned message start ---

If this is your 1st time with TrinityCore read http://collab.kpsn.org/display/tc/TrinityCore+Home

Also read http://www.trinitycore.org/f/topic/1518-trouble-with-your-trinity-install-readme-1st-faqs/

Also please Look in upper right hand corner of the forum, there is a button labeled search field, feel free to search for your issues first before posting, most questions like this one have already been answered.

If you still cannot find the answers you seek feel free to make a post and tell us the steps you took to resolve this issue and we will do our best to help you.

--- Canned message end ---

Link to comment
Share on other sites

Is it hard to point on error? Helpers....

Yes, it is not my  FIRST time. i've already readed those docs  and i CAN'T! find text, that can help me to solve the PROBLEM!

There is no DATE on database file, so i apply ALL updates from UPDATESAUTH Directory.

And getting errors  - http://www.trinitycore.org/f/topic/10216-sql-error/

proccess already written here!


Oh wait, RBAC tables have been removed, but updates don't? 

Link to comment
Share on other sites

http://www.trinitycore.org/f/topic/1518-trouble-with-your-trinity-install-readme-1st-faqs/#entry47071

Another very common error is to try to apply auth/character updates into a fresh downloaded core, the base files for auth/characters are updated every time they need to be updated and you don't need to run them on new server install.

Also, on wiki:

Important

Icon

Note: There are multiple .sql files to choose from in the .7z archive. If this is your first time installing TrinityCore, you will want to import ONLY the file with "TDB_full" at the beginning.

The other files are for updating existing world and characters databases from a previous compilation. This makes it easy to update your databases from one compilation to the next as explained in the section above.

If you downloaded TDB 53 or higher NEVER apply sql files on sqlold directory, those files are only needed for people updating core between TDB releases dates.

Also don't apply sql files on sql/updates/auth or sql/updates/world on your fresh instalation, those files are only needed to update between versions.

NEVER ENABLE CONTINUE ON ERROR ON YOUR SQL CLIENT. Also, you don't need to run sql files inside update_only on 1st instalations.

Create the three databases by importing ...sqlcreatecreate_mysql.sql. You now have three databases - auth, characters, and world. You may need to refresh your program in order to see the new databases.

Click on the "auth" database and import the auth database structure by importing ...sqlbaseauth_database.sql.

Click on the "characters" database and import the characters database structure by importing ...sqlbasecharacter_database.sql.

Click on the "world" database and import the world database structure by extracting and importing the "TDB_full_*.sql" file you downloaded from the Download section.

Click on the "world" database and import any *.sql file available in your ...sqlupdatesworld folder.

NOTICE WE NEVER IMPORT sqlupdatesauth or sqlupdatescharacter files on fresh installation.

NEVER ENABLE CONTINUE ON ERROR ON YOUR SQL CLIENT

Important

Icon

IF THIS IS YOUR FIRST TIME INSTALLING TrinityCore DON'T apply any *.sql file on sqlupdatesauth or sqlupdatescharacters. Continue with SETTING UP THE SERVER. NOTICE YOU STILL NEED TO APPLY sqlupdatesworld files.

Link to comment
Share on other sites

You don't get it: Use mysql -u username -pPASSWORD database < hugefiletoimport.sql instead GUIs

 

Sorry dont understand what you mean, where do I use username password for what?

 

And about the sql anyway now I've split the world update into smaller sqls so it can process it, getting this error on last part

 

Query:
DELETE FROM `spell_custom_attr` WHERE `entry` IN (72347)


Error occured at:2014-07-04 01:12:45
Line no.:308
Error Code: 1146 - Table 'world.spell_custom_attr' doesn't exist
Link to comment
Share on other sites

 

Lost connection errors can also be a t

imeout error. If the query is too large it can exceed the timeout and cause the connection to drop. Instead of combining the SQL into one big file, why not import them one at a time?

 

Here is the script I wrote for Windows.

 

Thank you for the link although I've split the big update into smaller folders then made 3 sqls shift+left click command window - copy *.sql ,and last sql is giving me that error in my previous post.

Link to comment
Share on other sites

 

 

 

Thank you for the link although I've split the big update into smaller folders then made 3 sqls shift+left click command window - copy *.sql ,and last sql is giving me that error in my previous post.

 

 

That error means a table is missing. Either you didn't create your database properly or, if that table isn't in the "create" SQL files, you missed an update that adds it.

 

This is the SQL that creates the table, it's from an old bug report / fix posted on github in January:

 

2014_01_31_00_world_spell_custom_attr.sql

 

Copy all of it into an SQL file and execute it on your database to create the table. Then import again the one that gave you the error.

Link to comment
Share on other sites

That error means a table is missing. Either you didn't create your database properly or, if that table isn't in the "create" SQL files, you missed an update that adds it.

 

This is the SQL that creates the table, it's from an old bug report / fix posted on github in January:

 

2014_01_31_00_world_spell_custom_attr.sql

 

Copy all of it into an SQL file and execute it on your database to create the table. Then import again the one that gave you the error.

Thanks ive put that in but now I'm getting this

 

Query:
ALTER TABLE `creature_classlevelstats` CHANGE `comment` `comment` TEXT NULL DEFAULT NULL


Error occured at:2014-07-05 03:32:09
Line no.:417
Error Code: 1054 - Unknown column 'comment' in 'creature_classlevelstats'

I've checked are these some 3.3.5 sql's? I'm trying to run a 4.3.4 server, why do i need these, I mean I'm just trying to run this world update for the TDB and it gives these errors thats just not right. I dont understand why doesnt this TDB_full_434.05_2013_07_17.7z from here http://www.trinitycore.org/f/files/file/9-tdb-full-434/ work with this update here https://github.com/TrinityCore/TrinityCore_4.3.4_DB_Alpha ? Or atleast why doesnt it work on my computer I just added the world database then that update and it gives errors, it cant be right

 

EDIT:I found this https://github.com/TrinityCore/TrinityCore/commit/894eb9a4454971ad2a2bf290fd3e2ea9e9a46fd0 I tried making a sql out of this lol and execute it had an error lol :P

 

Quote

Create the three databases by importing ...sqlcreatecreate_mysql.sql. You now have three databases - auth, characters, and world. You may need to refresh your program in order to see the new databases.

Click on the "auth" database and import the auth database structure by importing ...sqlbaseauth_database.sql.

Click on the "characters" database and import the characters database structure by importing ...sqlbasecharacter_database.sql.

Click on the "world" database and import the world database structure by extracting and importing the "TDB_full_*.sql" file you downloaded from the Download section.

Click on the "world" database and import any *.sql file available in your ...sqlupdatesworld folder.

NOTICE WE NEVER IMPORT sqlupdatesauth or sqlupdatescharacter files on fresh installation.

NEVER ENABLE CONTINUE ON ERROR ON YOUR SQL CLIENT

 

Click on the "world" database and import any *.sql file available in your ...sqlupdatesworld folder.  

 

We dont do this for 4.3.4 right?

Edited by jkz
Link to comment
Share on other sites

Well anyhow I managed to get a server running yay  :D  :D  B)  thanks to the very helpful and polite AkwardDev from AC-web who gave me a clean world update for the TDB_full_434.05_2013_07_17.7z.sql I guess he made some custom update since it didnt give any errors unlike this https://github.com/TrinityCore/TrinityCore_4.3.4_DB_Alpha If anyone needs that message me or I dont know, maybe I can post it here if its ok?

 

 

Sorry dude but thats pretty vague for my specific problem, I mean I understand you're having similar or same questions hundreds times per day but I really cant help you with that, maybe if you're stressed out you should just take a vacation or something. Because not only did you give me a link to the first page that I've already seen and isn't really helpful in my case but you wrote that I should return my computer somewhere, and that really doesnt have anything to do with nothing here except your frustration. So my friendly advice would be to try being more specific and also patient if you're role here is helping people out, if youre role is being a bitchy forum smartass posting sassy content then I guess you're fine. 

Link to comment
Share on other sites

Vage? it's 100% exact how to do the work, if you are unable to follow those steps, stop trying it, btw, now you have TDB 4.3.4-06 and more updates, what you go to do? return again asking for help to AkwardDev?

 

What do you mean i have TDB 4.3.4-06, I have the version he sent me, and yes if i have problems i have no other solution but ask him, since he was the only one who helped me atleast start and play my server. And about this trinity installation I guess I can repeat my problem again, so you've sent me to the first page where it says

 

For wow 4.3.4:

1) Clone 4.3.4 branch.

2) Import sql/create/create_mysql.sql

3) Import sql/base/auth_database.sql

4) Import sql/base/character_database.sql

5) Download TDB 4.3.4

6) Apply TDB 4.3.4

7) DON'T apply updates from sql/updates/world

8) Clone TDB 4.3.4

9) Apply updates from TDB repo updates

10) DON'T apply updates from sql/updates/world

11) Profit.

12) NOTICE WE NEVER IMPORT sql/updates/auth or sql/updates/character files on fresh installation.

 

 

I've done all of that, and 

TDB_full_434.05_2013_07_17.7z.sql + ( https://github.com/TrinityCore/TrinityCore_4.3.4_DB_Alpha ) world_updates.sql = SQL errors

Atleast for me last week, downloaded the same files that evening and got errors, first it was file to large but when I solved that had sql errors that were related to world_updates.sql

Only difference from these instructions on the first page is I had to download it to my desktop and not clone folders with GIT, I dont think that should be a problem, correct me if I'm wrong.

Link to comment
Share on other sites

Do you realize, that the updates folder now needs TDB 4.3.4-06 and not TDB 4.3.4-05?

 

Oh so this http://www.trinitycore.org/f/files/file/9-tdb-full-434/ got updated nice, I was writing what I had last week. Hmm I just strted checking out my version and there is already some in-game langauge problems lol some chars cant speak so probably gonna recompile this sooner then later. hmm hmm :P i'll check that out and probably come back let you know if there are any issues so stay tuned :P peace and see you aokromes my pal ^_^  ;)

Link to comment
Share on other sites

ok, im back .b so ive tested the new sql started my server, and its fine something like I've expected just one thing, again worgen and goblin dont have any languages cant speak. Do i change that in playercreateinfo_skill table, what numbers do I have to put there or do i do something else to enable that?

Link to comment
Share on other sites

Hi,

This is my first time installing local Trinity Core 3.3.5a on windows, so I followed this guide http://collab.kpsn.org/display/tc/How-to_Win and after I followed http://collab.kpsn.org/display/tc/Database_master but when I arrive to the point "Installing trinity datebases" i cannot succeded in creating "Aut" and "Characters". I am using heidiSQL.

I describe what i exactly make:

I open the file create_mysql.sql. in C:sqlcreate with double click;

I set all in the same as the picture.

But after having clicked "open" i don't find the auth and characters databases on the sidebar of Heidisql. (i don't see any kind of error)

What can i do to solve the problem?

Sorry for my english.

post-21150-0-80950600-1405507641_thumb.p

Link to comment
Share on other sites

I would guess that you already had the world database there to beginwith.

Then as the create SQL runs, it fails since it tries to add the world database first and as it exists and the SQL doesnt drop or do IF NOT EXISTS or similar, it fails.

Due to failing the SQL is likely stopped ?_? so the databases are not created.

Dont run the SQL as an HeidiSQL startup script.

Run it normally through the query after starting heidi.

And before running it, you should not have the databases yet at all.

https://github.com/TrinityCore/TrinityCore/blob/master/sql/create/create_mysql.sql

Link to comment
Share on other sites

Well you didn't exactly do what the guide says:

 


  • In HeidiSQL, click on the database you want to use in order to "select" it, then click Tools > Load SQL File... > (select the file) > Run file(s) directly.

 

It doesn't say anything about double-clicking on the SQL file.

 

An even better option would be to try one of the other suggestions (SQLyog is far better than HeidiSQL)

 


  • In SQLYog, click on the database you want to use in order to "select" it, then click Database > Import > Execute SQL Script.
  • On mysql cli you must use mysql --default-character-set=utf8 to avoid import failures, WE STRONGLY RECOMMEND TO USE THIS METHOD over the SQLYog or HeidiSQL, it's the faster method by far to import TDB and needed updates.
  • Upvote 1
Link to comment
Share on other sites

I follow the guide for the second time, but when I reach that point is difficult to continue.

Answering to Mrsmite


Well you didn't exactly do what the guide says:



Quote


In HeidiSQL, click on the database you want to use in order to "select" it, then click Tools > Load SQL File... > (select the file) > Run file(s) directly.

 

Yes but in tools there isn't any option that says "load sql file".

I have made a screenshot to giustify what I am saying.

55bb39.png

But, after having done the many points of the guide, I arrive always in the same conditions of the upper screenshot (before refollow the processes I have deleted trinity and build folder and unistalled obviusly all the programs).

In heidisql i haven't put any startup script, and I have selected no databases.

 

Always sorry for my english and thanks to the help that are you giving to me :D.

Link to comment
Share on other sites

Well the guide isn't exactly "newbie friendly", it leaves a bit of guesswork for people who aren't familiar with the process. I've been here since before the guide was written so I never actually looked at it :)

 

Anyway, from your screenshot looks like you didn't do the first step of importing create_mysql.sql which will give you the three databases: auth, characters, world. Once those exist, you click on each of them, one at a time, and import the proper SQL file.

 

I don't use HeidiSQL but I think this is how you create the initial databases:

  1. Select your host in the left panel
  2. Click the "Query" tab in the right panel
  3. Click the icon that looks like a piece of paper with an arrow next to it
  4. Browse to the create_mysql.sql file and open it
  5. Click the "play" button ("execute sql file")

After this is done, follow the guide for importing the actual data.

Link to comment
Share on other sites

Click the icon that looks like a piece of paper with an arrow next to it

 

Is maybe this?

1f9266.png

Edit: I succeded in doing it using SQLyog. I delete the world database, so i was able to import it. I think SQLyog is far better than heidi. I succeded in creating one account and then i set gm level to 3 but when I try to insert the gm commands in the chat appears this messagge: "There is not a such sub command" (or something like this).

What can i do to fix it?

Edited by simoconfa
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


  • Similar Content

    • By xgamerninjax
      Hello all, first time posting here and it's really got me scratching my head.
      I've compiled everything on my own computer, and then transferred everything to a host computer so the server can stay live. The server was running fine for a month or so and then suddenly it just crashes when it hits "Loading C++ scripts", exiting saying "caught signal 22"
      I tried setting up the host computer from scratch and transferred everything over fresh and it's still happening for some reason. (Note, I can run the server perfectly on my personal pc where I compiled it.)
      Any help would be greatly appreciated, thanks!
      3d7e3a40e2b3+_worldserver.exe_[1-4_15-19-45].dmp 3d7e3a40e2b3+_worldserver.exe_[1-4_15-19-45].txt
    • By Rochet2
      A lot of people have asked how to debug so I made this short guide on how to set up debugging.
      This guide only tells you how to actually set up debugging in TrinityCore on Windows and Linux.
      This will not explain the basics of debugging. You can google those or play around with the debugger to learn.
      Here are a few videos that explain how to actually debug after setting debugging up on visual studio: https://youtu.be/0ebzPwixrJA and linux: https://www.youtube.com/watch?v=sCtY--xRUyI

      This guide contains multiple guides. Each list of bullet points is it's own guide.
      Make sure you can run the server normally before trying to debug.

      Windows:
      On Windows before anything you should check these
      - Before debugging or making crashlogs etc. with Visual Studio you must compile the core in "Debug" instead of "Release". You can select this in "Build>Configuration Manager" or at the top of Visual Studio window http://i.imgur.com/5oHd59j.png
      - You also need to move the new pdb files generate by compiling in debug mode on Visual Studio from the compile output folder (bin) to your server folder - these files contain information needed for debugging.
      - It is assumed that Solution Explorer is open. Open it by selecting "View>Solution Explorer" in Visual Studio http://i.imgur.com/hkW6Gk0.png
      -- You may want to click on the Home icon to reset the view on Solution Explorer http://i.imgur.com/N8UPwDh.png
      - You can place breakpoints in Visual Studio editor by right clicking a line of code and selecting "Breakpoint>Insert Breakpoint" http://i.imgur.com/L2TxBVG.png
      - At the top of the window you should see controls for stepping and continuing when you have started to debug.
      - Here is a video showing the basic Visual Studio functionality https://www.youtube.com/watch?v=Ijdk4z8-2OI
      Fastest way to debug on windows. This is the easiest way to start up debugging a script.
      - Start the authserver and worldserver normally
      - Open TrinityCore.sln in Visual Studio. This is what you usually open when you want to compile the core
      - In Visual Studio at the top select "Debug>Attach to process...>worldserver.exe" and click "Attach" http://i.imgur.com/jDEI2Hq.png
      - You are now debugging
       
      The second slower way of debugging on windows. This is useful for debugging something that occurs in the startup of the server.
      - Open TrinityCore.sln in Visual Studio. This is what you usually open when you want to compile the core
      - In solution explorer right click on worldserver and select "Set as StartUp Project" http://i.imgur.com/wvMzeRA.png
      - In solution explorer right click on worldserver and select "Properties" http://i.imgur.com/rTNEF9O.png
      -- In Properties you should go to "Configuration Properties>Debugging" and edit "Working Directory" to point to the server folder. For me this is the default compile folder so I use "$(OutDir)" http://i.imgur.com/aRI29fB.png
      - Start the authserver normally
      - Start the worldserver by selecting "Debug>Start Debugging". The server will start with debugging attached from the beginning http://i.imgur.com/cg1KJNw.png
      - You are now debugging
      Crashlogs on windows. Once you have a way to reproduce a crash you can get a crashlog that can help you resolve it.
      - After compiling the core in "Debug" instead of "Release" start up the worldserver and authserver
      - Reproduce the crash you have
      - In the server folder there is now a folder called Crashes that contains txt and dmp files. http://i.imgur.com/9eQIdql.png
      - You can open the txt files in text editors http://i.imgur.com/EH6R17E.png
      -- At the top of a txt file there is some information about your system and below it there is the Call Stack and below that there are Variables of each part of the call stack
      -- The Call Stack will tell you at the top what was the last function call before crashing and what function calls led to that function call.
      -- Next to the function names there is the file that the function is defined in and the line number the code was executing in that function.
      -- In the Variables section you can inspect variables that were present at each function call.
      -- Based on this information you are often able to see what crashed or get a better view of what you need to inspect more in your code.
      - The dmp file can be opened in Visual Studio
      -- Open TrinityCore.sln in Visual Studio. This is what you usually open when you want to compile the core
      -- Drag and drop the dmp file to Visual Studio
      -- In the window that opens click to "Debug with Native Only" http://i.imgur.com/OgyU2kM.png
      -- In the window popup click "Break" http://i.imgur.com/4jDzqRn.png
      -- You are now in a state like you would have hit a break point in the code or a crash while debugging. You can inspect the call stack and the variables.
      Edit and continue on windows. When debugging this allows you to change the code and without restarting the server apply those changes so they actually work ingame.
      - Open TrinityCore.sln in Visual Studio. This is what you usually open when you want to compile the core
      - In solution explorer right click on worldserver and select "Properties" http://i.imgur.com/rTNEF9O.png
      -- In Properties select "Configuration Properties>Linker>General" and set "Enable Incremental Linking" to "Yes". http://i.imgur.com/caQqwN5.png
      -- In Properties select "Configuration Properties>Linker>Advanced" and set "Image Has Safe Exception Handlers" to "No". http://i.imgur.com/FYzN8Ks.png
      -- In Properties select "Configuration Properties>C/C++>General" and set "Debug Information Format" to "Program Database for Edit And Continue". http://i.imgur.com/pxQ6I8N.png
      - At the top of the window select "Tools>Options". In the Options select "Debugging>General" and in there select "Enable Edit and Continue", "Enable Native Edit and Continue" and "Require source files to exactly match the original version".
      - Compile the server for the changes to take effect.
      - Set up "The second slower way of debugging" (I did not test edit and continue on other configurations)
      - Start the authserver normally
      - Start the worldserver by selecting "Debug>Start Debugging".
      - Try edit a cpp file a little and save it.
      - At top of Visual Studio window select "Debug>Apply Code Changes" and wait until the changes are applied. Warning: it can take considerable amount of time for the changes to be applied. http://i.imgur.com/77pb58E.png
      - If you have issues, be sure to check the error messages in Output. You can view it by selecting "View>Output" http://i.imgur.com/4cIznW9.png
      - This guide was written based on https://msdn.microsoft.com/en-us/library/esaeyddf.aspx and https://blogs.msdn.microsoft.com/vcblog/2015/07/22/c-edit-and-continue-in-visual-studio-2015/
      Linux:
      First we need to compile the server in debug mode.
      - Compile the server with the cmake flag -DCMAKE_BUILD_TYPE=Debug

      Debugging on linux. You can debug on linux by using GDB.
      - Here is a good video about it: https://www.youtube.com/watch?v=sCtY--xRUyI
      - Basically you
      -- Start the authserver
      -- Start the worldserver by using "gdb ./worldserver"
      -- Enter breakpoints by using break command on gdb
      -- Use the run command on gdb to start the server
      -- You are now debugging
      - You may also be interested in using VScode or some other more visual debuggers. https://www.youtube.com/watch?v=B0xTgyCwsAo
      Crashlogs on linux. Once you have a way to reproduce a crash you can get a crashlog that can help you resolve it.
      - Take crashreport.gdb from /contrib/debugger from source folder and place it to your server folder
      - Start the authserver
      - Start the worldserver by using "gdb -x crashreport.gdb ./worldserver"
      - Reproduce your crash
      - There should be a backtrace.log in your server folder that contains information about the crash like the callstack and variables in each function call in the call stack
      - This guide was written based on https://github.com/TrinityCore/TrinityCore/blob/master/contrib/debugger/README
      Running valgrind on linux. This helps you find memory errors like invalid reads and writes and memory leaks.
      - Here is a good video about it: https://www.youtube.com/watch?v=fvTsFjDuag8
      - Basically you
      -- Start the authserver
      -- Start the worldserver by using "valgrind ./worldserver"
      -- Run your code that you want to analyze and close the server
      -- The console or an output log should contain the valgrind log
    • By reyne
      Hey there!

      I've followed a few threads here about map extraction, and am still having issues. Originally, I was having the issue described here.
      After following the advice given in that thread (creating characters of both BC races and running around for a bit), I am no longer getting that error, however now I get the following error while trying to extract maps:

      `Error loading World\Maps\Expansion01\Expansion01_42_6.adt`

      This repeats for every line in Expansion01, and then the extractor crashes.

      I'm not sure where else to go from here.

      Thanks for your help

      Edit: I've created an 85 on an i85 server and flown all around Outland now, same issue.
    • By Uee
      I recently found the Trinity Cataclsym Preservation Project and thought I will try it out.
      I am already running 3.3.5a and Master - both server run great
      Pulled 4.3.4 down using Git and built it same way as others:
      boost_1_73_0 cmake 3.17.2 Mysql 5.7.30 VS Community 2019 Built fine - no issue. Used 'Extractor.bat' to run all the map extractors - worked great!
      Noticed there was extra file 'connection_patcher.exe`, ran that - worked great! Now have "wow_patched" and use this to launch client
      MySQL runs in standalone mode, -initialize, added base sql files, imported, auth and character sql files
      Configured both the .conf files and passwords, IPs etc are all in place.
      Note: When loading the exe and built conf file, bnetserver complain about these items missing, so I add them:
      Updates.AutoSetup = 1 Updates.EnableDatabases = 0 LoginDatabase.SynchThreads = 1 Load up Mysql - loads fine
      Load up bnetserver and appears to load ok - last few lines look like this:
      Connected to MySQL database at 127.0.0.1
      DatabasePool 'auth' opened successfully. 2 total connections running.
      Started auth database connection pool.
      Listening on connections from worldservers on port 1118...
      Load up worldserver and it adds the FULL world and hotfixes, then applied all updates (confirmed archived in SQL) - last few lines look like this:
      Calculate next monthly quest reset time...
      Calculate random battleground reset time...
      Calculate guild limitation(s) reset time...
      Calculate next currency reset time...
      World initialized in 0 minutes 13 seconds
      TrinityCore rev. d0c7bbab40bc 2020-05-06 00:01:21 +0200 (master branch) (Win64, RelWithDebInfo, Static) (worldserver-daemon) ready...
       
      There are no db errors in logs.
      Config.wtf contain portal, realmlist as remote server and patchlist as localhost.
      When I try to connecting using "user@local" and password I get immediately disconnected.
      What I did noticed different is that the bnetserver doesnt add "Added realm "Battle for Azeroth" at 192.168.10.213:8085." (From my Master log) 
      3.3.5a also have this line as last line in authserver - but 4.3.4 is not giving me this one.
      Realmlist table is accurate with right information.
      Anyone know why bnetserver is not starting me realm?
       
    • By Deer_Hunter
      Hello all,
      I just updated from the latest Git 
      Trinity Core REV. ac6baa547376 + 2020-02-21  3.3.5 Branch.
      I'm getting this error after crash.
      Problem signature:
        Problem Event Name:    APPCRASH
        Application Name:    worldserver.exe
        Application Version:    0.0.0.0
        Application Timestamp:    5e50a462
        Fault Module Name:    StackHash_f12f
        Fault Module Version:    6.3.9600.19629
        Fault Module Timestamp:    5e2fdc0d
        Exception Code:    c0000374
        Exception Offset:    PCH_9E_FROM_ntdll+0x0000000000090D0A
        OS Version:    6.3.9600.2.0.0.272.7
        Locale ID:    1033
        Additional Information 1:    f12f
        Additional Information 2:    f12f0934d3e965f73c68e60f20f2cd40
        Additional Information 3:    7595
        Additional Information 4:    7595e4d8d703db9dcd3d2f6ea540e357
      the exception code says its a Heap error,  I'm not sure how to troubleshoot this.
      Thanks
×
×
  • Create New...