You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a somewhat artifical situation, but I still wonder why this has not been caught befor by other projects using PC/GEOS.
I have experimented with the ec +all command in Swat (which enables some app-specific debugging and stress-testing, such as forcing ThreadBorrowStackSpace to always borrow, even if there is theoretically still enough space).
However, this makes most apps crash with this backtrace when closing them:
1: near FatalError(), bootBoot.asm:870
2: far AppFatalError(), bootBoot.asm:870
* 3: near ECCheckMemHandleNS(), heapErrorCheck.asm:233
4: far ECCheckMemHandleNSFar(), heapErrorCheck.asm:219
5: far ECCheckGeodeHandle(), geodesErrorCheck.asm:184
6: near MemAllocLow(), heapLow.asm:491
7: near MemAllocSetOwner(), heapHigh.asm:222
8: near MemAlloc(), heapHigh.asm:213
9: far ThreadBorrowStackSpace(), threadThread.asm:2141
10: near FullLockNoReload(), heapLow.asm:176
11: far FarFullLockNoReload(), heapLow.asm:156
12: near FileLockPath(), filePath.asm:4010
13: near FP_PathLockDS(), filePath.asm:3962
14: far FileDeletePathStack(), filePath.asm:4717
16: far ThreadDestroy(), threadThread.asm:782
The reason appears to be that ThreadDestroy calls FileDeletePathStack after releasing the Geode handle - it cannot do it before, because the thread exit handlers of some libraries still need the current path to work correctly. However, this means that ThreadBorrowStackSpace no longer has a Geode handle to allocated the new stack from, causing the fatal error.
I don't see any obvious signs that this code path has been changed recently, so I am a bit surprised that this has not caught out other users of ec +app. Perhaps EC flags are a feature that has not been widely used, at least I had completely forgotten about it (even though I now remember having used it in the past...).
The text was updated successfully, but these errors were encountered:
I can confirm this. I have used ec all very often (more often, I use ec ALL) and mostly the app crashes while closing. Even in the old SDK. So, I use 'ec none' to avoid this. The behavior is so old that it never occurred to me to make an issue out of it. :-)
This is a somewhat artifical situation, but I still wonder why this has not been caught befor by other projects using PC/GEOS.
I have experimented with the
ec +all
command in Swat (which enables some app-specific debugging and stress-testing, such as forcingThreadBorrowStackSpace
to always borrow, even if there is theoretically still enough space).However, this makes most apps crash with this backtrace when closing them:
The reason appears to be that
ThreadDestroy
callsFileDeletePathStack
after releasing the Geode handle - it cannot do it before, because the thread exit handlers of some libraries still need the current path to work correctly. However, this means thatThreadBorrowStackSpace
no longer has a Geode handle to allocated the new stack from, causing the fatal error.I don't see any obvious signs that this code path has been changed recently, so I am a bit surprised that this has not caught out other users of
ec +app
. Perhaps EC flags are a feature that has not been widely used, at least I had completely forgotten about it (even though I now remember having used it in the past...).The text was updated successfully, but these errors were encountered: