foliojs/restructure

Version 3.0.1 causes `react-pdf` `renderToStream` to never return

renchap opened this issue Β· 5 comments

Hi!

I unfortunately do not have an easy direct reproduction, but the 3.0.1 version is causing issues with react-pdf. It's renderToStream function no longer completes after the update.

You can find the initial bug report here: diegomura/react-pdf#2675

Multiple people (including myself) confirmed that the issue is fixed by forcing restructure to version 3.0.0.

It was probably introduced by #52, but I am unsure how to figure out what is happening here.

@mcdurdin can you look at this? Seems the PR you submitted introduced a regression

@renchap a restructure only reproduction would help a lot

Looking at the code that changed, I assume that this while loop can now sometime never end:

https://github.com/foliojs/restructure/pull/52/files#diff-142426a87894195e6a9681240f8cf3f4d673910c24bdee65deb3825068dba01bR27-R31

Investigating. Am travelling with limited access for next week. Laptop battery about to die. Have asked @srl295 if he can look as well.

See the issue, I just linked, I was able to reproduce it… I'm still not sure which restructure API it hits