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.
Want to know why you're getting a specific error or why an exception is being thrown?
Post the error as well as the relevant code here and I and other programmers will try to help you out as soon as possible.
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
So you've made a "get help here" topic which is basically the gist of half the posts here.
Interesting choice.
Not really tbh most of the posts are bot releases and questions not related to a specific error
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
Show me a picture of your blocks class please
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?
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)
Everybody edits, but some edit more than others
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.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
[ Started around 1732678620.1148 - Generated in 0.189 seconds, 13 queries executed - Memory usage: 1.8 MiB (Peak: 2.06 MiB) ]