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
if (GC_mach_threads_count == GC_MAX_MACH_THREADS) // 256
ABORT("Too many threads");
This is a problem for two reasons:
Cannot be easily handled by application code
Behaviour is not obvious: an application can start >= 256 threads and that will not be a problem if the gc does not run
To avoid this I suggest that a check is added in Thread.start() and a RuntimeException is thrown (or perhaps a VirtualMachineError?) if that will exceed the 256 thread limit (note that this includes native threads).
This way at least the application will have a chance to capture the exception and perhaps do something useful with it.
The text was updated successfully, but these errors were encountered:
guillerodriguez
changed the title
Robovm app crashes if gc triggered and there are more than 256 threads
Robovm app crashes if gc triggered and there are >=256 threads
May 17, 2021
Issue details
If the garbage collector kicks in and there are >= 256 threads alive, the application will crash.
This is due to the following check in bwdgc:
This is a problem for two reasons:
To avoid this I suggest that a check is added in Thread.start() and a
RuntimeException
is thrown (or perhaps aVirtualMachineError
?) if that will exceed the 256 thread limit (note that this includes native threads).This way at least the application will have a chance to capture the exception and perhaps do something useful with it.
The text was updated successfully, but these errors were encountered: