Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Unix - Application crashes on Environment.GetModuleFilePath

Open andreakarasho opened this issue 3 years ago • 0 comments

Tested on Ubuntu 20.04. Probably the same issue happens on macOS.

Application crashes here: https://github.com/beefytech/Beef/blob/f5a863d55a35ed85e99ff612305aafe3e14b3825/BeefLibs/corlib/src/Environment.bf#L51 Probably something is wrong here: https://github.com/beefytech/Beef/blob/9e62f50027b66821f49c3dd96f6b311f57c55623/BeefySysLib/platform/posix/PosixCommon.cpp#L1656

The last line of the native stack is:

0x0x7f366aae96e0 _ZN2bf6System6ResultIU4voidNS0_8Platform6ResultEE9NoDisposeIU4voidEEU4voidv

UPDATE: I debugged and the BfpDynLib* lib passed in the cpp function linked above is NULL. I assume this function is not called when spawning a shared lib on unix systems:

https://github.com/beefytech/Beef/blob/136c2b22110049d721a23e02e60169f6f04fed76/BeefLibs/corlib/src/Internal.bf#L169

andreakarasho avatar May 28 '21 23:05 andreakarasho