LayoutProcessor and multi-threading environment
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reading openpdf/src/main/java/com/lowagie/text/pdf/LayoutProcessor.java and the linked BIRT pull request for context on the shared flags and race condition. Trace how PDF content creation uses LayoutProcessor and where its flags are changed. Done means the per-document or per-thread processing no longer shares mutable global flags; verify with a concurrent PDF generation scenario that switches between Arabic and Latin text.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
For different TrueType fonts, it seems that one needs to change static (read: global) flags of the LayoutProcessor class.
This will sooner or later lead to hard-to-find bugs in a multi-threaded environment due to race conditions, when OpenPDF is used by more than one thread to create PDFs.
To Reproduce
Due to its nature, this can only reproduced in a multi-threading environment when OpenPDF is used by several threads to create PDF docs, and each thread toggles some of the flags during execution, for example to render arabic text inbetween latin text. And then you still need luck to spot the bug.
So, in practice, this bug will inevitably occur in production, and probably only there.
See my comment on https://github.com/eclipse-birt/birt/pull/2144 for more details
Your real name
Henning von Bargen
Additional context
I think the LayoutProcessor class should be made a normal class (not only static attributes) and an instance of this class should be part of one the basic classes needed to add content to a PDF.
- Ngôn ngữ chính
- Java
- Star
- 4.4k
- Fork
- 714
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của LibrePDF/OpenPDF
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
IndexOutOfBoundsException in PdfReaderCó thể đã có người làm @andreasrosdalw đã nhận 95 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
`PdfSmartCopy` can take effectively unbounded time on nested shared Form XObjectsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
Tất cả issue của LibrePDF/OpenPDF
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue priority: low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Gautam-aman/CODOVYN#52 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
ControlSystemStudio/phoebus#3998 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug/错误
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
FCL-Team/FoldCraftLauncher#1982 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày