Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0055278Openbravo ERPA. Platformpublic2024-04-22 14:522024-05-06 16:19
Romain_Gesquiere 
eugen_hamuraru 
normalmajorrandom
closedfixed 
30Openbravo Appliance 14.04
 
PR24Q3 
Core
No
0055278: Not thread-safe on printing can lead to unexpected result
As the part of the code in the link below is not thread-safe, we can randomly have for example:
-User try to print multiple invoices
-At the same time some other user try to print one invoice
-The multi-print is not considered as multi-print and returns only one invoice

These variables are probably not thread-safe:

https://docs.google.com/document/d/1iAMkF9DvjQm3tAvCfOIa1IWuicmyfPcRjzWcwukW0l4/edit?usp=sharing [^]


The problematic code is in https://gitlab.com/openbravo/product/openbravo/-/blob/3.0PR24Q1.1/src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java#L103 [^]
Can happen randomly
Idea of fix linked
No tags attached.
diff jasper_fix.diff (4,380) 2024-04-22 14:52
https://issues.openbravo.com/file_download.php?file_id=19676&type=bug
Issue History
2024-04-22 14:52Romain_GesquiereNew Issue
2024-04-22 14:52Romain_GesquiereAssigned To => Triage Omni WMS
2024-04-22 14:52Romain_GesquiereFile Added: jasper_fix.diff
2024-04-24 14:29alostaleAssigned ToTriage Omni WMS => Triage Platform Conn
2024-04-24 14:30alostaleProjectModules => Openbravo ERP
2024-04-24 14:30alostaleModules => Core
2024-04-24 14:30alostaleTriggers an Emergency Pack => No
2024-04-24 14:30alostaleCategoryReporting => A. Platform
2024-04-24 14:37alostaleDescription Updatedbug_revision_view_page.php?rev_id=27870#r27870
2024-04-30 09:42adrianromeroAssigned ToTriage Platform Conn => eugen_hamuraru
2024-05-02 10:42hgbotNote Added: 0163985
2024-05-06 16:19hgbotResolutionopen => fixed
2024-05-06 16:19hgbotStatusnew => closed
2024-05-06 16:19hgbotFixed in Version => PR24Q3
2024-05-06 16:19hgbotNote Added: 0164113
2024-05-06 16:19hgbotNote Added: 0164114

Notes
(0163985)
hgbot   
2024-05-02 10:42   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1220 [^]
(0164113)
hgbot   
2024-05-06 16:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b5a069b756aa1d698787e0fcd05096c970dd4ddd
Author: Eugen Hamuraru <eugen.hamuraru@openbravo.com>
Date: 06-05-2024 14:19:27
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b5a069b756aa1d698787e0fcd05096c970dd4ddd [^]

Fixes BUG-55278: PrintController was not thread-safe

  - Remove the usage of instance variables
  - Removed also wrongly overloaded createEmailOptionsPage method which was calling itself
  

---
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0164114)
hgbot   
2024-05-06 16:19   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1220 [^]