img tag for sequence diagram participants does not always render

0 votes
asked Feb 22 in Bug by klarose (120 points)
I wrote a fairly extensive explanation in https://github.com/plantuml/plantuml/issues/176.

TL;DR: The image icon in the participant box works unless many diagrams are rendered concurrently, in which case it randomly fails to render by simply not appearing for some participants.

1 Answer

0 votes
answered Feb 28 by plantuml (201,220 points)
This may be due to https ( https://wiki.agilicus.com/media/wiki/favicon.png )

Could you test with a png image hosted on http ?

Thanks!
commented Mar 1 by klarose (120 points)
Thanks for the reply. I was able to reproduce it with an image served over http. I used the following plantuml code:

@startuml
!define logo(x) "x <img:http://s.plantuml.com/beta-icon.gif {scale=1}>" as x

Title: Test
skinparam minClassWidth 150


box "Box1" #LightGreen
 participant logo(A)
 participant logo(B)
 participant logo(C)
 participant logo(D)
 participant logo(E)
 participant logo(F)
 participant logo(G)
 participant logo(H)
 participant logo(I)
 participant logo(J)
 participant logo(K)
 participant logo(L)
 participant logo(M)
 participant logo(N)
 participant logo(O)
 participant logo(P)
end box

A->A: Hey
B->B: Hey
C->C: Hey
D->D: Hey
E->E: Hey
F->F: Hey
G->G: Hey
H->H: Hey
I->I: Hey
J->I: Hey
K->I: Hey
L->I: Hey
M->I: Hey
N->I: Hey
O->I: Hey
P->I: Hey
@enduml


To reproduce, I simply ran the following:

export  URL=http://www.plantuml.com/plantuml/png/RSu_R_8m4CVn_Lx5FNcMCXZAq2LgBKY0XFyCI9rDOe9LnuwmaLnLVUzjPSdJRLzzT2VzPiwBkt_q6lwryggCH6qx-nH6c0LyLNsNtxmVyid4ZGSjpD_bkB7zv2AzOAgnPjofAtwvHcZvDltc6Gg70U2il9OvdgNpu3wK6SHTzDWhKshXtBjg_GsdByy0SB41iyA6QOR_Twgx-UekfG7y_V2gKOCmFcwQZmWiA2mfN52uf715OKLXJU6QmWs5Mmft5EufF51ufF0q0cbQlDW0C6TydcCjFw5Wl8XLCbx6MZ2-YBLaV1bhnVWgLiLu5Qjcl8wrPdmTQvDgcsgNQf_gaEgOwfHg9atxwFKF

for i in $(seq 1 10); do (curl -s "$URL" --output /tmp/foo${i}.png &); done

Opening a few of the foo1.png, foo2.png,...foo10.png  files will show that the BETA image does not always appear.

FWIW, I'd be very surprised if http vs https made a concrete difference here, aside from timing. HTTPS is just HTTP over TLS -- the only difference is at the transport layer, which should be transparent to the plantuml application. If timing is the problem, then that likely points us to the cause of the bug -- some sort of race condition in the application itself.
commented Mar 5 by plantuml (201,220 points)
Could you test with last beta http://beta.plantuml.net/plantuml.jar ?
It may come from underlaying Java API, so we add few synchronized keywords.
Thanks
...