CudaText: Crash on exit on NixOS build

Steps to reproduce:

  1. start cudatext
  2. stop via File -> Quit

What happens:

[FORMS.PP] ExceptionOccurred 
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $0000000000000000
  $000000000087FD72
  $000000000056E476
  $00000000005F642E
  $00000000005E36C9
  $00000000005F8F2E
  $0000000000478B4E
  $000000000047A566
  $00000000004309EB
  $00000000004758F6
Exception at 0000000000000000: EAccessViolation:
Access violation.
Exception at 00000000004B2E36: EAccessViolation:
Access violation.

CudaText: 1.121.0 Widget sets: qt5, gtk2, gtk3

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 33 (17 by maintainers)

Most upvoted comments

But that patch also tries to find 3.10; 3.9. Does NixOS have them? somewhere in PATH?

No, that’s NixOS specific that all dependencies pinned at build time, application can’t find any other lib somewere else, other than exact one specified at build time.

I’ve finally found the root cause: downgrading Python-for-Lazarus from 2021.01.08 to 2020.10.23 solves the problem (more exactly this commit caused crash). So, here is a stable deps set for cudatext 1.122.0:

$ cat pkgs/applications/editors/cudatext/deps.json | jq -r 'keys[] as $k | "\($k) \(.[$k] | .rev)"'
ATBinHex-Lazarus 2020.09.05
ATFlatControls 2021.01.12
ATSynEdit 2021.01.12
ATSynEdit_Cmp 2021.01.12
ATSynEdit_Ex 2020.10.04
CudaText-lexers 2020.08.10
EControl 2021.01.12
Emmet-Pascal 2020.09.05
EncConv 2020.06.15
Python-for-Lazarus 2020.10.23
bgrabitmap v11.3.1
$ lazarus-ide -v
2.0.10 SVN Revision: 2.0.10-2
$ lazbuild -v
2.0.10
$ fpc
Free Pascal Compiler version 3.2.0 [2021/01/05] for x86_64
...

Looks like the problem is nix specific somehow, as far as when I build using lazbuild out of nix store, resulting cudatext doesn’t crash on exit, but when I build nix package using lazbuild, resulting cudatext crashes on exit.