AmiBroker closes unexpectedly on power failure to external monitors

Hello Everyone,

Subject: AmiBroker (running in laptop) closes unexpectedly on power failure to external monitors (extended) with floating window charts/Analysis in it.

Running Amibroker 6.30.5 64 bit licensed version in Laptop with good battery.

I have connected 2 external monitors (1 HDMI & 1 Mini DP) which displays couple of charts/Analysis in floating windows.

The moment power failure happens the external monitors goes down but the laptop is undisturbed & running, yet Amibroker closes unexpectedly.

(Wifi and network connectivity is not disturbed as its on UPS.)

The issue is consistent every time the power fails and the extended monitors have floating windows in it.

If there is no floating windows in external monitors, Amibroker doesn’t terminate unexpectedly on normal power failure.

I tried testing this manually by switching off the power supply to the monitors randomly, I could replicate the issue only once in 10 times approx.., Couldn't isolate on why it fails the "one" time it fails during simulation.

Except for Amibroker, data plug-in, Chrome and command prompt windows running continuous ping and js script for repeated execution of scan and exploration using anlaysisDoc OLE object, no other applications are running at the time of failure.

Searched with relevant keywords that I can think of but couldn’t find any post on this issue.

I know the reliable solution is to get an UPS for the monitors :slight_smile: , but is there a way to avoid the unexpected termination of Amibroker as I keep losing the day’s tick data for all symbols. And sometimes symbol specific data(whichever symbol chart is open at the time of power failure) gets corrupted. So need to delete those symbols and repopulate.

Has anyone faced such an issue?
Would appreciate any suggestions/solutions. Thanks.

Karthik P

It might be hardware issue. When power suddenly goes off a current spike might occur on hdmi / display port that might propagate thru PCB to RAM modules causing random error on data bus. If such an error happens to occur on instruction code being executed by CPU it might lead to incorrect instruction code / exception / stack overflow / crash.
You can’t have reliable system when power goes off.

A random nature clearly points to hardware:

I could replicate the issue only once in 10 times approx

Thanks for the feedback Tomasz. I did think about the spike issue as I have spike protector for the LED tvs but dint expect there would be a spike at the moment/instance of power failure. Will plan for the UPS then. Thanks for your time.

You need to keep in mind that modern RAMs work with voltage of 1.2V or less. There is not much margin for error in case of power line disruptions.

Understood. Thanks Tomasz.