惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
B
Blog
腾讯CDC
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
罗磊的独立博客
月光博客
月光博客
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
V
Visual Studio Blog
I
InfoQ
有赞技术团队
有赞技术团队
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale

Martin Owens activity

Martin Owens deleted project branch average-color-divide at Inkscape / inkscape Fix divide-by-zero crash when using calligraphy tool (d34276f8) · Commits · Inkscape / inkscape · GitLab Fix divide-by-zero crash when using calligraphy tool (!7923) · Merge requests · Inkscape / inkscape · GitLab Add selection file to bypass Windows command length limits (correction) (865df7a5) · Commits · Inkscape / inkscape · GitLab Draft: Fix AppImage crashing during save on older distros (!7922) · Merge requests · Inkscape / inkscape · GitLab e71fa7f8e0858aab87b7fc0814a30a8c88da9b43 to fe225a6b9e1042c7221d95173be22a02b3725337 · Martin Owens / inkscape · GitLab 403 Forbidden on Inkscape web server (#693) · Issues · Inkscape / inkscape-web · GitLab 403 Forbidden on Inkscape web server (#13509) · Issues · Inkscape / Inbox · GitLab Add selection file to bypass Windows command length limits (correction) (!7917) · 合并请求 · Inkscape / inkscape · GitLab Non-vertical axonometric axis implementation (!7912) · Merge requests · Inkscape / inkscape · GitLab Update split mode on tab switch (!7915) · Merge requests · Inkscape / inkscape · GitLab inset/offset as app functions so they can be used from CLI (!7914) · Merge requests · Inkscape / inkscape · GitLab Performace regresion in last month (#5879) · Issues · Inkscape / inkscape · GitLab [Regression] Right-aligned text has a new gap in 1.4.4 (#6130) · Issues · Inkscape / inkscape · GitLab [Regression] Right-aligned text has a new gap in 1.4.4 (#13498) · Issues · Inkscape / Inbox · GitLab c503804e014994d611de1b225bee8158c06448a8 to a4588d8ead1e7049b90c5a126962746ed286ab17 · Inkscape / inkscape-web · GitLab Validate the extensions of signature file uploads (a4588d8e) · 提交 · Inkscape / inkscape-web · GitLab Allow color conversions using static arrays instead of just vectors (e71fa7f8) · 提交 · Martin Owens / inkscape · GitLab Speed up ungroup on thousands of items (!7908) · Merge requests · Inkscape / inkscape · GitLab Incorrect handling of FontMatrix and transformation matrices with internal PDF import (#4845) · Issues · Inkscape / inkscape · GitLab Handling edge case of negative fonts in PDF (59040229) · 提交 · Inkscape / inkscape · GitLab Handling edge case of negative fonts in PDF (!7911) · 合并请求 · Inkscape / inkscape · GitLab Allow color conversions using static arrays instead of just vectors (33e65d1b) · Commits · Martin Owens / inkscape · GitLab Allow color conversions using static arrays instead of just vectors (9be5f867) · Commits · Martin Owens / inkscape · GitLab a9672ea1dff483b5b3aa8c6b5d88cd223001bef5 to 512a5e57602ac52e1d35782a7dcebae04262b2b8 · Martin Owens / inkscape · GitLab Revert Pango label changes (1.4.x) (!7907) · 合并请求 · Inkscape / inkscape · GitLab Crash on selecting a `<text>` object without a `<tspan>` inside (#5462) · Issues · Inkscape / inkscape · GitLab Fix breakage with Ubuntu 26.04 CI (!7904) · 合并请求 · Inkscape / inkscape · GitLab c673fdd5148253276826d4eda3951daaefb82607 to 356b31383ba324396a225686613236484305533d · Martin Owens / inkscape · GitLab Revert Text tool cursor changes (1.4.x) (!7903) · 合并请求 · Inkscape / inkscape · GitLab
Add selection file to bypass Windows command length limit...
Martin Owens · 2026-05-03 · via Martin Owens activity

Add selection file to bypass Windows command length limits

  • 评审变更

  • 下载

What does the merge request do?

Backport for master MR 7899. Adds a workaround for the command-line length limit that prevents extensions from running on very large selections. When the argument list would overflow the platform's command-line limit, Script::_change_extension now spills all arguments into a temp file and passes a single --arg-file=<path> argument in their place. The companion change in inkex (extensions!724 (merged)) parses the file as an arguments file.

Together with extensions!724 (merged), closes #2627 (closed). Since the backport cannot use the current version of Inkex, it now throws an unrecognized arguments: --arg-file whenever too many items are selected. This is still better than the current behavior, which fails silently. Also, extensions that ship a copy of Inkex can patch it themselves, if desired.

Implementation notes

The spill is cross-platform. The threshold comes from a get_cmdline_budget() helper:

  • Windows: returns 28,701 chars. The limit is 32,767 characters, but the assembled command line also contains the interpreter path, script path, input SVG path, etc. The 28,701 budget leaves overhead for those.
  • Unix: returns sysconf(_SC_ARG_MAX) − 32768, floored at _POSIX_ARG_MAX. ARG_MAX is actually complicated since it covers the argument, environment, pointer arrays, etc., so 32,768 are reserved for the extras. The floor handles sysconf failure and pathologically small return values (_POSIX_ARG_MAX is 4,096). Practically speaking, this seems to be ~2M on modern Unix systems, so it is rarely encountered.

All arguments are written to the spill file regardless of name so future renames can't silently break the workaround. The temp file is created via Inkscape::IO::TempFilename, which handles cleanup. Note that this MR requires the corresponding update to inkex; without it, inkex cannot handle the --arg-file=<path> argument. (Currently, it just fails silently when the command-line length limit is exceeded.)

Summary for release notes

Fixed a bug where running an extension (e.g. one that operates on every selected object) on a very large selection of objects on Windows would silently fail to launch with an "Invalid argument" error. Extensions can now be run on selections of arbitrary size on all platforms.

David Burghoff 编辑于
加载中