Opened 15 years ago

Closed 15 years ago

#4104 closed bug (fixed)

Occasional debugger call from Observable class destructor when Icon-O-Matic is quit

Reported by: leavengood Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/Icon-O-Matic Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I have been using Icon-O-Matic a lot lately and I have been seeing periodically. Sometimes when IOM is quit, the crash dialog comes up. The stacktrace indicates the problem is from a debugger call:

228: DEBUGGER: Observable::~Observable() - 1 observers still watching, first: 12PathListItem

debug_server: Thread 228 entered the debugger: Debugger call: `Observable::~Observable() - 1 observers still watching, first: 12PathListItem
'
stack trace, current PC 0xffff0114  :
  (0x7ffee6fc)  0x28e127  _._10Observable + 0x83
  (0x7ffee83c)  0x27481d  _._10IconObject + 0x6d
  (0x7ffee87c)  0x25bd2e  _._Q38BPrivate4Icon10VectorPath + 0xca
  (0x7ffeeabc)  0x29aa26  Release__13Referenceable + 0x42
  (0x7ffeeaec)  0x2caa43  _._19UnassignPathCommand + 0x3b
  (0x7ffeeb1c)  0x2767ae  Clear__12CommandStack + 0x8a
  (0x7ffeeb5c)  0x27422e  MakeEmpty__8Documentb + 0x26
  (0x7ffeeb8c)  0x2d7896  _MakeIconEmpty__13IconEditorApp + 0xaa
  (0x7ffeebcc)  0x2d6a54  MessageReceived__13IconEditorAppP8BMessage + 0x98
  (0x7ffeecac)  0x3ee8eb  DispatchMessage__7BLooperP8BMessageP8BHandler + 0x5b
  (0x7ffeecdc)  0x3e5025  DispatchMessage__12BApplicationP8BMessageP8BHandler + 0x405
  (0x7ffeeecc)  0x3f0259  task_looper__7BLooper + 0x211
  (0x7ffeef0c)  0x3e3791  Run__12BApplication + 0x75
  (0x7ffeef4c)  0x2da09a  main + 0x6e
  (0x7ffeef7c)  0x25478b  _start + 0x5b
  (0x7ffeefac)  0x105b1a  runtime_loader + 0x14a

So for whatever reason a PathListItem is not being removed from the Observer list before the Observable is destroyed.

Change History (3)

comment:1 by korli, 15 years ago

I could reproduce this bug on quit:

Thread 4972 called debugger(): VectorPath::~VectorPath() - there are still listeners attached! 0x18173854/Q38BPrivate4Icon5Shape
Reading symbols from /boot/system/runtime_loader...done.
Loaded symbols for /boot/system/runtime_loader
Reading symbols from /boot/system/lib/libbe.so...done.
Loaded symbols for /boot/system/lib/libbe.so
Reading symbols from /boot/system/lib/libtracker.so...done.
Loaded symbols for /boot/system/lib/libtracker.so
Reading symbols from /boot/system/lib/libtranslation.so...done.
Loaded symbols for /boot/system/lib/libtranslation.so
Reading symbols from /boot/system/lib/libstdc++.r4.so...done.
Loaded symbols for /boot/system/lib/libstdc++.r4.so
Reading symbols from /boot/system/lib/libroot.so...done.
Loaded symbols for /boot/system/lib/libroot.so
Reading symbols from /boot/system/lib/libtextencoding.so...done.
Loaded symbols for /boot/system/lib/libtextencoding.so
[tcsetpgrp failed in terminal_inferior: Invalid Argument]
[Switching to team /boot/system/apps/Icon-O-Matic (4972) thread Icon-O-Matic (4972)]
0xffff0114 in ?? ()
(gdb) bt
#0  0xffff0114 in ?? ()
#1  0x0081f50e in debugger () from /boot/system/lib/libroot.so
#2  0x0025bd9b in BPrivate::Icon::VectorPath::~VectorPath ()
#3  0x0029ac1e in Referenceable::Release ()
#4  0x002cb3b1 in UnassignPathCommand::~UnassignPathCommand ()
#5  0x00276acb in CommandStack::Clear ()
#6  0x002764d6 in CommandStack::~CommandStack ()
#7  0x002742b6 in Document::~Document ()
#8  0x002d712e in IconEditorApp::~IconEditorApp ()
#9  0x002da82a in main ()
(gdb) 

comment:2 by leavengood, 15 years ago

Hi korli,

That is good to see I'm not alone in seeing this. Unfortunately I only see it occasionally and I haven't yet figured out what a reproducable test case is (mostly because I'm just trying to use IOM to make icons and am not just testing it.) Do you have such a test case?

comment:3 by stippi, 15 years ago

Resolution: fixed
Status: newclosed

Should be have been fixed by hrev32707. See commit message for how to track possibly more reference counting problems. Please reopen if you see such a crash on quit again.

Note: See TracTickets for help on using tickets.