I’ve run into a troubling issue in Cinder 0.9.2dev. Basically, I have 2 windows into which I render various things. I suddenly ran into an issue I’d not seen before, a red sphere suddenly rendering erroneously
It should look like this:
It looks like this:
My experience in software development is that this sort of ‘erroneous’ display isn’t to be taken lightly. In fact, it’s something to be very wary of, as it hints at memory corruption. I’ve traced the problem to an Svg I render via Cinder. I render dozens of Svgs, but adding/removing a specific one I can correlate directly to the error occurring/disappearing, respectively.
I tried letting the debugger enter into Cinder’s code, but I was quickly overwhelmed with what the Svg renderer does. So I thought I’d instead opt to at least highlight the issue, as well as post the .Svg itself. If I open the .Svg file with Adobe Illustrator and re-export it, and use the re-exported version, the error disappears.
I am very worried about leaving this sort of mystery unsolved, but my current investigation makes me think the most likely cause the .svg having some bad data in it, and perhaps the Svg Renderer in Cinder 0.9.2dev not handling that well and potentially causing issues.
Svg causing issues:
<svg aria-hidden="true" data-prefix="fas" data-icon="broadcast-tower" class="svg-inline--fa fa-broadcast-tower fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M150.94 192h33.73c11.01 0 18.61-10.83 14.86-21.18-4.93-13.58-7.55-27.98-7.55-42.82s2.62-29.24 7.55-42.82C203.29 74.83 195.68 64 184.67 64h-33.73c-7.01 0-13.46 4.49-15.41 11.23C130.64 92.21 128 109.88 128 128c0 18.12 2.64 35.79 7.54 52.76 1.94 6.74 8.39 11.24 15.4 11.24zM89.92 23.34C95.56 12.72 87.97 0 75.96 0H40.63c-6.27 0-12.14 3.59-14.74 9.31C9.4 45.54 0 85.65 0 128c0 24.75 3.12 68.33 26.69 118.86 2.62 5.63 8.42 9.14 14.61 9.14h34.84c12.02 0 19.61-12.74 13.95-23.37-49.78-93.32-16.71-178.15-.17-209.29zM614.06 9.29C611.46 3.58 605.6 0 599.33 0h-35.42c-11.98 0-19.66 12.66-14.02 23.25 18.27 34.29 48.42 119.42.28 209.23-5.72 10.68 1.8 23.52 13.91 23.52h35.23c6.27 0 12.13-3.58 14.73-9.29C630.57 210.48 640 170.36 640 128s-9.42-82.48-25.94-118.71zM489.06 64h-33.73c-11.01 0-18.61 10.83-14.86 21.18 4.93 13.58 7.55 27.98 7.55 42.82s-2.62 29.24-7.55 42.82c-3.76 10.35 3.85 21.18 14.86 21.18h33.73c7.02 0 13.46-4.49 15.41-11.24 4.9-16.97 7.53-34.64 7.53-52.76 0-18.12-2.64-35.79-7.54-52.76-1.94-6.75-8.39-11.24-15.4-11.24zm-116.3 100.12c7.05-10.29 11.2-22.71 11.2-36.12 0-35.35-28.63-64-63.96-64-35.32 0-63.96 28.65-63.96 64 0 13.41 4.15 25.83 11.2 36.12l-130.5 313.41c-3.4 8.15.46 17.52 8.61 20.92l29.51 12.31c8.15 3.4 17.52-.46 20.91-8.61L244.96 384h150.07l49.2 118.15c3.4 8.16 12.76 12.01 20.91 8.61l29.51-12.31c8.15-3.4 12-12.77 8.61-20.92l-130.5-313.41zM271.62 320L320 203.81 368.38 320h-96.76z"></path></svg>
Svg re-exported (not causing issues):
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="160px" height="90px" viewBox="0 0 160 90" enable-background="new 0 0 160 90" xml:space="preserve">
<path d="M50.282,33.75h5.929c1.936,0,3.271-1.904,2.612-3.723c-0.867-2.387-1.327-4.918-1.327-7.527s0.46-5.14,1.327-7.527
c0.661-1.819-0.677-3.723-2.612-3.723h-5.929c-1.232,0-2.366,0.789-2.708,1.974c-0.86,2.985-1.324,6.091-1.324,9.276
s0.464,6.291,1.325,9.274C47.917,32.959,49.05,33.75,50.282,33.75z M39.556,4.103C40.548,2.236,39.213,0,37.103,0h-6.21
c-1.102,0-2.134,0.631-2.591,1.637C25.402,8.005,23.75,15.056,23.75,22.5c0,4.351,0.548,12.011,4.691,20.894
C28.902,44.383,29.922,45,31.01,45h6.124c2.113,0,3.447-2.239,2.452-4.108C30.836,24.488,36.649,9.577,39.556,4.103z M131.69,1.633
C131.233,0.629,130.203,0,129.102,0h-6.227c-2.105,0-3.456,2.226-2.465,4.087c3.212,6.027,8.512,20.992,0.049,36.779
c-1.005,1.877,0.316,4.134,2.445,4.134h6.193c1.102,0,2.132-0.629,2.589-1.633c2.905-6.369,4.563-13.421,4.563-20.867
S134.594,8.001,131.69,1.633z M109.718,11.25h-5.929c-1.936,0-3.271,1.904-2.613,3.723c0.867,2.387,1.328,4.918,1.328,7.527
s-0.461,5.14-1.328,7.527c-0.66,1.819,0.678,3.723,2.613,3.723h5.929c1.233,0,2.366-0.789,2.708-1.976
c0.861-2.983,1.324-6.089,1.324-9.274s-0.464-6.291-1.325-9.274C112.084,12.039,110.949,11.25,109.718,11.25z M89.274,28.849
c1.239-1.809,1.969-3.992,1.969-6.349c0-6.214-5.032-11.25-11.243-11.25c-6.208,0-11.243,5.036-11.243,11.25
c0,2.357,0.729,4.541,1.969,6.349L47.786,83.941c-0.598,1.432,0.081,3.079,1.514,3.677l5.188,2.164
c1.433,0.598,3.08-0.081,3.675-1.514L66.81,67.5h26.38l8.648,20.769c0.598,1.435,2.242,2.111,3.675,1.514l5.188-2.164
c1.433-0.598,2.109-2.245,1.514-3.677L89.274,28.849z M71.496,56.25L80,35.826l8.504,20.424H71.496z"/>
</svg>
Any and all help is welcome!
Cheers,
Gazoo