Welcome to RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr) Mark forums read | View Forum Leaders
RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr)

Habbo Development Discuss, [DEV] Holograph Emulator - Total Database Pooling at Habbo Hotel forum; Quote: Originally Posted by Jakeyy If you read it, It says speach disconnections. Thats the cause. Cecer1 fixed it. I ...




Reply
Thread Tools
[DEV] Holograph Emulator - Total Database Pooling
 
 
GHOSTBUSTERS!

Rank: Member


Reply With Quote
 
Join Date: May 2007
Location: Norway
Posts: 310
11-18-2008, 03:00 PM
 
Quote: Originally Posted by Jakeyy View Post
If you read it, It says speach disconnections. Thats the cause. Cecer1 fixed it.
I know that, but i still get disconnected >.<
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-18-2008, 05:33 PM
 
Ok, I am resuming work now.
I see there are random DC still

I will look for more possible random DC causes, it appears to be where it lacks .Clone() on a Hashtable.
 
 
permalink
 

 
GHOSTBUSTERS!

Rank: Member


Reply With Quote
 
Join Date: May 2007
Location: Norway
Posts: 310
11-18-2008, 05:54 PM
 
Quote: Originally Posted by cecer1 View Post
Ok, I am resuming work now.
I see there are random DC still

I will look for more possible random DC causes, it appears to be where it lacks .Clone() on a Hashtable.
That's great! :D
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-18-2008, 07:24 PM
 
Ok, as people are reporting the Random DC I have updated the SVN

It also has a start surprise (You can disable it by setting Jingle false)
 
 
permalink
 

 
GHOSTBUSTERS!

Rank: Member


Reply With Quote
 
Join Date: May 2007
Location: Norway
Posts: 310
11-18-2008, 08:48 PM
 
Quote: Originally Posted by cecer1 View Post
Ok, as people are reporting the Random DC I have updated the SVN

It also has a start surprise (You can disable it by setting Jingle false)
That's GREAT! I have updated the server-folder and the new build are up and running :)
Btw, C# gave me 8 warnings before compiling, but i supose it is not something critical:
Code:
Warning    1    The variable 'nCs' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    40    17    Holograph Emulator
Warning    2    The variable 'nDs' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    42    17    Holograph Emulator
Warning    3    The variable 'nE' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    43    17    Holograph Emulator
Warning    4    The variable 'nF' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    44    17    Holograph Emulator
Warning    5    The variable 'nFs' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    45    17    Holograph Emulator
Warning    6    The variable 'nGs' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    47    17    Holograph Emulator
Warning    7    The variable 'nAs' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    49    17    Holograph Emulator
Warning    8    The variable 'NC' is assigned but its value is never used    D:\Poolong without DC\TDbP\Source\Core.cs    51    17    Holograph Emulator
Edit:
I still get disconnected :S
And the CPU hangs on 100% in about 30 sec when you cross out the hotelwindow
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Dec 2006
Location: The Netherlands
Posts: 59
11-18-2008, 09:43 PM
 
LoL, Jingle bells on server start :P
and yeah i got the errors too and sometimes i got the purple errors of mysql connection and that disconnects ppl
i have around 30 ppl on at that time ;)
 
 
permalink
 

 
Holo26 :)



Reply With Quote
 
Join Date: Aug 2008
Location: 127.0.0.1
Posts: 1,143
11-18-2008, 11:43 PM
 
Okay, testing the newest SVN Update.

EDIT: Goodness, this is really aggravating. I still get random disconnections.

Last edited by TimesCoder; 11-19-2008 at 12:50 AM.
 
 
permalink
 

 
Monster Member

Rank: New Blood


Reply With Quote
 
Join Date: Mar 2007
Posts: 199
11-19-2008, 03:32 AM
 
Ok I tried what some of you guys told me (to update the database and to download the 5.2.4 Connector at the beginning of the thread. I did both, and none have seemed to work. I even downloaded the 5.2.3 one since I know most of you are using it. None of them work. It continues to give me the message

Code:
>>mysql.ini found at C:\Documents and Settings\Administrator\Desktop\HH\bin\mysql.ini

>>system_config table contains invalid values for socket server configuration!
Here is my system_config table:

Code:
id	skey   	sval
1	server_game_port	21
2	server_game_maxconnections	4000
4	server_mus_port	22
5	server_mus_maxconnections	   50000
6	server_mus_host	127.0.0.1
3	server_game_backlog	25000
7	server_mus_backlog	5000
8	lang	en
9	welcomemessage_enable	0
10	wordfilter_enable	1
11	wordfilter_censor	bobba
12	chatanims_enable	1
13	trading_enable	1
14	recycler_enable	1
15	recycler_minownertime	43200
16	recycler_session_length	  60
17	recycler_session_expirelength	10080
18	rooms_loadadvertisement_img	http://ads.habbohotel.co.uk/max/adview.php?zoneid=325&n=hhuk
19	rooms_loadadvertisement_uri	  http://www.holographemulator.com/
20	statuses_wave_duration	1500
21	statuses_carryitem_sipamount	10
22	statuses_carryitem_sipinterval	9000
23	statuses_carryitem_sipduration	1000
24	rooms_roomban_duration	15
25	items_stacking_maxstackheight	20
28	navigator_roomsearch_maxresults	30
27	navigator_createroom_maxrooms	50
26	events_categorycount	11
29	navigator_opencategory_maxresults	30
30	navigator_favourites_maxrooms	30
31	events_deadevents_removeinterval	120
32	soundmachine_burntodisk_disktid	1355
35	game_bb_gamelength_seconds	240
34	game_scorewindow_restartgame_seconds	10
33	game_countdown_seconds	5
36	spectator_bar_enabled	1
Any help? I've tried everything.

EDIT: I just tried the old Holo (not the total database pooling) and it worked =\
 
 
permalink
 

 
Holo26 :)



Reply With Quote
 
Join Date: Aug 2008
Location: 127.0.0.1
Posts: 1,143
11-19-2008, 03:37 AM
 
