New Posts New Posts RSS Feed: Fatal error in 6.0.7
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Fatal error in 6.0.7

 Post Reply Post Reply
Author
jocker1331 View Drop Down
Newbie
Newbie


Joined: 11-Dec-2010
Posts: 5
Post Options Post Options   Quote jocker1331 Quote  Post ReplyReply Direct Link To This Post Topic: Fatal error in 6.0.7
    Posted: 11-Dec-2010 at 5:41am
Please make patch for v6.0.7 ....

NullRefException in
   в IdeaBlade.Linq.PredicateBuilder.FilterQuery(IQueryable baseQuery, IPredicateDescription predicateDescription)
   в IdeaBlade.Windows.ObjectDataSource.GetFilteredQuery()
   в IdeaBlade.Windows.ObjectDataSource.LoadView()
   в IdeaBlade.Windows.ObjectDataSource.LoadCore()
   в IdeaBlade.Windows.ObjectDataSource.Load()
   в CivilizationWeb.Views.TaskList.OnNavigatedTo(NavigationEventArgs e)
   в System.Windows.Controls.Page.InternalOnNavigatedTo(NavigationEventArgs e)
   в System.Windows.Navigation.NavigationService.RaiseNavigated(Object content, Uri uri, Page existingContentPage, Page newContentPage)
   в System.Windows.Navigation.NavigationService.CompleteNavigation(DependencyObject content)
   в System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)

//If you use DomainDatasource without filters.

See comments in code (Reflected):

//souce:IdeaBlade.Linq.PredicateBuilder
public static IQueryable FilterQuery(IQueryable baseQuery, IPredicateDescription predicateDescription)
{
    Type genericArgument = TypeFns.GetGenericArgument(baseQuery.GetType());
    Expression expression = Expression.Call(typeof(Queryable), "Where", new Type[] { genericArgument }, new Expression[] { Expression.Constant(baseQuery), predicateDescription.ToLambdaExpression() }); //predicateDescription _CAN_ be null
    return baseQuery.Provider.CreateQuery(expression);
}

// source: IdeaBlade.Windows.ObjectDataSource
private IPredicateDescription GetQueryFilter()
{
    try
    {
        List<PredicateDescription> list = new List<PredicateDescription>();
        foreach (FilterDescriptor descriptor in this.FilterDescriptors)
        {
            PredicateDescription item = descriptor.ToPredicateDescription(this.Query.ElementType);
            if (item != null)
            {
                list.Add(item);
            }
        }
        if (list.Count > 0)
        {
            return PredicateBuilder.And(list.ToArray());
        }
        return null; ///!!!!
    }
    catch (Exception exception)
    {
        TraceFns.WriteLine("Filters ignored: " + exception.Message);
        return null;
    }
}

 



Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 13-Dec-2010 at 9:42am
Sorry you've run into this problem.  You'll only get this error if using the ObjectDataSource with a PageSize of 0.  This indicates that paging is not wanted and the underlying view used is the SL PagedCollectionView instead of the DevForce EntityQueryPagedCollectionView. 
 
The workaround until the problem is fixed is to either turn on paging by setting a non-zero PageSize, or to add a dummy FilterDescriptor.   
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down