Task Error: Object reference not set to an instance of an object

Just trying out the new “search for all missing episodes” feature. After clicking the button I get a popup saying [missingepisodesearch] failed. The log gives the above error with:

System.NullReferenceException: Object reference not set to an instance of an object at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].GetRightValue (System.Linq.Expressions.Expression rightExpression) [0x00000] in :0
at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].VisitMemberAccess (System.Linq.Expressions.MemberExpression expression) [0x00000] in <filename unknown>:0 at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x00000] in <filename unknown>:0 at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].VisitBinary (System.Linq.Expressions.BinaryExpression expression) [0x00000] in :0
at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x00000] in :0
at Marr.Data.QGen.ExpressionVisitor.VisitLamda (System.Linq.Expressions.LambdaExpression lambdaExpression) [0x00000] in :0
at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x00000] in :0
at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode]..ctor (System.Data.Common.DbCommand command, Marr.Data.QGen.Dialects.Dialect dialect, System.Linq.Expressions.Expression filter, Marr.Data.QGen.TableCollection tables, Boolean useAltName, Boolean tablePrefix) [0x00000] in <filename unknown>:0 at Marr.Data.QGen.QueryBuilder1[NzbDrone.Core.Tv.Episode].Where (System.Linq.Expressions.Expression1 filterExpression) [0x00000] in <filename unknown>:0 at NzbDrone.Core.Tv.EpisodeRepository.GetMissingEpisodesQuery (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec, DateTime currentTime, Int32 startingSeasonNumber) [0x00000] in :0
at NzbDrone.Core.Tv.EpisodeRepository.EpisodesWithoutFiles (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec, Boolean includeSpecials) [0x00000] in <filename unknown>:0 at NzbDrone.Core.Tv.EpisodeService.EpisodesWithoutFiles (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec) [0x00000] in :0
at NzbDrone.Core.IndexerSearch.MissingEpisodeSearchService.Execute (NzbDrone.Core.IndexerSearch.MissingEpisodeSearchCommand message) [0x00000] in :0
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[MissingEpisodeSearchCommand] (NzbDrone.Core.Messaging.Commands.Command command) [0x00000] in :0
Close
NzbDrone Ver. 2.0.0.1293 Xtender v2.0.8`

Could you run mono with --debug mono --debug /path/to/NzbDrone.exe it will give me some more information so I can track it down.

Sure, give me a little bit

Here you go:

System.NullReferenceException: Object reference not set to an instance of an object at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].GetRightValue (System.Linq.Expressions.Expression rightExpression) [0x0003c] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\WhereBuilder.cs:155
at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].VisitMemberAccess (System.Linq.Expressions.MemberExpression expression) [0x00065] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\WhereBuilder.cs:117 at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x00109] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\ExpressionVisitor.cs:69 at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].VisitBinary (System.Linq.Expressions.BinaryExpression expression) [0x00044] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\WhereBuilder.cs:72
at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x000e2] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\ExpressionVisitor.cs:63
at Marr.Data.QGen.ExpressionVisitor.VisitLamda (System.Linq.Expressions.LambdaExpression lambdaExpression) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\ExpressionVisitor.cs:137
at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x000c8] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\ExpressionVisitor.cs:28
at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode]..ctor (System.Data.Common.DbCommand command, Marr.Data.QGen.Dialects.Dialect dialect, System.Linq.Expressions.Expression filter, Marr.Data.QGen.TableCollection tables, Boolean useAltName, Boolean tablePrefix) [0x0006f] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\WhereBuilder.cs:50 at Marr.Data.QGen.QueryBuilder1[NzbDrone.Core.Tv.Episode].Where (System.Linq.Expressions.Expression1 filterExpression) [0x00014] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\QueryBuilder.cs:415 at NzbDrone.Core.Tv.EpisodeRepository.GetMissingEpisodesQuery (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec, DateTime currentTime, Int32 startingSeasonNumber) [0x00014] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\Tv\EpisodeRepository.cs:172
at NzbDrone.Core.Tv.EpisodeRepository.EpisodesWithoutFiles (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec, Boolean includeSpecials) [0x0000d] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\zbDrone.Core\\Tv\\EpisodeRepository.cs:104 at NzbDrone.Core.Tv.EpisodeService.EpisodesWithoutFiles (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\Tv\EpisodeService.cs:116
at NzbDrone.Core.IndexerSearch.MissingEpisodeSearchService.Execute (NzbDrone.Core.IndexerSearch.MissingEpisodeSearchCommand message) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\IndexerSearch\EpisodeSearchService.cs:46
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[MissingEpisodeSearchCommand] (NzbDrone.Core.Messaging.Commands.Command command) [0x00099] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\Messaging\Commands\CommandExecutor.cs:111`

