[RELEASE] buggalo - automatic exception collector

  Thread Rating:
  • 3 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
twinther Offline
Senior Member
Posts: 282
Joined: Sep 2004
Reputation: 7
Location: Denmark
Post: #11
Hi all,
I sent a pull request for getting v1.0.1 included in the repo today.
Two new features were added - one is the option to add extra data as we talked about in this thread.
The other is a function decorator to make it easier to wrap a function in the try..except block required by buggalo.
I use it in my tv guide addon - https://github.com/twinther/script.tvgui...ui.py#L174
Code:
@buggalo.buggalo_try_except({'method' : 'TVGuide.onInit'})
def onInit(self):
    self._hideControl(self.C_MAIN_MOUSE_CONTROLS)
    self._showControl(self.C_MAIN_OSD, self.C_MAIN_LOADING)
    self.getControl(self.C_MAIN_LOADING_TIME_LEFT).setLabel(strings(BACKGROUND_​UPDATE_IN_PROGRESS))
    self.setFocus(self.getControl(self.C_MAIN_LOADING_CANCEL))

Please let me know if you have other ideas for improvements Smile
find quote
tria Offline
Member
Posts: 69
Joined: Jan 2012
Reputation: 0
Post: #12
hello twinther,

First thank you for this great module. Thank you also for the great idea. I didn't try it yet, but I liked the concept.
.
Here are some suggestions for improvements

1. Allow a way to specify the error dialog title/message. It will be also great to allow multiple title/message by passing a list of them to a method, and then randomly pick one pair and display it when an error occur.
e.g.
buggalo.setErrorMessage('title here', 'error message here') #one message only
or
buggalo.setErrorMessage([['title1', 'message1'], ['title2', 'message2']]) #pick one randomly each time

2. It would be great if you can keep track of the execution flow. For example the user choose one entry, then from there choose another one, then from there choose an entry that cause an exception. It would be helpful to send the flow up to a given number (3 steps, or make it a definable variable). This can be done by using else (try, except, else) you can there register the path of the script in a log file, and when an exception happens, you just pull the last N paths from the log and send it with the exception dump (I assume it can be done with function decorator). It will help the developer reproduce the error by following the same steps.

3. Don't know if this is possible or not, maybe you can have a third button to show what you are going to send (More Info button). This will comfort the end-user as he will see what is going to be send, and it will allow the developer to see the log when he face the exception himself without sending it to himself.

These what I thought of once I saw this module, I'll make sure to add anything else if it comes to mind.
find quote
twinther Offline
Senior Member
Posts: 282
Joined: Sep 2004
Reputation: 7
Location: Denmark
Post: #13
Hi tria,

Thanks for the suggestions, they are great! I'll try to implement them and probably post something here for feedback.

If you feel like contribution some code as well, you can fork my repository on github:
https://github.com/twinther/script.module.buggalo

Br.
Tommy
find quote
twinther Offline
Senior Member
Posts: 282
Joined: Sep 2004
Reputation: 7
Location: Denmark
Post: #14
Hi tria,

I've been working on your suggestions.
I changed the dialog to a custom one which includes a details view. I also added support for track the user flow.
The initial version of the code is available at my github.

Let me know what you think..

Br.
Tommy

[Image: script.module.buggalo-1.1.0a.png]

[Image: script.module.buggalo-1.1.0b.png]

[Image: script.module.buggalo-1.1.0c.png]
find quote
tria Offline
Member
Posts: 69
Joined: Jan 2012
Reputation: 0
Post: #15
Wow, that is great man! I just saw your post!
I love the custom dialog idea, and I especially was impressed to see the userflow functionality happen.

But seeing the nodename and some of the path showing personal info (like user machine-name, and username) made me wonder if they are useful for debugging an xbmc addon, and some user might opt not to due to this. I mean no need for these info (unlike, OS, XBMC info, versions, timestamps). Maybe if there is a way to disable them from the API? I know I can remove them by myself, but this will require me to do that for each update and have my modified buggalo shipped with every addon. So having and API to enable/disable some of the info would be great.

I know I am pushing it a little bit, but how hard is it to allow the option to send an email instead of posting to a URL. Some developers might not have a website (or able to create a server-side logging on the web), but they do have an email. Allowing them to specify the title (so they can name it [XBMC-ADDON-BUG]) and they make a filter in their inbox to have a folder for them, can make it easy to track errors. It will also allow them to get the errors instantly on their smartphones, or when checking email daily.

But so far I think it is fantastic, and that any addon should use it. I even think it should be built in by xbmc, and I do mean it.
find quote
twinther Offline
Senior Member
Posts: 282
Joined: Sep 2004
Reputation: 7
Location: Denmark
Post: #16
Hi all,

I have been preparing the code for a new release for a while and I think it's about time to push the update.
The major changes are these:
Version 1.1.2 - 2012-09-09
- Improved UI compatibility with skins other than Confluence
- Updated movie quotes

Version 1.1.1 - 2012-09-09
- Reworked error dialog layout a bit

Version 1.1.0 - 2012-07-11
- Added custom error dialog with details view
- Added support for tracking userflow
- More robust handling of extra data

The custom error dialog has been slightly changed compared to the previous screenshots I uploaded.
Other than that everything is pretty much the same.
I have also updated the readme with information on the userflow tracking - it's easiest to read on https://github.com/twinther/script.module.buggalo

Let me know what you think.
If you want to give it a spin you can install my beta repository from http://tommy.winther.nu/xbmc/

Br.
Tommy
find quote
twinther Offline
Senior Member
Posts: 282
Joined: Sep 2004
Reputation: 7
Location: Denmark
Post: #17
I should probably also mention that I have investigated using github as the destination for the error reports.
Unfortunately github requires that you are authenticated when creating the issue - it's possible to setup a scope in the OAuth setup, but it is very wide and would give access to every action on a repo, not just access to create issues - so I dropped implementing that.
I had a quick look at google code, but i think it's the same problem.

I have also considered email as Tria suggested above, but in my experience sending an email from a random box is not as easy as you might think due to all the spam and what not that is sent on the internet these days... SMTP servers are pretty much locked down (otherwise they would be an open relay) and I don't think it's a good idea to ask the user about which SMTP server to use.

If you have another suggestion please let me know...
find quote
Bstrdsmkr Offline
Fan
Posts: 644
Joined: Oct 2010
Reputation: 12
Post: #18
How much of a PITA would it be to add a checkbox next to each item ? That way an item contains a password or etc, they can disable just that item, but still submit the rest. When it gets to the author, that field could say (withheld) out similar.

IMHO, it wouldn't be too much to ask a user to create a Gmail account to use for submissions if they didn't have a server. Then you'd always know the server info.

Great work!
find quote
twinther Offline
Senior Member
Posts: 282
Joined: Sep 2004
Reputation: 7
Location: Denmark
Post: #19
Hi Bstrdsmkr,

Yeah, I understand your idea with checkboxes, but I think it's better if an error report with sensitive information is not sent at all.
If fx the stack trace is left out the error report is not of much use. Plus the end user may not really know what to send / leave out, so I think it's better just to leave the choice of sending or not.

I like your idea with just supporting gmail. It makes it a lot easier to send email, but may still fail in some cases though. In Denmark some ISP's are blocking port 25 (for smtp) so it's impossible to sent mail directly to the MX in this case.
Anyway I have implemented the feature so we can give it a try and see how it works in reality. I have updated the readme at https://github.com/twinther/script.module.buggalo with information.

Let me know what you think.

Also the 1.1.2 version was release about a week ago and judging from my stats around 100.000 installations has been upgraded already - great! Big Grin
find quote
schapplm Offline
Junior Member
Posts: 10
Joined: Apr 2013
Reputation: 0
Post: #20
Hi twinther,
I plan using buggalo for my addon service.watchedlist, but I did not manage to import it.
I tried it with Frodo 12.1 and Frodo 12.2.
When I manually copy the folder script.module.buggalo to my addons-folder it works. Otherwise it doesn't work:
Code:
ImportError: No module named buggalo
Buggalo is listed for Frodo in the official repository: (http://mirrors.xbmc.org/addons/frodo/scr...e.buggalo/), but I can't find it in XBMC.
When I add
Code:
<import addon="script.module.buggalo" version="1.1.2" />
to the required-section of my addon.xml, nothing happens.
In your beta repository http://tommy.winther.nu/xbmc/ I can't find it, too (probably a Frodo-problem).
Do you know any other solution than supplying my addon with the buggalo-folder?

Thanks

P.S.
The error-report is empty, but this is not urgent, since the email content is correct
[Image: buggalonoreport.png]
find quote