Hi,

I am trying to get Xalan-C++ working, but it fails with an "invalid null
pointer" assertion (in "VisualStudio10\Vc\INCLUDE\xutility" Line 2237.).
Unfortunately I am completely clueless what's going on. So I am grateful
for any advice how to understand what is going on and/or how to solve this
issue.

This is my code:

#include <iostream>
#include <xercesc/util/PlatformUtils.hpp>
#include <xalanc/Include/PlatformDefinitions.hpp>
#include <xalanc/XalanTransformer/XalanTransformer.hpp>

int main(int argc, char *argv[])
{
  try {
    xercesc::XMLPlatformUtils::Initialize();
    xalanc::XalanTransformer::initialize();
  }
  catch(...){
    std::cout << "initialization failed" << std::endl;
    return -1;
  }

  {
    xalanc::XSLTInputSource xmlInput("D:\\file.xml");
    xalanc::XSLTInputSource xsltInput("D:\\style.xslt");
    xalanc::XSLTResultTarget outTarget("D:\\out.xml");
    xalanc::XalanTransformer theXalanTransformer;
    int theResult = theXalanTransformer.transform(xmlInput, xsltInput,
outTarget);
    std::cout << theResult << std::endl;
  }

  xalanc::XalanTransformer::terminate();
  xercesc::XMLPlatformUtils::Terminate();
  xalanc::XalanTransformer::ICUCleanUp();
  return 0;
}

As a backtrace I get:

0 std::_Debug_message MSVCP100D 0xf8e9953
1 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x1008a68f
2 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x1008a438
3 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x10094487
4 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x100933e6
5 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x100d30d7
6 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x100d08db
7 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x100cae4d
8 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x101ee4fd
9 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x101dbcc4
10 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x101db98d
11 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x102090de
12 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x102c6bb8
13 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x1030ce42
14 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x1033ed22
15 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x10334824
16 xalanc_1_11::AttributesImpl::AttributesImpl Xalan_C_1_11D 0x1033b746
17 main main.cpp 22 0x186f06
18 __tmainCRTStartup crtexe.c 555 0x18638f
19 mainCRTStartup crtexe.c 371 0x1861bf
... <Mehr>


If I run "Xalan.exe -t d:\file.xml d:\style.xslt" however, it works fine.
My system is MSVC 10, 32-bit and I
use xalan_comb-1.11-x86-windows-VC100.zip.


Thanks and best regards
Sebastion

Reply via email to