Why does the integration keep showing a refreshing status?
Hi
I developed an integration to push rule lines, rule boxes, target boxes and events to the server. On one of my PCs which connects to multiple servers, after the client runs for several hours, the integration will get stuck in a continuous refreshing state, and all other integrations show the same status.




However, the integration is still running normally in the background and keeps pushing target boxes and events. The only issue is that rule lines and rule boxes no longer display on the interface. As time goes by, the list of integrations may occasionally become completely empty.

I would like to figure out the root cause. Is this caused by incorrect usage of APIs, or an occasional bug of the client software?
Thanks for your reply and explanation.
Additional information:
- This issue barely reproduces on my other PC that connects to only a single server; it has only occurred twice after extensive testing.
- When the problem happens on the problematic client, launching a new instance of the client works perfectly fine with no such issues. Nevertheless, the newly opened client will also run into the same fault after several hours of operation. Eventually, I will have one faulty client and one normal client running at the same time.
I have attached my API calling code below.
class DeviceAgent: public nx::sdk::analytics::ConsumingDeviceAgent
{
public:
DeviceAgent(const nx::sdk::IDeviceInfo* deviceInfo);
virtual ~DeviceAgent() override;
// virtual void setHandler(nx::sdk::analytics::IDeviceAgent::IHandler* handler) override;
protected:
virtual std::string manifestString() const override;
virtual bool pushCompressedVideoFrame(
nx::sdk::Ptr<const nx::sdk::analytics::ICompressedVideoPacket> videoFrame) override;
virtual nx::sdk::Result<const nx::sdk::ISettingsResponse*> settingsReceived() override;
virtual void doSetNeededMetadataTypes(
nx::sdk::Result<void>* outValue,
const nx::sdk::analytics::IMetadataTypes* neededMetadataTypes) override;
virtual void getIntegrationSideSettings(
nx::sdk::Result<const nx::sdk::ISettingsResponse*>* outResult) const override;
void DeviceAgent::getIntegrationSideSettings(Result<const ISettingsResponse*>* outResult) const
{
TRACK_FUNC_PRINT print("DeviceAgent::getIntegrationSideSettings");
if (!m_subscriptionStarted)
{
return;
}
auto settingsResponse = makePtr<SettingsResponse>();
{
std::lock_guard<std::mutex> lock(m_perimeterMutex);
for (const auto& [settingName, configStr] : m_perimeterCfgMap)
{
settingsResponse->setValue(settingName, configStr);
}
}
{
std::lock_guard<std::mutex> lock(m_tripwireMutex);
for (const auto& [settingName, configStr] : m_tripwireCfgMap)
{
settingsResponse->setValue(settingName, configStr);
}
}
NX_OUTPUT << "Plugin-side settings provided.";
*outResult = settingsResponse.releasePtr();
}Please sign in to leave a comment.
Comments
0 comments