Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 13:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



albetros Big BUG in EffectThread

Discussion on albetros Big BUG in EffectThread within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2011
Posts: 105
Received Thanks: 9
albetros Big BUG in EffectThread

PHP Code:


                
while (true)
                {
                    if (
Kernel.Clients 0)
                    {
                        foreach (
Player role in Kernel.Clients.Values)
                        {
                               .....
}
}

sleep(100)

alway throw An InvalidOperationException: collection was modified; may not be able to perform enumeration operation

how can i fix it ?
somecode is offline  
Old 03/03/2012, 15:07   #2
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
Switch it your collection out with a threadsafe one.
I don't have a username is offline  
Old 03/03/2012, 15:10   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,379
Indeed. I thought I already traded out the dictionary but apparently not.

Go to the clients dictionary in kernel.cs and change it to ThreadSafeDictionary. There's already a wrapper in the source for it.

Alternatively... re-write everything to use ConcurrentDictionary and take advantage of the lovely .net framework!
pro4never is offline  
Old 03/03/2012, 15:16   #4
 
elite*gold: 0
Join Date: Apr 2011
Posts: 105
Received Thanks: 9
Quote:
Originally Posted by pro4never View Post
Indeed. I thought I already traded out the dictionary but apparently not.

Go to the clients dictionary in kernel.cs and change it to ThreadSafeDictionary. There's already a wrapper in the source for it.

Alternatively... re-write everything to use ConcurrentDictionary and take advantage of the lovely .net framework!
i must be code a ThreadSafeDictionary class by myself ?

or your source already code it ?
somecode is offline  
Old 03/03/2012, 15:56   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by pro4never View Post
Indeed. I thought I already traded out the dictionary but apparently not.

Go to the clients dictionary in kernel.cs and change it to ThreadSafeDictionary. There's already a wrapper in the source for it.

Alternatively... re-write everything to use ConcurrentDictionary and take advantage of the lovely .net framework!
...

Quote:
Originally Posted by somecode View Post
i must be code a ThreadSafeDictionary class by myself ?

or your source already code it ?
Really?
Korvacs is offline  
Thanks
1 User
Old 03/04/2012, 06:52   #6
 
elite*gold: 0
Join Date: Apr 2011
Posts: 105
Received Thanks: 9
i fixed that.... thx much

and i have another question

the server login 50+player ...
why did some time player attack make the cpu useg too high using 99%
sorry my bad english

i fixed that.... thx much

and i have another question

the server login 50+player ...
why did some time player attack make the cpu useg too high using 99%
sorry my bad english
somecode is offline  
Reply


Similar Threads Similar Threads
[Question]How do i add a shop npc on albetros source?
03/01/2012 - CO2 Private Server - 1 Replies
how do i add a shop npc on albetros source and add items in it and manage the cps to buy with and please i dont need the FAQ thread of it so no one should post it here. waiting for the Answers. #EDIT ALSO HOW DO I make monsters drop cps this is kinda wierd cus this is a custom coded source but its super stable.
Need albetros source help ... Pro4ever[pls come here,thx]
02/17/2012 - CO2 Private Server - 1 Replies
iwant make 100+ static AIPlayer in market map or another map from database characters table when the user no in the game... it mean the AIPlayer didn't do anything -_-~ how can i do ... i read your code ... like duelist .... can you teach me how to code -_-!
Configuration tool for the Albetros source! help plz!
02/11/2012 - CO2 Private Server - 2 Replies
Hello guys, im new in elitepvpers! So, i was looking for Albetros source but when i tried to download the configuration tool, the multiupload.com was down (and i don't think it will come back soon :( ) can somebody help me with a working link for the config tool? thank you guys ^^
albetros source question!!!
01/30/2012 - CO2 Private Server - 3 Replies
ok ... i only have one question ... what is the IrcBot? how can i use it fully ??
Albetros v5518 questions.
12/16/2011 - CO2 Private Server - 3 Replies
Okay so I have been looking around for a few guides to update this server I would like to complete the Shopping Mall and add Dail PK and more I would also like to have working mounts and packs (Stone Pack, Item Pack) if you could point me in the right direction I am sure I can figure it out from there. Thanks.



All times are GMT +1. The time now is 13:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.