Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error 0 Critical glue error

ANSWERED

Hi,

 

I keep getting this error, "Error 0 Critical glue error," when I install my analog clockface on my Fitbit Versa. I can see the clock hands working, although they are -90 degrees off, but there is no background; I get a black background.

 

I don't get any errors when I connect to the simulator instead. and I can see the background in the simulator.

 

This is how I implemented the background:

 

  <image id="image" width="100%" height="100%" href="hands/HermesStyle.jpg" load="sync"/>

I tried converting the image to png but the same problem occurs.

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I found out what's wrong. 

 

For some reason, Photoshop saved the image with dimensions of 625x625 pixels.
When I changed the dimensions to 300x300 pixels. Everything worked fine. No errors.
I did not change the svg file. It's still the same.

View best answer in original post

Best Answer
5 REPLIES 5
That error can be apparently be produced by a missing ID on a tag that needs an ID.
Are there any other tags in your svg that might be missing an ID?
Best Answer
0 Votes

Every tag in the svg has an id.

<svg>
  <image id="image" width="100%" height="100%" href="hands/HermesStyle.jpg" load="sync"/>
  
  <g id="hours" pointer-events="visible" transform="translate(50%,50%)">
    <image x="-72" y="-9" width="92" height="18" href="hands/hr_hand.png" />
  </g>
  <g id="mins" pointer-events="visible" transform="translate(50%,50%)">
    <image x="-6" y="-94" width="12" height="115" href="hands/min_hand.png" />
  </g>
  <g id="secs" pointer-events="visible" transform="translate(50%,50%)">
    <image x="-27" y="-104" width="52" height="162" href="hands/sec_hand.png" />
  </g>
  
</svg>
Best Answer
0 Votes

Some of the images don't have an ID.

Best Answer
0 Votes

I found out what's wrong. 

 

For some reason, Photoshop saved the image with dimensions of 625x625 pixels.
When I changed the dimensions to 300x300 pixels. Everything worked fine. No errors.
I did not change the svg file. It's still the same.

Best Answer

Just want to add my 2 cents and my thanks for pointing this out. I had several images in my watch face that were larger than what the svg width and height settings specified. In the simulator, it did the scaling automatically and worked fine. I thought the image scaling in the simulator and on the watch looked smoother than if I "pre-scaled" the images in Gimp or Paint to the right size, so I deliberately left the images larger than needed. On the watch itself, the images sometimes appeared, and sometimes were dropped. I didn't equate the cryptic "Critical glue error" with this until I read this post. It seemed like the more scaling that was required, the more likely it was to have problems. I thought it was a memory problem, so I spent a lot of time looking for memory leaks. It's really annoying to have an app work perfectly in the simulator and fail completely on the device! I think the svg documentation should state that scaling images on the device is not reliable and can lead to the "Critical glue error".

Best Answer
0 Votes