These are chat archives for picoe/Eto

14th
Sep 2017
se5a
@se5a
Sep 14 2017 20:39
I'm getting an SystemArgumentOutOfRangeException being thrown in the Main program, so I'm having trouble tracking down what the cause of the problem is. from what I've figured out so far, is that it's something to do with an ObservableCollection - I
I'm wondering if maybe I might be adding something to it on the wrong thread, but I can't figure out how I might be doing that looking at the structure of my program, I'd tried to avoid that when I wrote it.
MD is not being very helpfull past telling me that the Index was out of range, and the type of collection (it's not even telling me the name of the collection, I'm only able to figure out where the collection is by the Type it's storing which it does tell me.
Curtis Wensley
@cwensley
Sep 14 2017 20:42
Try looking at the stack trace and where it is crashing. If it doesn't give you enough detail, try adding $exception.GetBaseException().StackTrace to the watch window
se5a
@se5a
Sep 14 2017 20:43
yeah the callstack is only showing the GTK part of the application.
Curtis Wensley
@cwensley
Sep 14 2017 20:47
what version of mono are you using? A newer one might help.
Curtis Wensley
@cwensley
Sep 14 2017 20:48
ah it's a callback, fun.
se5a
@se5a
Sep 14 2017 20:49
mono --version is 5.2.0.215
Curtis Wensley
@cwensley
Sep 14 2017 20:49
only thing I can suggest is set a breakpoint in EnumerableChangedHandler and see what collection its using.
se5a
@se5a
Sep 14 2017 20:50
I know which collection it is
there's only one collection with CargoItemVM in it
Curtis Wensley
@cwensley
Sep 14 2017 20:50
You won't be able to see what caused it since it is a callback from gtk, which is done asynchronously when loading data for the grid & tree
se5a
@se5a
Sep 14 2017 20:50
but I can't figure out what's causing the problem
though that being said... I don't think there should be 11 entries in it.
I guess that's a start.
ah right, the underlying data it's populating the collection from is a dictionary with keys, and values which = 0
so that shouldn't be a problem, other than wanting to filter them out in the ui.
se5a
@se5a
Sep 14 2017 21:03
would adding items to an observable collection that's being observed by the views from not the main thread cause something like this? or am I barking up the wrong tree
Curtis Wensley
@cwensley
Sep 14 2017 21:03
yes that would definitely bork things
no UI stuff (including modifying bound stuff in non-ui threads) should be in a separate thread.
se5a
@se5a
Sep 14 2017 21:04
yeah, I'm aware that it will cause problems, just I thought I'd avoided doing that...
but it's the only thing I can think of