Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Offline
Why I got that ? :
L'exception InvalidCastException n'a pas été gérée par le code utilisateur
Value at index:13 is not System.Int32. It's a System.String
I made that with the tutorial of jabatheblob1 4 :https://www.youtube.com/watch?v=2bK5bcGWx6E
Offline
Jaba's tutorials are mostly outdated I think. World width is now index 18 and height is 19. Replace 12 with 18, and 13 with 19. Also you'll probably need to replace unit kc = 17 with 39.
I'm on my phone right now and I'm about to go to work but there's probably more stuff you need to do. For example where do you check to see if the message type is "init"?
Offline
Offline
Offline
It works thx :d
Offline
This is my problem:
98% of teenagers cannot count; if you're apart of the 3% that can, copy this into your signature.
Offline
Are you sure that block class is set to public?
Offline
Unhandled Exception:
System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Threading.Tasks.Task,System.Threading.CancellationTokenSource]].Add (System.String key, System.Collections.Generic.Dictionary`2 value) [0x00000] in <filename unknown>:0
at Spider.Core.CreateCrawler (System.String roomKey, System.Threading.AutoResetEvent createCrawlerHandle) [0x00000] in <filename unknown>:0
at Spider.Pool+<AutoAdjust>d__3.MoveNext () [0x00000] in <filename unknown>:0
Happens once every ~six months, but causes a fatal crash. Code: http://github.com/decagon/spider
Offline
Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Threading.Tasks.Task,System.Threading.CancellationTokenSource]].Add (System.String key, System.Collections.Generic.Dictionary`2 value) [0x00000] in <filename unknown>:0 at Spider.Core.CreateCrawler (System.String roomKey, System.Threading.AutoResetEvent createCrawlerHandle) [0x00000] in <filename unknown>:0 at Spider.Pool+<AutoAdjust>d__3.MoveNext () [0x00000] in <filename unknown>:0
Happens once every ~six months, but causes a fatal crash. Code: http://github.com/decagon/spider
Just check if the key exists, and if it does, stop the room crawler, remove it and create a new one as you did before?
Current project: Thinking of/finding/requesting projects...
Offline
Hexagon wrote:Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Threading.Tasks.Task,System.Threading.CancellationTokenSource]].Add (System.String key, System.Collections.Generic.Dictionary`2 value) [0x00000] in <filename unknown>:0 at Spider.Core.CreateCrawler (System.String roomKey, System.Threading.AutoResetEvent createCrawlerHandle) [0x00000] in <filename unknown>:0 at Spider.Pool+<AutoAdjust>d__3.MoveNext () [0x00000] in <filename unknown>:0
Happens once every ~six months, but causes a fatal crash. Code: http://github.com/decagon/spider
Just check if the key exists, and if it does, stop the room crawler, remove it and create a new one as you did before?
That's what I'm doing right now, except for some reason the memory is leaking, causing the crawler to occasionally get stuck and hold up the thread since there is a low-level attachment to an object in ms*.dll or something. I've tried using StrongBox and then deleting that, but it doesn't really help.
Offline
den3107 wrote:Hexagon wrote:Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Threading.Tasks.Task,System.Threading.CancellationTokenSource]].Add (System.String key, System.Collections.Generic.Dictionary`2 value) [0x00000] in <filename unknown>:0 at Spider.Core.CreateCrawler (System.String roomKey, System.Threading.AutoResetEvent createCrawlerHandle) [0x00000] in <filename unknown>:0 at Spider.Pool+<AutoAdjust>d__3.MoveNext () [0x00000] in <filename unknown>:0
Happens once every ~six months, but causes a fatal crash. Code: http://github.com/decagon/spider
Just check if the key exists, and if it does, stop the room crawler, remove it and create a new one as you did before?
That's what I'm doing right now, except for some reason the memory is leaking, causing the crawler to occasionally get stuck and hold up the thread since there is a low-level attachment to an object in ms*.dll or something. I've tried using StrongBox and then deleting that, but it doesn't really help.
If its used cross-thread you should mark it with volatile keyword.
(the dictionary)
Last edited by Zumza (2016-08-18 17:26:52)
Everybody edits, but some edit more than others
Any person capable of angering you becomes your master
Offline
Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Threading.Tasks.Task,System.Threading.CancellationTokenSource]].Add (System.String key, System.Collections.Generic.Dictionary`2 value) [0x00000] in <filename unknown>:0 at Spider.Core.CreateCrawler (System.String roomKey, System.Threading.AutoResetEvent createCrawlerHandle) [0x00000] in <filename unknown>:0 at Spider.Pool+<AutoAdjust>d__3.MoveNext () [0x00000] in <filename unknown>:0
Happens once every ~six months, but causes a fatal crash. Code: http://github.com/decagon/spider
The code are already saying whats wrong, "An element with the same key already exists in the dictionary"
But if you want to go deeper and find exactly where, you need to run visual studio.
Do you run the bot on a VPS? I don't know a way to debug the code on a VPS. I guess you use mono.
If you use Visual Studio:
To get to the correct place there the error came from.
Click on CTRL + ALT + E, then click on "Common Language Runtime Exceptions".
Then click on "System.ArgumentException" and run the code.
Offline
Show me a picture of your blocks class please
Fixed
98% of teenagers cannot count; if you're apart of the 3% that can, copy this into your signature.
Offline
Thats my error :
98% of teenagers cannot count; if you're apart of the 3% that can, copy this into your signature.
Offline
^IMO we need more information.
my off-the-napkin guess is you're putting that code in the wrong place
98% of teenagers cannot count; if you're apart of the 3% that can, copy this into your signature.
Offline
Fun fact: I actually learned something in CS 101: the error isn't always on the line that's flagged, sometimes you have to look up.
Dictionary<uint, object[]> is your problem.
If you don't know what you want that line to do, just remove it.
Offline
Fun fact: I actually learned something in CS 101: the error isn't always on the line that's flagged, sometimes you have to look up.
Dictionary<uint, object[]> is your problem.
If you don't know what you want that line to do, just remove it.
Thanks
98% of teenagers cannot count; if you're apart of the 3% that can, copy this into your signature.
Offline
Why does so many people use "leave"? When it's "left" in the protocol and have always been "left".
Offline
Why does so many people use "leave"? When it's "left" in the protocol and have always been "left".
Because it'd makes sense if "join" was used when a player enters.
Offline
[ Started around 1550287340.8555 - Generated in 0.057 seconds, 12 queries executed - Memory usage: 1.62 MiB (Peak: 1.88 MiB) ]