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

vzlogger crashes if unknown meter protocol specified #74

Closed
r00t- opened this issue Dec 23, 2014 · 3 comments · Fixed by #75
Closed

vzlogger crashes if unknown meter protocol specified #74

r00t- opened this issue Dec 23, 2014 · 3 comments · Fixed by #75
Labels

Comments

@r00t-
Copy link
Contributor

r00t- commented Dec 23, 2014

silly bug that i debugged two years ago, still not fixed.
http://volkszaehler.org/pipermail/volkszaehler-dev/2012-December/002244.html

@r00t-
Copy link
Contributor Author

r00t- commented Dec 23, 2014

this is what the debug flag thing is for, btw:

# gdb --args src/vzlogger -c ../vzlogger_r00t/etc/vzlogger.conf 
(gdb) run
[...]
[Dec 23 12:51:11][mtr0] Creating new meter with protocol raspis0.

Program received signal SIGSEGV, Segmentation fault.
0xb6b8a5e4 in strcmp () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) bt
#0  0xb6b8a5e4 in strcmp () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x000902b4 in meter_lookup_protocol (name=0x376484 "raspis0", 
    protocol=0x376780) at /root/vzlogger_nullapi/src/Meter.cpp:212
#2  0x0008ee70 in Meter::Meter (this=0x376770, pOptions=...)
    at /root/vzlogger_nullapi/src/Meter.cpp:81
#3  0x0009d5e0 in MeterMap::MeterMap (this=0xbeffe848, options=...)
    at /root/vzlogger_nullapi/include/MeterMap.hpp:56
#4  0x0009c8a8 in Config_Options::config_parse_meter (this=0x360120, 
    mappings=..., jso=...)
    at /root/vzlogger_nullapi/src/Config_Options.cpp:202
#5  0x0009c334 in Config_Options::config_parse (this=0x360120, 
    mappings=...) at /root/vzlogger_nullapi/src/Config_Options.cpp:157
#6  0x0008ceec in main (argc=3, argv=0xbefffce4)
    at /root/vzlogger_nullapi/src/vzlogger.cpp:357
(gdb) up
#1  0x000902b4 in meter_lookup_protocol (name=0x376484 "raspis0", 
    protocol=0x376780) at /root/vzlogger_nullapi/src/Meter.cpp:212
212         if (strcmp(it->name, name) == 0) {
(gdb) p *it
$1 = {id = meter_protocol_none, name = 0x0, desc = 0x2b61d8 "\260", 
  max_readings = 601880, periodic = 112}

@mbehr1
Copy link
Contributor

mbehr1 commented Dec 23, 2014

fixed with #75

@andig andig closed this as completed in #75 Dec 23, 2014
@r00t-
Copy link
Contributor Author

r00t- commented Dec 29, 2014

i DID fix this in the C version back then...
goes to show how bad it is to maintain two versions in parallel...
224e213

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

Successfully merging a pull request may close this issue.

3 participants