[NTG-context] Strange crash when using lxp library

Procházka Lukáš Ing. - Pontex s. r. o. LPr at pontex.cz
Fri May 11 17:39:10 CEST 2012


Hello,

I have a strange problem.

I tried to prepare the simplest example.

Let's have a table utility in 'Table-U_.lua' (to be placed to LUA_PATH):

----
table.fromExcelXML = function(fn)
...
           tabs[true] = true -- Comment this line to make it work(?!) [1]
...
end

if not context then
   require "lxp"

   print("\n777777")
   table.fromExcelXML("InzSiteLitom_Nove.xml")
   print("\n888888")
end
----

When you call it from the command line, it works fine:

----
C:\Lukas\ConTeXt\TestDDv>lua -e require'table-u_'

777777

888888
----

When used in a context file:

----
\mainlanguage[cz]
\enableregime[cp1250]

\startluacode
   require "lxp"
   require "Table-U_"

   print("\n111111")
   table.fromExcelXML("InzSiteLitom_Nove.xml")
   print("\n222222")
\stopluacode

\starttext
   AAA
\stoptext
----

it crashes with an exception in luatex:

"
Exception "unknown software exception" 0xc000000d" at 0x1028e4c3.
...
"

Would anyone have an idea what causes the program crash?

I also observed that commenting a line [1] in the "Table-U_.lua" makes context work;
but the place seems "innocent", so I have no idea what can cause ctx crashing.

Could anyone test the code, respectively give a hint how to make the [simplified] code work?

All ideas are welcome.

Thank you in advance.

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr at pontex.cz]
Pontex s. r. o.      [mailto:pontex at pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Text.mkiv
Type: application/octet-stream
Size: 219 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120511/c3db6509/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Text.log
Type: application/octet-stream
Size: 1755 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120511/c3db6509/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Table-U_.lua
Type: application/octet-stream
Size: 616 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120511/c3db6509/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InzSiteLitom_Nove.zip
Type: application/zip
Size: 11233 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120511/c3db6509/attachment-0001.zip>


More information about the ntg-context mailing list