bugGNUstep - Bugs: bug #38310, GSAvahiNetServices crashes when...


You are not allowed to post comments on this tracker with your current authentication level.

bug #38310: GSAvahiNetServices crashes when removing a service

Submitted by:  Marcus Müller <znek>
Submitted on:  Tue Feb 12 00:24:13 2013  
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: In Test

Sun Feb 17 12:27:52 2013, comment #5:

Excellent, that seems to have fixed it (I also tested with a different, slightly more complex project).

I've attached another diff for cleaning up minor issues left (obsolete code remnants, simplification, formal protocol support when compiling with clang).

(file #27475)

Marcus Müller <znek>
Project Member
Sun Feb 17 06:24:57 2013, comment #4:

Spent a lot more time looking at this, and I think I fixed it by removing a couple of lines of code (but I don't know what those lines were intended to do)
Please try it out (see the change to Source/GSAvahiRunLoopIntegration.m)

Richard Frith-Macdonald <CaS>
Project Member
Sat Feb 16 11:13:11 2013, comment #3:

Sorry ... it worked a few times for me ... but as you say, on repeated tests it doesn't.

Richard Frith-Macdonald <CaS>
Project Member
Sat Feb 16 10:30:33 2013, comment #2:

(I cannot re-open the bug with the Savannah web frontend it seems.)

However, the bug remains reproducible even after r36152.

Marcus Müller <znek>
Project Member
Sat Feb 16 08:18:31 2013, comment #1:

Thanks for that excellent demonstration code.
The problem was that the client object was not remogving its run-loop watcher from the run loop before deallocating it (so an incoming end of file event was sent to a deallocated watcher).
I changed the code to remove it from the loop on dealloc, which seems to fix it.

Richard Frith-Macdonald <CaS>
Project Member
Tue Feb 12 00:24:13 2013, original submission:

The current implementation of GSAvahNetServices always crashes when a service is removed. I've attached a very simple demo program that reliably reproduces the crash, including instructions.

Marcus Müller <znek>
Project Member


Attached Files
file #27475:  GSAvahiCleanup.diff added by znek (3kB - application/octet-stream)
file #27447:  GSAvahiNetServicesCrash.tar.gz added by znek (3kB - application/x-gzip)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by znek (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Feb 17 12:27:52 2013znekAttached File-=>Added GSAvahiCleanup.diff, #27475
    Sun Feb 17 06:24:57 2013CaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test
    Sat Feb 16 11:13:11 2013CaSStatusFixed=>None
    Sat Feb 16 08:18:31 2013CaSStatusNone=>Fixed
    Tue Feb 12 00:24:13 2013znekAttached File-=>Added GSAvahiNetServicesCrash.tar.gz, #27447

    Back to the top

    Powered by Savane 3.1-cleanup1