paulocoutinhox / pdfium-lib

PDFium - Project to compile PDFium library to multiple platforms.
https://pdfviewer.github.io/
MIT License
925 stars 90 forks source link

wechat use wasm Uncaught (in promise) RuntimeError: memory access out of bounds #118

Closed shikun93 closed 3 months ago

shikun93 commented 3 months ago

var page = FPDF.LoadPage(this.wasmData.wasm, i);

  function createExportWrapper(name) {
    return function () {
      assert(runtimeInitialized, "native function `".concat(name, "` called before runtime initialization"));
      var f = wasmExports[name];
      assert(f, "exported native function `".concat(name, "` not found"));
      return f.apply(null, arguments);
    };
  }

VM3299 00e9178a:1 Uncaught (in promise) RuntimeError: memory access out of bounds at :wasm-function[1586]:0x8e9a1 at :wasm-function[1304]:0x75486 at :wasm-function[1513]:0x89753 at :wasm-function[1173]:0x7111e at FPDF_LoadPage (:wasm-function[2200]:0xceaa6) at weapp:///http://127.0.0.1:42870/appservice/utils/pdfium.js?t=wechat&s=1721093525204&v=984caf8224806a293725a985ea6e0ae9:419:18 at ccall (weapp:///http://127.0.0.1:42870/appservice/utils/pdfium.js?t=wechat&s=1721093525204&v=984caf8224806a293725a985ea6e0ae9:4204:22) at Object.LoadPage (weapp:///http://127.0.0.1:42870/appservice/utils/pdfium.js?t=wechat&s=1721093525204&v=984caf8224806a293725a985ea6e0ae9:4214:16) at Processor.getRender (weapp:///http://127.0.0.1:42870/appservice/utils/doc.js?t=wechat&s=1721093525204&v=9db3b4f7b9d2d91bf1fb6ab4026be913:81:23) at Processor.getPageRender (weapp:///http://127.0.0.1:42870/appservice/utils/doc.js?t=wechat&s=1721093525204&v=9db3b4f7b9d2d91bf1fb6ab4026be913:94:32)(env: Windows,mp,1.06.2405020; lib: 3.4.9)