Hello,
I’m using Aspose.Cells for NodeJS via C++ bindings (aspose.cells.node 25.4.0
). I believe I have installed all the relevant prerequisites. I’m using Node 20 (also tried 18 and 22) on Debian 12. Although, also tried on Debian 11, 10 and Ubuntu 22.04 (also all included docker). My local Macbook M3 did not have a segmentation fault but simply froze and no longer processed anything.
I do set aspose.CellsHelper.setIsCloudPlatform(true)
but also tried without
I am using Aspose.Cells to convert to HTML with some save options. Again, even some save options removal does not fix it.
Most sheets work but some will cause a segmentation fault. I can share the whole processing code, but it happens even when I remove all save options and just hits tempWorkbook.save(htmlPath, saveOptions) - saveAsync or save with no path and using a Buffer also causes the same
Excel file in question: 202505_Japan IT Week 名古屋 シフト (3).xlsx - Google Sheets
Here’s everything installed on Debian (don’t assume can be LIBC mismatch versions as have tried on many different OS, and forcing other candidates anyway): https://hastebin.com/share/yinuduhewu.less
Have tried also on machines with a large amount of resources (32GB, 8 CPUs)
However, after the save, I get a segmentation fault:
Thread 1 "node" received signal SIGSEGV, Segmentation fault.
0x000015551b15cc51 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
(gdb) bt
#0 0x000015551b15cc51 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#1 0x000015551a72a046 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#2 0x000015551a74d192 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#3 0x000015551a74e3d3 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#4 0x000015551a776945 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#5 0x000015551a783120 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#6 0x000015551a75a732 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#7 0x000015551a79fea8 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#8 0x000015551a75ff1e in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#9 0x0000155519d6635b in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#10 0x0000155519d67fe5 in ?? () from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#11 0x0000155519a86a0b in Aspose::Cells::Workbook::Save(char16_t const*, Aspose::Cells::SaveOptions const&) ()
from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/libAspose.Cells.so
#12 0x000015551f2aaf4d in Workbook_N::Save(Napi::CallbackInfo const&) ()
from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/aspose.cells.nodejs.node
#13 0x000015551fa6458f in Napi::InstanceWrap<AboveAverage_N>::InstanceMethodCallbackWrapper(napi_env__*, napi_callback_info__*) ()
from /home/eddie/html-conversion/node_modules/aspose.cells.node.linux.x64/aspose.cells.nodejs.node
#14 0x0000000000c5d115 in v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) ()
#15 0x0000000000f6c56f in v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) ()
#16 0x0000000000f6cddd in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) ()
#17 0x0000000000f6d2a5 in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) ()
#18 0x0000000001977df6 in Builtins_CEntry_Return1_ArgvOnStack_BuiltinExit ()
#19 0x00000000018e9d1c in Builtins_InterpreterEntryTrampoline ()
const worksheets = workbook.getWorksheets();
const tempDir = await fs.mkdtemp(
path.resolve(`${this.tempDirectory}/${id}`),
);
for (let i = 0; i < worksheets.getCount(); i++) {
const sheet = worksheets.get(i);
const sheetName = sheet.getName();
const tempWorkbook = new aspose.Workbook();
const tempWorksheets = tempWorkbook.getWorksheets();
const tempSheet = tempWorksheets.add(sheetName);
tempSheet.copy(sheet);
const saveOptions = new aspose.HtmlSaveOptions();
saveOptions.setExportDocumentProperties(false);
saveOptions.setExportWorksheetProperties(false);
saveOptions.setExportWorksheetCSSSeparately(false);
saveOptions.setExportImagesAsBase64(true);
saveOptions.setSaveAsSingleFile(true);
saveOptions.setExcludeUnusedStyles(true);
saveOptions.setExportPrintAreaOnly(true);
saveOptions.setPresentationPreference(false);
saveOptions.setExportBogusRowData(true);
saveOptions.setExportFrameScriptsAndProperties(false);
saveOptions.setExportExtraHeadings(false);
saveOptions.setIsExportComments(false);
saveOptions.setExportSimilarBorderStyle(false);
saveOptions.setMergeEmptyTdType(aspose.MergeEmptyTdType.MergeForcely);
// HERE IS THE ISSUE
tempWorkbook.save(htmlPath, saveOptions);