Bug 2983

Summary: Hob does not report errors
Product: [Build System, Metadata & Runtime] Hob Reporter: Belen Barros Pena <belen.barros.pena>
Component: hobAssignee: Cristian Iorga <cristian.iorga>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: High CC: alexandru.damian, bluelightning, cristian.iorga, jessica.zhang, poky.bs.watcher, poky.watcher, sgw, valentin.popa
Version: unspecified   
Target Milestone: 1.3 M5   
Hardware: x86   
OS: Multiple   
Whiteboard: 9628271a455492970e2d9ad439ab0a430f619a39, 696ccb4f5aec1bd776a8825f1b50391630df9da5
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on: 2960    
Bug Blocks:    
Attachments:
Description Flags
terminal.png
none
blank-hob.png
none
error reporting design proposal
none
error reporting design proposal
none
very-long-error.png none

Description Belen Barros Pena 2012-08-21 16:20:47 UTC
Created attachment 713 [details]
terminal.png

Hob is not currently very good at reporting errors. I've encountered times where you just get an empty error alert or nothing at all. I've attached a couple of screenshots as an example:

- As you can see in the attached screenshot terminal.png, there has been an IOError because of a missing directory

- The screenshot blank-hob.png shows how Hob looked like when this error came up

It is difficult to provide a generic error reporting solution, but at the very least we should show an error alert displaying the same information provided by the command line interface. 

For a description of error alerts, see 

http://developer.gnome.org/hig-book/3.5/windows-alert.html.en
Comment 1 Belen Barros Pena 2012-08-21 16:21:08 UTC
Created attachment 714 [details]
blank-hob.png
Comment 2 Paul Eggleton 2012-09-10 17:14:18 UTC
I have sent a fix for the dialog being blank; however once fixed, some of our errors are far too long for the dialog to reasonably show, so that also needs addressing under this bug. I will defer to Belen for an explanation of how to properly handle long messages.
Comment 3 Cristian Iorga 2012-09-13 11:00:13 UTC
Investigation started.
Comment 4 Paul Eggleton 2012-09-14 12:53:34 UTC
I've changed the relationship between this and bug #2960 since this is the wider one.
Comment 5 Cristian Iorga 2012-09-17 12:52:12 UTC
Hi Belen,

Can you please propose a visual implementation of errors reporting.
I will also try to come up with a proposal.

Thanks,
Cristian
Comment 6 Cristian Iorga 2012-09-17 12:53:50 UTC
UI proposal needed.
Comment 7 Belen Barros Pena 2012-09-18 14:50:23 UTC
Created attachment 812 [details]
error reporting design proposal

attached a suggestion on how to handle those big, long error messages. Let me know what you think.

Belen
Comment 8 Belen Barros Pena 2012-09-19 13:16:21 UTC
Created attachment 817 [details]
error reporting design proposal

Design updated after discussions with Cristian I. and Paul E. Thanks for the feedback.
Comment 9 Cristian Iorga 2012-09-19 14:33:57 UTC
This is partially fixed.
Error messages are now displayed, but not in a right manner.

Implementation will be done according to Belen's design proposal.
This dialogs will also need to be modal, which is not the case now.
This easily leads to Hob issues.
This will also be implemented in the fix.

ETA: Tuesday, 09/25/2012.

Regards,
Cristian
Comment 10 Cristian Iorga 2012-09-28 15:10:01 UTC
Patch submitted for review.
Comment 11 Alexandru Damian 2012-09-28 16:00:57 UTC
Patch merged in master.
Comment 12 Belen Barros Pena 2012-10-01 14:13:31 UTC
This is looking good. The only problem is the horizontal scrolling: if we are using line wrapping we should not need it. Could we fit line width into the width of the text view and get rid of the horizontal scroll bar? We could increase the width of the alert if needed.

Thanks!
Comment 13 Cristian Iorga 2012-10-02 09:09:15 UTC
Hello Belen,

Can you please add a screenshot with the current issue and propose a fix?

With the errors that I inject into bitbake and are reflected in Hob, I don't see a horizontal scrollbar appearing during error reports.

Regards,
Cristian
Comment 14 Belen Barros Pena 2012-10-02 12:00:12 UTC
Created attachment 863 [details]
very-long-error.png

Screenshot attached. This is how to make it appear:

1: in the last master branch, revert commit 4cacbf1861e76067eae35031b09cf3fbc35929f (git revert 34cacbf1861e76067eae35031b09cf3fbc35929f)

2: clone meta-ti layer (git://git.yoctoproject.org/meta-ti)

3: add the meta-ti layer to Hob using the Layers dialog

4: in the Settings dialog, choose the Others tab and add the variable BBMASK with value meta-ti/recipes-misc

5: in the Image configuration screen, select 'beaglebone' as your machine

An error should come up (as shown in attached screenshot)

I am using Fedora 17

I hope this helps
Comment 15 Belen Barros Pena 2012-10-02 12:03:42 UTC
I've also noticed that the alert window that displays the error message is resizable (although resizing the window does not have any effect on the scrolling bars). 

Note that, according to the Gnome HIG, alert windows should not be resizable: "Alert windows are not resizable. If the user needs to resize your alert, the text is probably not concise enough."

http://developer.gnome.org/hig-book/3.5/windows-alert.html.en
Comment 16 Belen Barros Pena 2012-10-02 14:40:38 UTC
After a chat with Cristian, there is a patch on the way. Horizontal scrollbars will still appear if there is a string too long to display in the default text view width. If you increase the size of the alert window to fit the string, the scrollbar will go away.

According to the Gnome HIG alert windows should not resize. In this case, however, being able to resize the window can improve legibility, so we agreed to leave it as is.
Comment 17 Cristian Iorga 2012-10-02 14:47:18 UTC
Patch submitted for review.
Comment 18 Cristian Iorga 2012-10-03 06:40:13 UTC
Fixed.
Comment 19 Belen Barros Pena 2012-10-03 11:26:45 UTC
verified