When accessing the commandQueue getter of the OpenCLResourceservice before the context getter was accessed the program finishes with a segmentation fault.
Example:
ServiceReference ref = GetModuleContext()->GetServiceReference<OclResourceService>(); OclResourceService* resources = GetModuleContext()->GetService<OclResourceService>(ref); m_context = resources->GetContext(); m_CommandQue = resources->GetCommandQueue()
This is quite obvious because the commandQueue needs to be initialized with a valid context, and the context is only initialized when it is accessed.
Proposal:
Check in the command queue getter if the contextcollection is initialized. If not initialize the collection. That will prevent from crashing.