{"record":{"id":"3fce4b1ea7dc96ad","repo":"microg/GmsCore","slug":"detector-processor-must-first-be-set-with-setproce","errorCode":null,"errorMessage":"Detector processor must first be set with setProcessor in order to receive detection results.","messagePattern":"Detector processor must first be set with setProcessor in order to receive detection results\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"play-services-vision-common/src/main/java/com/google/android/gms/vision/Detector.java","lineNumber":55,"sourceCode":"     * <p>\n     * If your code has added a processor, an indication of the detector operational state is also indicated with the {@link Detector.Detections#detectorIsOperational()} method. You can check this in your app as it processes detection results, and can convey this state to the user if appropriate.\n     *\n     * @return true if the detector is operational, false if the dependency download is in progress\n     */\n    public boolean isOperational() {\n        return true;\n    }\n\n    /**\n     * Pipeline method (see class level documentation above) for receiving frames for detection. Detection results are forwarded onto a processor that was previously registered with this class (see {@link #setProcessor(Detector.Processor)}).\n     * <p>\n     * Alternatively, if you are just looking to synchronously run the detector on a single frame, use {@link #detect(Frame)} instead.\n     */\n    public void receiveFrame(Frame frame) {\n        Detections<T> detections = new Detections<>(detect(frame), frame.getMetadata().withRotationAppliedToSize(), isOperational());\n        synchronized (processorLock) {\n            if (processor == null) {\n                throw new IllegalStateException(\"Detector processor must first be set with setProcessor in order to receive detection results.\");\n            } else {\n                processor.receiveDetections(detections);\n            }\n        }\n    }\n\n    /**\n     * Shuts down the detector, releasing any underlying resources.\n     */\n    public void release() {\n        synchronized (processorLock) {\n            if (processor != null) {\n                processor.release();\n                processor = null;\n            }\n        }\n    }\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-vision-common/src/main/java/com/google/android/gms/vision/Detector.java#L37-L73","documentation":"Detector.receiveFrame(Frame) is part of the pipeline and only forwards detections when a processor has been installed; calling it before setProcessor/setProcessorOrNull throws IllegalStateException with this message, indicating the detector pipeline was used out of order.","triggerScenarios":"Thrown at play-services-vision-common/src/main/java/com/google/android/gms/vision/Detector.java:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call detector.setProcessor(...) before feeding frames via receiveFrame","Release the processor with release() when done"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}