It would be better to post in reply, so that text is properly formatted.
parseRAM is under class ViewController: UIViewController.
The logs:
STO Backend is up.
SUCCESS: statsServerInfo(ok: true, out: 11)
RAMBar Optional(<UIProgressView: 0x10320f0a0; frame = (16 192.5; 288 4); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x281ab4800>>)
RAMBar.progress 0.0
STO Backend is up.
SUCCESS: statsServerInfo(ok: true, out: 11)
RAMBar Optional(<UIProgressView: 0x10320f0a0; frame = (16 192.5; 288 4); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x281ab4800>>)
RAMBar.progress 0.11
SUCCESS: statsServerInfo(ok: true, out: 10)
RAMBar Optional(<UIProgressView: 0x10320f0a0; frame = (16 192.5; 288 4); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x281ab4800>>)
RAMBar.progress 0.11
I change tab
SUCCESS: statsServerInfo(ok: true, out: 10) ServiceTOOLS_Control/ViewController.swift:302:
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value 2022-04-18 18:26:45.461472+0200 ServiceTOOLS Control[2730:247910] ServiceTOOLS_Control/ViewController.swift:302: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
Originally the problem happened when I changed tabs, now it happens when after I change tab I return to the first tab.
When you say "I change tab", do you mean "return to first tab" ?
The error now happens on the print line that you added and right when I change tab.
Do you mean here ?
print("SUCCESS: \(response)")
or here
print("RAMBar", self.RAMBar, "RAMBar.progress", self.RAMBar.progress)
In the latter, you should get a log with SUCCESS after returning to tab.
Please be very precise in your information, otherwise it is very hard to guess.