eastmile error source

02/03/2020 19:27 CromeFast#1
[Only registered and activated users can see links. Click Here To Register...]

I do not know what to do, is there anyone to support?
thank you
02/03/2020 23:31 0Lucifer0#2
I guess the message is explicit enough... another solution is to remove all the code you don’t understand.
02/04/2020 15:53 XV50#3
Quote:
Originally Posted by 0Lucifer0 View Post
I guess the message is explicit enough... another solution is to remove all the code you don’t understand.
Yeah, removing Code from the ImportFactory so he can't parse anything.
Stop posting useless shit comments just to farm some posts.
02/04/2020 16:12 Saber none#4
Quote:
Originally Posted by XV50 View Post
Yeah, removing Code from the ImportFactory so he can't parse anything.
Stop posting useless shit comments just to farm some posts.
I mean isn't he right? I'm the last person judging anyone for not knowing what to do, but expecting an explicit problem which is more than "I don't know what to do" shouldn't be too much huh?
02/04/2020 16:23 Roxeez#5
Quote:
Originally Posted by XV50 View Post
Yeah, removing Code from the ImportFactory so he can't parse anything.
Stop posting useless shit comments just to farm some posts.
I'm mostly sure it was sarcastic because if he don't understand such a basic error it's not only parser how need to be removed :kappa:
02/04/2020 19:54 0Lucifer0#6
Quote:
Originally Posted by XV50 View Post
Yeah, removing Code from the ImportFactory so he can't parse anything.
Stop posting useless shit comments just to farm some posts.
I haven’t said to remove this line. I suggested to remove code he doesn’t understand. That is maybe most of the project but still. It is a good way to learn part by part.

But as you seems to ask for the real answer to the question (that he will never understand) there it is. List in c# use array under the hood. Arrays are fixed size. When adding to the list c# vm is allocating new memory if needed to your array. In case of parallel it add based on previous value. (Size+1) unfortunately as it’s doing multiple thing it’s trying size + 1 multiple time. Doing it at the same time result in the value being wrong as the difference between the read and wrote value make that the original value changed.

Thread 1: what is the amount of slot => 0
Thread 2: what is the amount of slot => 0
Thread 1 : add 1 => 0+1 => 1
Thread 2 : add 1 => 0+1 => 1 Thread 1 already used this so it crash.

So how to fix it ? You have to use a threadsafe collection type to avoid this kind of error. Like a concurrent dictionary.

Ps this have been simplified that’s not totally what is happening but would be useless to explain in detail
02/04/2020 22:38 XV50#7
Quote:
Originally Posted by 0Lucifer0 View Post
I haven’t said to remove this line. I suggested to remove code he doesn’t understand. That is maybe most of the project but still. It is a good way to learn part by part.

But as you seems to ask for the real answer to the question (that he will never understand) there it is. List in c# use array under the hood. Arrays are fixed size. When adding to the list c# vm is allocating new memory if needed to your array. In case of parallel it add based on previous value. (Size+1) unfortunately as it’s doing multiple thing it’s trying size + 1 multiple time. Doing it at the same time result in the value being wrong as the difference between the read and wrote value make that the original value changed.

Thread 1: what is the amount of slot => 0
Thread 2: what is the amount of slot => 0
Thread 1 : add 1 => 0+1 => 1
Thread 2 : add 1 => 0+1 => 1 Thread 1 already used this so it crash.

So how to fix it ? You have to use a threadsafe collection type to avoid this kind of error. Like a concurrent dictionary.

Ps this have been simplified that’s not totally what is happening but would be useless to explain in detail
Do you really expect someone (who can't even fix the parser to parse Act 7 content) would be able to do such things? Cmon.
Nothing more to say
02/04/2020 22:47 0Lucifer0#8
Quote:
Originally Posted by XV50 View Post
Do you really expect someone (who can't even fix the parser to parse Act 7 content) would be able to do such things? Cmon.
Nothing more to say
No I don’t. That’s the reason for my first answer... you just wanted me to answer the real one so here it is. Obviously it’s too tricky. So my first answer of delete all the code you don’t understand and restore it step by step is the best one he will get...
02/06/2020 00:10 Beazel#9
Quote:
Originally Posted by XV50 View Post
Stop posting useless shit comments just to farm some posts.
Quote:
Originally Posted by XV50 View Post
Do you really expect someone (who can't even fix the parser to parse Act 7 content) would be able to do such things? Cmon.
Nothing more to say
You are also increasing your point counter with these publications or ... are you answering the question of the creator of the thread? No.