I’m having the exact same issue with the same output when executing “mono --debug /path/to/NzbDrone.exe”. It’s always good to know that this might not be a random isolated issue.

Same issue here.

Hey JuggalotusHEat and Simonk83,
Can you guys tell me which OS you are running? Just trying to see if there are any further similarities.

@neckris OS won’t matter, its caused by multiple images for the same season (banner and poster) as well as another for multiple series images (banner, poster and fanart).

I just pushed a fix to develop and its ready for testing, it would be great if it could be tested by one or more of you. For Windows: https://github.com/NzbDrone/NzbDrone/wiki/Release-Branches

For Ubuntu you can change the source of the deb packages to develop by changing the url (change master to develop)
For Linux/OS X you can grab the appropriate build from: http://update.nzbdrone.com/v2/develop/

I should be able to try in a few hours from now, I’ll let you know!

Just tested it with “develop” build. Output is
[Error] TaskExtensions: Task Error System.NullReferenceException: Object reference not set to an instance of an object at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].GetRightValue (System.Linq.Expressions.Expression rightExpression) [0x0003c] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\WhereBuilder.cs:155
at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].VisitMemberAccess (System.Linq.Expressions.MemberExpression expression) [0x00065] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\WhereBuilder.cs:117 at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x00109] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\ExpressionVisitor.cs:69 at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode].VisitBinary (System.Linq.Expressions.BinaryExpression expression) [0x00044] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\WhereBuilder.cs:72
at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x000e2] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\ExpressionVisitor.cs:63
at Marr.Data.QGen.ExpressionVisitor.VisitLamda (System.Linq.Expressions.LambdaExpression lambdaExpression) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\ExpressionVisitor.cs:137
at Marr.Data.QGen.ExpressionVisitor.Visit (System.Linq.Expressions.Expression expression) [0x000c8] in m:\BuildAgent1\work\328d72309b633a8\src\Marr.Data\QGen\ExpressionVisitor.cs:28
at Marr.Data.QGen.WhereBuilder1[NzbDrone.Core.Tv.Episode]..ctor (System.Data.Common.DbCommand command, Marr.Data.QGen.Dialects.Dialect dialect, System.Linq.Expressions.Expression filter, Marr.Data.QGen.TableCollection tables, Boolean useAltName, Boolean tablePrefix) [0x0006f] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\WhereBuilder.cs:50 at Marr.Data.QGen.QueryBuilder1[NzbDrone.Core.Tv.Episode].Where (System.Linq.Expressions.Expression1 filterExpression) [0x00014] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\\Marr.Data\\QGen\\QueryBuilder.cs:415 at NzbDrone.Core.Tv.EpisodeRepository.GetMissingEpisodesQuery (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec, DateTime currentTime, Int32 startingSeasonNumber) [0x00014] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\Tv\EpisodeRepository.cs:172
at NzbDrone.Core.Tv.EpisodeRepository.EpisodesWithoutFiles (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec, Boolean includeSpecials) [0x0000d] in m:\\BuildAgent1\\work\\328d72309b633a8\\src\zbDrone.Core\\Tv\\EpisodeRepository.cs:104 at NzbDrone.Core.Tv.EpisodeService.EpisodesWithoutFiles (NzbDrone.Core.Datastore.PagingSpec1 pagingSpec) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\Tv\EpisodeService.cs:116
at NzbDrone.Core.IndexerSearch.MissingEpisodeSearchService.Execute (NzbDrone.Core.IndexerSearch.MissingEpisodeSearchCommand message) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\IndexerSearch\EpisodeSearchService.cs:46
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[MissingEpisodeSearchCommand] (NzbDrone.Core.Messaging.Commands.Command command) [0x00099] in m:\BuildAgent1\work\328d72309b633a8\src\zbDrone.Core\Messaging\Commands\CommandExecutor.cs:111 `

fyi I did notice that the logs on the web gui now show the error occuring “TaskExtensions| Task Error: Object reference not set to an instance of an object”, which it didn’t before (only in the mono run through terminal).

Also tested on develop build 1297, similar error as above http://pastebin.com/wbe1MLwn

Whoops! got my threads mixed up and fixed a totally different issue and left this one in there… I’ll take a look, sorry

EDIT: Should be fixed now, take a look at 1298 and let me know, please.

Looks good at 1298, MissingEpisodeSearchService ticking through all series now - thanks!

Yep, confirmed as working for me. Thanks for everything @Markus101 !

I probably won’t get a chance to test today, but it sounds like I don’t need to anyway. Thanks Markus :slight_smile:

1298 fixed it for me. Thanks!