FAQ & Troubleshooting

Heap corruption when using PyTorch (issue 215)

On some systems, you may see an error like the following when using torch and juliacall:

Python(65251,0x104cf8580) malloc: Heap corruption detected, free list is damaged at 0x600001c17280
*** Incorrect guard value: 1903002876
Python(65251,0x104cf8580) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    65251 abort      ipython

A solution is to ensure that juliacall is imported before torch.