Closed LemADEC closed 5 years ago
With the You didn't mount this location
error, can you try with multiple peripherals attached to one computer? Normally this only occurs if you try to unmount something which somebody mounted, or the original mounting failed - also check your .mount
calls don't return null
!
WRT the Too many open files error
, ideally you should be caching the mounts on your end, as they're not super-cheap to construct (we scan that folder/file of the zip directory to find all files). However, CC:T is also definitely failing to clean up some resources, so I'll look into that.
1- I've added a cache and a quick fix for the actual mount location. On the server, we don't have 2 blocks connecting to the same computer. So I'm still a bit confused on what's causing the unmount() error.
2- ok
3- I've tried to connect the same peripheral several times to the same computer using wired modems:
Is it intended to only relocate for writable mounts?
It hasn't relocated automatically for a while now, though I'd need to check when that was changed (1.7.10 maybe?). You'll need to do that on your end.
3- 1.7.10 didn't relocate either. At that time, I had already added a secondary location in case the startup script was already present for whatever reason.
1- I've found why we have 2 blocks connecting to the same computer, hence trying to unmount multiple time the same location.
So the rest is all yours to fix :)
Useful information to include:
When attaching computer controlled blocks to a computer, my mod is also mounting different preloaded scripts as resources. When detaching the computer, my mod asks to dismount them. For some obscure reason, on our server, it fails to unmount them with this callstack:
I'm not able to reproduce in single player with just CC-tweaked and Computronics. So, I'm probably missing something. Any idea on what could be triggering this?
Furthermore, after some time, the mount fails due to 'Too many open files', which means there's a leak. I suspect the unmounting didn't happen properly, and also, CC doesn't cache the RessourceMount, hence constantly creating new ones?
Here's my existing code for mounting a file or folder:
I can add a cache there, but that seems weird when CC on 1.7.10 never had such a resource leak on a busy server, so it feels like a regression somewhere.