Opened 12 years ago

Closed 8 years ago

#9039 closed enhancement (fixed)

Tracker should be able to restart deskbar if it crashes.

Reported by: kallisti5 Owned by: kallisti5
Priority: low Milestone: Unscheduled
Component: Applications/Tracker Version: R1/Development
Keywords: Cc: axeld@…
Blocked By: Blocking:
Platform: All

Description

The deskbar shows a "Restart Tracker" item if tracker crashes (isn't running)

The tracker should show a simular menu on the desktop if Deskbar isn't running.

To reproduce Tracker restart process...

  • Kill Tracker
  • Choose Deskbar menu -> "Restart Tracker"

To reproduce Deskbar restart process...

  • Kill Deskbar
  • Right click desktop, no option.
  • Find the Terminal app on desktop, launch it, run Deskbar from command line.

Attachments (2)

Tracker-RestartDeskbar.diff (4.3 KB ) - added by kallisti5 12 years ago.
DebugServerDesktopCrash.diff (1.5 KB ) - added by kallisti5 12 years ago.
the road I began going down... do not commit at this time.

Download all attachments as: .zip

Change History (25)

comment:1 by kallisti5, 12 years ago

Owner: changed from axeld to kallisti5
Status: newassigned

by kallisti5, 12 years ago

Attachment: Tracker-RestartDeskbar.diff added

comment:2 by kallisti5, 12 years ago

patch: 01

comment:3 by kallisti5, 12 years ago

I made a patch that works... however I got a vesa AppServer crash shortly after using the modified tracker... not sure if related to the change but to be safe i'm not committing it yet.

KERN: 17730: DEBUGGER: getNumAvailable() == 0
KERN: debug_server: Thread 17730 entered the debugger: Debugger call: `getNumAvailable() == 0'
KERN: stack trace, current PC 0xffff0114  :
KERN:   (0x7028837c)  0x8d1d35  __assert_fail + 0x51
KERN:   (0x702883ac)  0x943ea4  malloc__Q28BPrivate10threadHeapUl + 0x48c
KERN:   (0x702883fc)  0x9447ad  malloc + 0x151
KERN:   (0x7028842c)  0x9454ec  realloc + 0x110
KERN:   (0x7028845c)  0x5efe55  _Resize__7BStringl + 0x61
KERN:   (0x7028848c)  0x5efd82  _MakeWritable__7BStringlb + 0x8a
KERN:   (0x702884bc)  0x5eb600  SetTo__7BStringPCcl + 0x58
KERN:   (0x702884ec)  0x5eb56b  __as__7BStringPCc + 0x57
KERN:   (0x7028851c)  0x2b2b40  AddTab__9DecoratorR15DesktopSettingsPCc11window_lookUllP7BRegion + 0x54
KERN:   (0x7028855c)  0x2b12e6  AllocateDecorator__10DecorAddOnP7DesktopP13DrawingEngineG5BRectPCc11window_lookUl + 0xbe
KERN:   (0x702885ac)  0x2b173e  AllocateDecorator__12DecorManagerP6Window + 0xf6
KERN:   (0x702885fc)  0x2ad561  _InitWindowStack__6Window + 0x69
KERN:   (0x7028863c)  0x2a8eba  __6WindowRC5BRectPCc11window_look11window_feelUlUlP12ServerWindowP13DrawingEngine + 0x232
KERN:   (0x7028868c)  0x2a2ccd  MakeWindow__12ServerWindowG5BRectPCc11window_look11window_feelUlUl + 0x8d
KERN:   (0x702886ec)  0x29a099  Init__12ServerWindowG5BRect11window_look11window_feelUlUl + 0xd9
KERN:   (0x7028873c)  0x28c6e8  _CreateWindow__9ServerApplRQ28BPrivate12LinkReceiverRl + 0x328
KERN:   (0x702887dc)  0x285e2f  _DispatchMessage__9ServerApplRQ28BPrivate12LinkReceiver + 0x83b
KERN:   (0x70288ecc)  0x28c317  _MessageLooper__9ServerApp + 0x18f
KERN:   (0x70288f7c)  0x27f4ac  _message_thread__13MessageLooperPv + 0x28
KERN:   (0x70288fac)  0x8ca6e3  thread_entry + 0x23

comment:4 by kallisti5, 12 years ago

Cc: axeld@… added

adding Axel to CC list... this probably needs a quick review by another set of eyes.

I rebooted and after extensive testing haven't seen the same app_server crash again. The original app_server crash may of been from moving /boot/Preferences accidentally during testing or replacing libtracker.so multiple times without a reboot.

comment:5 by axeld, 12 years ago

I get all ticket mails, so there is no need to add me to the CC list.

Anyway, I'm not really a fan of such menu items, and I'm not sure the one in Tracker is really that helpful as it's not that visible in comparison. I think I would prefer an alert that pops up in either case that allows you to restart the problematic application. That logic could be either put in both apps, or in a 3rd app, although I don't see a good candidate besides a general "supervisor". That latter solution might even be preferrable, as it allows you to disable the functionality in case you are a developer working on those applications.

Having said that, I do not understand the changes you made in BContainerWindow::RepopulateMenus() -- can the menu bar be NULL ever?

comment:6 by axeld, 12 years ago

Besides, if you find a way to crash the app_server from another application, please commit the changes so we have a good test case :-)

comment:7 by kallisti5, 12 years ago

ah. I pushed this just as I saw your comments :(

The reason for the fMenuBar is if RepopulateMenus is called from the desktop context... there is no desktop menubar and fMenuBar is dereferenced.

comment:8 by kallisti5, 12 years ago

I'm fine removing the functionality for an alert (it does indeed seem like a better idea "Tracker/Deskbar crashed.. restart?)

The fMenuBar dereference prevention should probably stay though.

comment:9 by kallisti5, 12 years ago

Ah... it was pointed out in irc that this functionality already existed in the TaskManager (ctl+alt+delete)

The "Restart Desktop" button shows up if Deskbar *or* Tracker is missing.

Maybe I should remove the menu option from Deskbar *and* Tracker?

comment:10 by axeld, 12 years ago

Personally, I wouldn't mind, though the functionality in the Team Manager is rather hidden in comparison with the Deskbar, at least. I dunno.

comment:11 by kallisti5, 12 years ago

Yeah... which is why I never saw it :) The option in team manager is definitely better rounded, but harder to find in a pinch if you don't know it's there.

I'd say the "correct" solution would be to do what you said about having some kind of watchdog that would throw a dialog box up if DeskBar or Tracker crash... then all three options can be ripped out :)

comment:12 by kallisti5, 12 years ago

you know what? The debug server may be the perfect place for this. Check for either Tracker or DeskBar crashing, and handle the recovery.

comment:13 by axeld, 12 years ago

I'm not sure that's such a good idea: it will already bring up a dialog to ask whether or not to debug the crash. If you choose to run the debugger, there is no way to restart the application.

You might also want to restart Tracker or Deskbar if they quit by other means than a crash, too.

comment:14 by kallisti5, 12 years ago

Thats true.. although in the case of a "Desktop" application crashing we could say...

The system application: XXX
has encountered an error... blah... blah

 <Debug> <Restart>

There is a small catch 22 there though if someone wants to *not* debug deskbar / tracker and not try to restart them... there is also the close window decor though for the debug dialog.

by kallisti5, 12 years ago

the road I began going down... do not commit at this time.

comment:15 by diver, 12 years ago

The ability to restart apps from the crash dialog sounds neat! This way you don't have to find where the app sits first.

comment:16 by kallisti5, 12 years ago

Yeah.. I still think the functionality should be limited to "system" apps such as Deskbar and Tracker... maybe servers as well?

comment:17 by humdinger, 12 years ago

BTW, there's Brian Hill's excellent Einsteinium. I hope he'll update his app for alpha4, as I have the pleasure of running an improved version (esp. the Launcher) for some time now. Einsteinium re-launches quit/crashed apps and offers a launcher of the most used apps. Maybe something like that can be integrated directly in Haiku (the Registrar?) some day.

comment:18 by Feveth, 10 years ago

That gives me an idea. Haiku Task Manager-esque app integrating the CPU "demo" and other stuff, like RAM usage. Doubleclicking the performance monitor should pop up the old demo that BeOS had, with a line between physical processors, and then utilization of each individual RAM stick below it (if possible). Knowing that it was displayed like this in BeOS (Albeit only for total RAM) tells me this is at least partly possible, separated from the processors by a double line or such. Another ticket, someone?

comment:19 by pulkomandy, 10 years ago

Milestone: R1/beta1Unscheduled

This is out of R1 scope.

comment:20 by Feveth, 10 years ago

Add a system flag and a restart button. Shouldn't be too complex.

Also: I could learn some C/C++ and do the tasker. I infact plan on learning those ASAP.

Last edited 10 years ago by Feveth (previous) (diff)

comment:21 by waddlesplash, 8 years ago

This was resolved by launch_daemon -- or was it?

comment:22 by ttcoder, 8 years ago

@waddlesplash I've had a real-world test case for Deskbar around a week ago: Deskbar crashed when opening a 'menu', and as soon as I clicked "Save report" it got restarted instantly and hummed along happily ever after.

As to Tracker, if I hey Tracker quit it (to clean up messed up desktop display) it gets restarted at once and the desktop icons are fixed. Good stuff.

Maybe this ticket can be closed.. Or maybe it's still necessary to track "redundancy" issues, like removing the old TeamMonitor et al features discussed above that are redundant and no longer useful ?

Version 0, edited 8 years ago by ttcoder (next)

comment:23 by pulkomandy, 8 years ago

Resolution: fixed
Status: assignedclosed

That would deserve a separat ticket, I think. It is hard to track when an old ticket is repurposed, you have to read all the comments to find out it is still relevant. Closing this one then.

Note: See TracTickets for help on using tickets.