Menu

#6 SEG fault caused by initDeviceList

open
nobody
None
5
2005-08-01
2005-08-01
No

When trying to access Devices cached by the
ControlPoint using e.g. getDeviceList(...), I often
get an SEG fault.

This is due to the Disposer Thread which
reinitializes all Devices in initDeviceList. In this
function every device in the old deviceList is
deleted and a new deviceList is generated. This is
also done, when the device was not removed from the
network. This behaviour leads to invalid Device
pointers, when:
1. retrieve a device pointer
2. disposer thread calls initDeviceList
3. device pointer is invalid and application seg
faults

A patch which only deletes "removed devices" and only
adds new "added devices" when necessary is attached.

Roland Moser

Discussion

  • Roland Moser

    Roland Moser - 2005-08-01

    Logged In: YES
    user_id=1259762

    splitting up the patches in smaller parts destroyed them
    somehow :( - so here the correct one which applies with no
    rejects

     
  • Roland Moser

    Roland Moser - 2005-08-02

    Logged In: YES
    user_id=1259762

    found an error an my patch - old devices will be deleted
    when the deconstructor of the temporary list is called.
    New Patch attached

    Roland Moser

     
  • Roland Moser

    Roland Moser - 2005-08-02

    new corrected initDeviceList patch

     
MongoDB Logo MongoDB