View Issue Details

IDProjectCategoryView StatusLast Update
0000445luatexluatex bugpublic2010-09-09 11:17
ReporterpatrickAssigned ToTaco 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMac intelOSOS Version
Product Version 
Target VersionFixed in Version0.63.0 
Summary0000445: epdf crash
Description#!/usr/bin/env texlua


local filename = "cow.pdf" -- from context distrib
local pdffile = epdf.open(filename)
local cat = pdffile:getCatalog()
local pg = cat:getPage(1)
local pgc = pg:getContents()

local stream = pgc:getStream()
print(tostring(stream)) -- "Dict: ..." - should be "Stream: ..." ????

print(stream:getLength()) -- 1
for i=1,stream:getLength() do
  print(stream:getKey(i))
end


-> segmentation fault
Additional Information--- a/source/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/source/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -1302,7 +1302,7 @@ int m_Object_getStream(lua_State * L)
     if (uin->pd != NULL && uin->pd->pc != uin->pc)
         pdfdoc_changed_error(L);
     if (((Object *) uin->d)->isStream()) {
- uout = new_Dict_userdata(L);
+ uout = new_Stream_userdata(L);
         uout->d = ((Object *) uin->d)->getStream();
         uout->pc = uin->pc;
         uout->pd = uin->pd;

works better for me, but this is just a wild guess
TagsNo tags attached.

Activities

hhenkel

2010-08-02 22:35

manager   ~0000584

fixed in trunk, SVN 3792, many thanks for the correct patch.

Btw, there is no function like stream:getLength() (yet).

stream:getChar() works, also on the undecoded stream, like
local ustream = stream:getUndecodedStream()

Issue History

Date Modified Username Field Change
2010-08-02 12:48 patrick New Issue
2010-08-02 22:35 hhenkel Note Added: 0000584
2010-08-26 07:48 Taco Status new => resolved
2010-08-26 07:48 Taco Resolution open => fixed
2010-08-26 07:48 Taco Assigned To => Taco
2010-09-09 11:16 Taco Fixed in Version => 0.63.0
2010-09-09 11:17 Taco Status resolved => closed