Adding DeviceService to ServiceManager causes a `System.IndexOutOfRangeException`
jvyden opened this issue · 2 comments
jvyden commented
I tried to debug this myself, but I'm not sure what is causing this. I was able to narrow it down to the last line of this snippet:
_serviceManager = new ServiceManager();
_deviceService = new DeviceService();
_serviceManager.AddService(_deviceService);
This is located here, and is called from here.
I am using a fork of MOSA, but this shouldn't count as the changed code doesn't affect anything in this codepath.
AnErrupTion commented
You need to add DeviceService to the ServiceManager at least after this line:
Mosa.DeviceSystem.Setup.Initialize(_hal, _deviceService.ProcessInterrupt);
jvyden commented
Yep, that was it. Thank you!