Quote: Originally Posted by zamingus View Post
Ok I tried what some of you guys told me (to update the database and to download the 5.2.4 Connector at the beginning of the thread. I did both, and none have seemed to work. I even downloaded the 5.2.3 one since I know most of you are using it. None of them work. It continues to give me the message

Code:
>>mysql.ini found at C:\Documents and Settings\Administrator\Desktop\HH\bin\mysql.ini

>>system_config table contains invalid values for socket server configuration!
Here is my system_config table:

Code:
id    skey       sval
1    server_game_port    21
2    server_game_maxconnections    4000
4    server_mus_port    22
5    server_mus_maxconnections       50000
6    server_mus_host    127.0.0.1
3    server_game_backlog    25000
7    server_mus_backlog    5000
8    lang    en
9    welcomemessage_enable    0
10    wordfilter_enable    1
11    wordfilter_censor    bobba
12    chatanims_enable    1
13    trading_enable    1
14    recycler_enable    1
15    recycler_minownertime    43200
16    recycler_session_length      60
17    recycler_session_expirelength    10080
18    rooms_loadadvertisement_img    http://ads.habbohotel.co.uk/max/adview.php?zoneid=325&n=hhuk
19    rooms_loadadvertisement_uri      http://www.holographemulator.com/
20    statuses_wave_duration    1500
21    statuses_carryitem_sipamount    10
22    statuses_carryitem_sipinterval    9000
23    statuses_carryitem_sipduration    1000
24    rooms_roomban_duration    15
25    items_stacking_maxstackheight    20
28    navigator_roomsearch_maxresults    30
27    navigator_createroom_maxrooms    50
26    events_categorycount    11
29    navigator_opencategory_maxresults    30
30    navigator_favourites_maxrooms    30
31    events_deadevents_removeinterval    120
32    soundmachine_burntodisk_disktid    1355
35    game_bb_gamelength_seconds    240
34    game_scorewindow_restartgame_seconds    10
33    game_countdown_seconds    5
36    spectator_bar_enabled    1
Any help? I've tried everything.

EDIT: I just tried the old Holo (not the total database pooling) and it worked =\
Lol, nothing is wrong with the system_config.
It's that you have your MySQL details wrong, or you didn't config them.


Also: Still having random DC
 
 
permalink
 

 
Monster Member

Rank: New Blood


Reply With Quote
 
Join Date: Mar 2007
Posts: 199
11-19-2008, 03:43 AM
 
Lol ok. But the weird thing is that I can connect to the server on my 2nd computer using Navicat, but while using the same details on the host computer I can't connect to the server... strange. And why would the other server work but this one not? I just checked the mysql config files and both ones are the same... IDK why it isn't connecting.
 
 
permalink
 

 
Total Database Pooling

Rank: Member


Reply With Quote
 
Join Date: Aug 2006
Location: Some place in england
Posts: 286
11-19-2008, 04:01 AM
 
Ok, some of you may notice that you get big error messages such as this:
Code:
[02:50:29:27] [virtualUser.processPacket] » System.InvalidOperationException: Collection was modified;
enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Holo.Virtual.Users.virtualRoomUserStatusManager.ToString() in C:\Documents and Settings\Administr
ator\Desktop\...\Source\Virtual\Users\virtualRoomUserStatusManager.cs:line 136
   at Holo.Virtual.Users.virtualRoomUser.get_statusString() in C:\Documents and Settings\Administrator\
Desktop\...\Source\Virtual\Users\virtualRoomUser.cs:line 153
   at Holo.Virtual.Rooms.virtualRoom.sendShout(virtualRoomUser sourceUser, String Message) in C:\Docume
nts and Settings\Administrator\Desktop\...\Source\Virtual\Rooms\virtualRoom.cs:line 1236
   at Holo.Virtual.Users.virtualUser.processPacket(String currentPacket) in C:\Documents and Settings\A
dministrator\Desktop\...\Source\Virtual\Users\virtualUser.cs:line 2046
in the server... this helps a great deal. Please do send these to me as they will help solve this issue.

Sorry for the failure of last update but at least you got a nice out of tune song with it
 
 
permalink
 

 
Holo26 :)



Reply With Quote
 
Join Date: Aug 2008
Location: 127.0.0.1
Posts: 1,143
11-19-2008, 04:08 AM
 
Quote: Originally Posted by cecer1 View Post
Ok, some of you may notice that you get big error messages such as this:
Code:
[02:50:29:27] [virtualUser.processPacket] » System.InvalidOperationException: Collection was modified;
enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Holo.Virtual.Users.virtualRoomUserStatusManager.ToString() in C:\Documents and Settings\Administr
ator\Desktop\...\Source\Virtual\Users\virtualRoomUserStatusManager.cs:line 136
   at Holo.Virtual.Users.virtualRoomUser.get_statusString() in C:\Documents and Settings\Administrator\
Desktop\...\Source\Virtual\Users\virtualRoomUser.cs:line 153
   at Holo.Virtual.Rooms.virtualRoom.sendShout(virtualRoomUser sourceUser, String Message) in C:\Docume
nts and Settings\Administrator\Desktop\...\Source\Virtual\Rooms\virtualRoom.cs:line 1236
   at Holo.Virtual.Users.virtualUser.processPacket(String currentPacket) in C:\Documents and Settings\A
dministrator\Desktop\...\Source\Virtual\Users\virtualUser.cs:line 2046
in the server... this helps a great deal. Please do send these to me as they will help solve this issue.

Sorry for the failure of last update but at least you got a nice out of tune song with it
I have none of those, if I did I'd surely send them.
Just hoping you can fix the Random DC's so I can help you update rolleyes:
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Dec 2006
Location: The Netherlands
Posts: 59
11-19-2008, 12:05 PM
 
Quote: Originally Posted by cecer1 View Post
Ok, some of you may notice that you get big error messages such as this:
Code:
[02:50:29:27] [virtualUser.processPacket] » System.InvalidOperationException: Collection was modified;
enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Holo.Virtual.Users.virtualRoomUserStatusManager.ToString() in C:\Documents and Settings\Administr
ator\Desktop\...\Source\Virtual\Users\virtualRoomUserStatusManager.cs:line 136
   at Holo.Virtual.Users.virtualRoomUser.get_statusString() in C:\Documents and Settings\Administrator\
Desktop\...\Source\Virtual\Users\virtualRoomUser.cs:line 153
   at Holo.Virtual.Rooms.virtualRoom.sendShout(virtualRoomUser sourceUser, String Message) in C:\Docume
nts and Settings\Administrator\Desktop\...\Source\Virtual\Rooms\virtualRoom.cs:line 1236
   at Holo.Virtual.Users.virtualUser.processPacket(String currentPacket) in C:\Documents and Settings\A
dministrator\Desktop\...\Source\Virtual\Users\virtualUser.cs:line 2046
I got that too but before that there are a lot of purple mysql errors (at peak times)
 
 
permalink
 

 
Monster Member

Rank: New Blood


Reply With Quote
 
Join Date: Aug 2008
Location: Http://Jabbo.Net.Tc
Posts: 181
11-19-2008, 02:29 PM
 
I and Some others get by some users High cpu like 100%!
Then Internet Breaks and Cpu!

I donno what this problem now is!
Do u maybe can Fix this?

waves,
jabbohotel
 
 
permalink
 

 
The mofo'ing Woodpeckah

Rank: Alpha Member


Reply With Quote
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 3,428
11-19-2008, 02:33 PM
 
You get those "System.InvalidOperationException: Collection was modified;
enumeration operation may not execute." because you're looping through a collection and you've removed/added an object during that iteration aswell.
To solve this, for example at dropping dead connections, keep a System.Collections.Generic.List<sometype> object, and when you are iterating through the collection and an object needs to be removed, you add the index (integer) of that object to the List collection.

Then, when the iteration has finished, you loop through the 'index list', and you remove each object off the collection. That way you aren't 'modifying the collection during enumeration'.

To ensure threadsafety at collections (for example, removing/adding objects to same collection on different thread) you should wrap the collection with the 'lock' keyword during the iteration. That way threads who also are accessing that object will wait till the other one has unlocked the object.
Example:

PHP Code:
Dictionary<intsomeClassmyCollection = new Dictionary<intsomeClass>(); 
(...)
PHP Code:
List<intremoveIndexList = new List<int>();
lock(myCollection)
{
foreach(
someClass lClass in myCollection.Values)
{
if(
stuff etc)
add to removelist collection
}
}

// iterate through removelist collection and remove objects from myCollection 
Soz for the bad formatting.

Should help you guys. =]

- Nillus

EDIT:
Avoid deadlocking of threads, don't let object A lock object B etc etc, got to run now so no time for explanation, google it. ;P
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: Dec 2006
Location: The Netherlands
Posts: 59
11-19-2008, 05:55 PM
 
look i have made a pic of the errors that i've got:


its very annoying because the cms wont work when this occur :S

i hope someone has a fix for this...
Attached Images
File Type: jpg error.JPG (114.1 KB, 416 views)
 
 
permalink
 

 
GHOSTBUSTERS!

Rank: Member


Reply With Quote
 
Join Date: May 2007
Location: Norway
Posts: 310
11-19-2008, 06:13 PM
 
Quote: Originally Posted by Nillus View Post
You get those "System.InvalidOperationException: Collection was modified;
enumeration operation may not execute." because you're looping through a collection and you've removed/added an object during that iteration aswell.
To solve this, for example at dropping dead connections, keep a System.Collections.Generic.List<sometype> object, and when you are iterating through the collection and an object needs to be removed, you add the index (integer) of that object to the List collection.

Then, when the iteration has finished, you loop through the 'index list', and you remove each object off the collection. That way you aren't 'modifying the collection during enumeration'.

To ensure threadsafety at collections (for example, removing/adding objects to same collection on different thread) you should wrap the collection with the 'lock' keyword during the iteration. That way threads who also are accessing that object will wait till the other one has unlocked the object.
Example:

