Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SensorsManager.getSensors: ArrayIndexOutOfBoundsException #2

Closed
trzimar opened this issue Sep 19, 2016 · 5 comments
Closed

SensorsManager.getSensors: ArrayIndexOutOfBoundsException #2

trzimar opened this issue Sep 19, 2016 · 5 comments

Comments

@trzimar
Copy link

trzimar commented Sep 19, 2016

java.lang.ArrayIndexOutOfBoundsException: 1
at com.profesorfalken.jsensors.manager.SensorsManager.getSensors(SensorsManager.java:100)
at com.profesorfalken.jsensors.manager.SensorsManager.getCpu(SensorsManager.java:66)
at com.profesorfalken.jsensors.manager.SensorsManager.getComponents(SensorsManager.java:54)
at com.profesorfalken.jsensors.SensorsLocator.getComponents(SensorsLocator.java:34)
at com.profesorfalken.jsensors.JSensors.components(JSensors.java:73)
at org.jutils.jhardware.util.TemperatureUtils.getCpuTemperatureByjSensors(TemperatureUtils.java:41)
at org.jutils.jhardware.util.TemperatureUtils.getCpuTemperatureForWindows(TemperatureUtils.java:59)
at org.jutils.jhardware.info.processor.windows.WindowsProcessorInfo.parseInfo(WindowsProcessorInfo.java:54)
at org.jutils.jhardware.info.processor.AbstractProcessorInfo.getInfo(AbstractProcessorInfo.java:29)
at org.jutils.jhardware.info.processor.AbstractProcessorInfo.getInfo(AbstractProcessorInfo.java:25)
at org.jutils.jhardware.HardwareInfo.getProcessorInfo(HardwareInfo.java:52)

@profesorfalken
Copy link
Owner

Hello,

Could you execute JSensors in debug mode?

Map<String, String> overriddenConfig = new HashMap<String, String>();
overriddenConfig.put("debugMode", "true");

[...]
Components components = JSensors.get.config(overriddenConfig).components();

And post here the output?

What is your system? How are you trying to integrate jSensors?

Thanks

@trzimar
Copy link
Author

trzimar commented Sep 20, 2016

Hi,

well, debug output is:

INFO c.p.j.m.w.WindowsSensorsManager - RawSensorData:
INFO c.p.j.m.w.WindowsSensorsManager - NormalizeSensorData:

System is Citrix Windows Server 2008 R2 and we simply call:
org.jutils.jhardware.HardwareInfo.getProcessorInfo();

Could temperature information be excluded from getting CPU info?

Windows PowerShell also stops working (exception in clr.dll modul) when calling this, but it is windows thing...

Thanks!

@profesorfalken
Copy link
Owner

Hello,

OK I understand now. You are using jHardware and not directly jSensors.
Yes, in a citrix machine, the cpu temperature has no sense. I will try to control better the case when no data is retrieved.

I will keep you updated.

@profesorfalken
Copy link
Owner

Hello,

Should be fixed if you use jHardware v0.8.3

Best regards

@trzimar
Copy link
Author

trzimar commented Sep 23, 2016

Hello,

it is fixed, thanks!

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants