I am trying to publish some Pages but they end up failed every time. I checked the logs (event viewer/database/publisher) but have not found any indication. Same error happens when trying to preview the content of a Page. Please suggest

Following is the error sample:

    (2147747185) Object reference not set to an instance of an object.
    Unable to get rendered content of Page (tcm:15-12345-64).
    Unable to retrieve rendered data from Page.

    at Customer.TemplateBuildingBlocks.GetWebDavUris.Transform(Engine engine, Package package)
    at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)
    at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)
    at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)
    at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)
    at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
    at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
    at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)
    at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
    at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
    at Tridion.ContentManager.Templating.Engine.TransformPackage(Template template, Package package)
    at Tridion.ContentManager.Templating.Engine.TransformItem(Template template, IdentifiableObject itemToRender)
    at Tridion.ContentManager.Templating.TemplatingRenderer.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderedItem renderedItem, RenderContext renderContext)
    at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderContext context)
    at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(IdentifiableObject item, Template template, PublishInstruction instruction, PublicationTarget target, RenderContext context)
    at Tridion.ContentManager.Publishing.Rendering.ComWrapper.RenderEngineFacade.RenderItemWithTemplate(IdentifiableObject item, Template template, String legacyRenderInstruction)
    at Tridion.ContentManager.Publishing.Rendering.ComWrapper.RenderEngineFacade.RenderPage(UserContext userContext, String pageXml, String pageTemplateXml, String instruction)
    UtilitiesPublish.RenderPage
    Page.Render
    Request.Render