Calc referencing other sheet cell with formula freeze/hang

Hi, I have a cell in sheet A that value is calculated by formula that use other cell in same sheet.
The formula is simple arithmetic, it continues around 10 - 12 cell.
e.g P1 = N1/O1 * 100 then N1 = M5 * 24 and so on until cell A, there is no loop here.

Then I create a new sheet and try to reference P1 cell value with simple =$‘Sheet A’.P1, calc directly freeze and hangs. CPU fan increase cause it use 100%cpu. Force quit / wait dialog is shown.

My environment
Gnome Ubuntu 16.04.5
Version: 6.0.5.2
Build ID: 1:6.0.5~rc2-0ubuntu0.16.04.1~lo1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2;
Locale: en-US (en_US.UTF-8); Calc: group

====UPDATE=====

Testing again using Libreoffice 5.4.6.2, same problem exist.
Then I covert ods to xlsx, and reopen using libreoffice again it work no more freeze, so ods problem ??

====UPDATE=====

I think I found the problem, but no idea what cause it.
If I type “=” then move to other sheet to select the reference cell it will freeze
But If I type "=‘Sheet A’.P1 directly in the Sheet B without moving to other sheet it works
Perhaps GUI Problem ?

Please provide a sample document. Without it, it’s nothing to discuss.

I’ll try to recreate it, cause this is internal doc. I think it is the same bug like when selecting range cell like SUM or Validation list. When I type directly the formula it’s ok.

It only happen when the document has a lot of formula even if the file is small size only 50kb. I’m unable to recreate the problem using new empty file, it doesn’t show this problem, got to try again later.