PHP Code:
Dictionary<intsomeClassmyCollection = new Dictionary<intsomeClass>(); 
(...)
PHP Code:
List<intremoveIndexList = new List<int>();
lock(myCollection)
{
foreach(
someClass lClass in myCollection.Values)
{
if(
stuff etc)
add to removelist collection
}
}

// iterate through removelist collection and remove objects from myCollection 
Soz for the bad formatting.

Should help you guys. =]

- Nillus

EDIT:
Avoid deadlocking of threads, don't let object A lock object B etc etc, got to run now so no time for explanation, google it. ;P
That's nice, but where shall I enter it?

Edit: What happens when the console says: "The thread being aborted"?
 
 
permalink
 

 
Alpha Member

Rank: Alpha Member


Reply With Quote
Blog Entries: 4
 
Join Date: Jan 2008
Location: CS:S
Posts: 1,891
11-19-2008, 06:18 PM
 
Quote: Originally Posted by maritnmine View Post
That's nice, but where shall I enter it?
Cant you read it was a example code :l dam boons


And the SQL errors are your server.
 
 
permalink
 

 
GHOSTBUSTERS!

Rank: Member


Reply With Quote
 
Join Date: May 2007
Location: Norway
Posts: 310
11-19-2008, 06:33 PM
 
Quote: Originally Posted by mike444 View Post
look i have made a pic of the errors that i've got:


its very annoying because the cms wont work when this occur :S

i hope someone has a fix for this...
I get those messages too, but i don't know why they appear :P

Nillus is talking about something kalled "Woodpecker¨" what is that?
 
 
permalink
 

 
<3

Rank: Subscriber


Reply With Quote
 
Join Date: Aug 2008
Location: United Kingdom
Posts: 463
11-19-2008, 06:53 PM
 
If the cms doesnt work. Its your mysql server.

And woodpecker is his server, That he coded in his spare time. The best habbo emulator out there.
 
 
permalink
 

 
Alpha

Rank: New Blood


Reply With Quote
 
Join Date: Dec 2007
Location: Localhost :] Hack me
Posts: 145
11-19-2008, 09:11 PM
 
Uhm?

on v25 DCRS you cant walk on rugs and cant sit...
I fond nothing espeacyally on the source:

double nextHeight = 0;
if (nextState == squareState.Rug) // If next step is on a rug, then set user's height to that of the rug [floating stacked rugs in mid-air, petals etc]
nextHeight = sqITEMHEIGHT[nextX, nextY];
else
nextHeight = (double)sqFLOORHEIGHT[nextX, nextY];

and in the stacking system also nothing

private furnitureStack[,] sqSTACK;
public enum squareState { Open = 0, Blocked = 1, Seat = 2, Bed = 3, Rug = 4 };

may some one could help?
 
 
permalink
 

 
GHOSTBUSTERS!

Rank: Member


Reply With Quote
 
Join Date: May 2007
Location: Norway
Posts: 310
11-19-2008, 10:32 PM
 
Quote: Originally Posted by imadj View Post
Uhm?

on v25 DCRS you cant walk on rugs and cant sit...
I fond nothing espeacyally on the source:

double nextHeight = 0;
if (nextState == squareState.Rug) // If next step is on a rug, then set user's height to that of the rug [floating stacked rugs in mid-air, petals etc]
nextHeight = sqITEMHEIGHT[nextX, nextY];
else
nextHeight = (double)sqFLOORHEIGHT[nextX, nextY];

and in the stacking system also nothing

private furnitureStack[,] sqSTACK;
public enum squareState { Open = 0, Blocked = 1, Seat = 2, Bed = 3, Rug = 4 };

may some one could help?
The server is designed for v24 DCRs, not V25.

One thing, why does the newest build give me 100% cpu, while the old one does not get 100% CPU?
 
 
permalink
 

 
iThijmen

Rank: Member


Reply With Quote
 
Join Date: Jul 2006
Location: OtakuHQ
Posts: 234
11-19-2008, 11:28 PM
 
Is the 'invisible habbos' bug solved in here?


Sounds like a great project tbh.
 
 
permalink