Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
crash when setting/updating IGGridViewDataSourceHelper datasource
posted

Hello,

Crashlytics is recording a crash that occurred several times with at least one of our customers: when setting the "data" object of our IGGridViewDataSourceHelper object the following exception is thrown: "Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: *** setObjectForKey: key cannot be nil "

I found this post: "monotouch: IGGridView.UpdateData() with custom header cell gives error" but we are not overriding any of the CreateCell-methods.

The problem is that we are unable to reproduce the bug on our development system. Here's the piece of code that seems to be causing the crashs:

                    dataSource.Data = _hpAktivitaeten.ToArray();
                    gridView.WeakDataSource = dataSource;
                    gridView.UpdateData();

DataSource is derived from IGGridViewDataSourceHelper with overrides for "ApplyFilter" and "ResizeColumn". _hpAktivitaeten is a list of our data objects.

What can cause this kind of exception? Any help would be appreciated!

Thanks in advance

Andreas

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi Andreas, 

    Honestly, its really hard to say whats causing the issue without a bit more information. If you had a stack trace that could help narrow it down. 

    Basically what happens when you set the data, is that we first try to generate any columns that need to be auto generated, we do this by looking at the first row of data. Then we apply any Grouping, Filtering and Sorting that is necessary.  Thats basically it. I don't believe we set any properties, there, as your error would imply, so i'm really not sure why that exception is happening... 

    I'm sorry I can't be of more help here. 

    -SteveZ

Children