Skip to main content
Topic: Need debugging tips (search hangs) (Read 3871 times)

Need debugging tips (search hangs)

Hopefully I'm in the right place to get help  :yes:

OBJECTIVE
So I'm trying to get otter-browser working on this thing:
http://b2b.gigabyte.com/products/product-page.aspx?pid=5269#ov

ISSUE
I built Otter Browser from a different computer and copied it, as well as the dependencies over to the target. After a while, I was able to get Otter Browser to run on the Linux framebuffer. Mouse, keyboard and widgets are working. The problem is, typing anything into any search box and pressing enter causes the browser to lock up. In fact, I don't even need to type any text: the cursor is blinking in the search box so if I just press enter, the browser, keyboard and mouse lock up. I have to kill bash from ssh to regain control.

I suspect the browser is actually not locking up but crashes/terminates.

INVESTIGATION DONE SO FAR
I set "export QML_IMPORT_TRACE=1" and "export QT_DEBUG_PLUGINS=1" and run the app like this:
Code: [Select]

strace ./otter-browser -platform linuxfb  -plugin EvdevKeyboard:/dev/input/event0 -plugin evdevmouse > otter-running.txt 2>&1


After running the browser and before triggering the problem, I added the line, "------------- okay up to here ----------------". There isn't really anything after that except:
Code: [Select]

Process 3606 detached
<detached ...>


FINALLY, MY QUESTION
It's likely I failed to add a needed dependency though, I'm not sure what it could be. What can I do to figure out what the problem is? Are there other ways to debug Otter Browser while running on the Linux framebuffer?

Sincere thanks and fantastic Qt5 work!

Re: Need debugging tips (search hangs)

Reply #1
I should have tried this sooner but good news (sort of): I ran Otter Browser on the same computer I built it on and it demonstrates the same problem. I'll do "make package", install the rpm and test it. Unfortunately, I have to reboot to regain control.

And...
No difference - same. Is this a known issue? I doubt I'm the only one to see this problem. So basically, I ran Otter Browser on Fedora 20 on amd64 (on the framebuffer), using Qt 5.5 and pressing enter locks up the browser.

I'll look for a pre-built version and try that.

Re: Need debugging tips (search hangs)

Reply #2
Running on the framebuffer? Heh, impressive. I'm afraid I have nothing useful to say about that though.

Re: Need debugging tips (search hangs)

Reply #3
Hey, a real human! Well, I was looking for a browser that was known to work on the framebuffer and Otter was recommended to me on #qt.

Since it appears to be mostly working, I can continue debugging. Though, is Otter intended to work on the framebuffer?

Thanks!

Re: Need debugging tips (search hangs)

Reply #4
Though, is Otter intended to work on the framebuffer?

I doubt there is any kind of regular testing done against it, but I'm sure it's not broken on purpose. This topic seems sufficiently niche that perhaps it's best to ask about it on the #otter-browser IRC channel? (And as the administrator of this forum that's not something I like to say. :P)

Re: Need debugging tips (search hangs)

Reply #5
Hi,
just some (possibly irrelevant) remarks as I only rarely use Linux;
- can you perform a search from the adressbar using the shortcut? - e.g.:
g otterbrowser
for Google search on otterbrowser (I believe the shortcuts are predefined for the "built-in" search providers; they are shown in the search combo too.
- does the search widget in the startpage (speed dial in opera) work, or is it the same like the search combo above?
It might be useful to find out, whether the problem arises from the searching functionality or from some features of the respective widget settings.
(Just in case the debugging isn't successful, you can always remove the search widget from the toolbar in order to prevent typing to it accidentally, but this is obviously no real solution...)
regards,
   vbr

Re: Need debugging tips (search hangs)

Reply #6
just some (possibly irrelevant) remarks as I only rarely use Linux

It has little to do with "regular" Linux use; the framebuffer stuff is mostly for embedded systems. I tried this myself and apparently the regular Ctrl + Alt + FX tty-switching is blocked. I ssh-ed in to reboot.

Re: Need debugging tips (search hangs)

Reply #7
I did ask on the irc channel and didn't get a response within the time that I was there. That's okay though; I don't mind documenting my findings here - it could be valuable.

It's true, shortcut keys won't work. Yes, if the browser doesn't exit cleanly, you have to reboot. Those aren't big problems because the intention is for a customer who is making a kiosk. So, it's good there is nothing else they can do.

My superior reviewed Otter Browser and said it will be fine for the customer as long as performance is comparable to other browsers. So I'm okay to continue working on this. One issue we found was with a javascript pop up did not go away when hovering or clicking off. I think that's a minor bug and don't want to distract from the bigger issue at hand atm.

Quote
can you perform a search from the adressbar using the shortcut?


Good question. I'll test that and post the result with some screenshots, tomorrow.

Thanks!  :cheers:

Re: Need debugging tips (search hangs)

Reply #8
@jawicks, which Qt version are you using?
DuckDuckGo (which is default one) caused crashes with older Qt version (probably it was 5.4.0 or another one from 5.4.x).

BTW, we have special minimal test case for checking if issue is specific to QtWebKit:
https://github.com/OtterBrowser/test-qtwebkit
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.

Re: Need debugging tips (search hangs)

Reply #9
Been busy but getting some time to work on this again - better late than never I guess.

Image 1: Starting Otter Browser. I do have to set "export QT_PLUGIN_PATH=/usr/lib/qt5/plugins":


Image 2: Trying to search with shortcut per question, "can you perform a search from the adressbar using the shortcut?". The browser comes up without any problem. Widgets seem to be working without any problem. I input "g hello" into the addressbar and get the lockup (mouse and keyboard are unresponsive)  as soon as I press enter:

When Otter Browser is running under X (normally) "g hello" works as expected.

Note: For this testing, I have an ssh session open to the target and have to kill the bash session to regain control. It beats rebooting.

Continuing write up in new message so I can post another image...

Re: Need debugging tips (search hangs)

Reply #10
Image 3: There are two things happening in this image:

  • I clicked on "File -> Open" and clicked on a text file to open it. You can see in the image, the file opened, no problem (please excuse the low quality as I had to reduce it to meet the size limit).

  • Again, I clicked on "File -> Open" and typed the file name into the "File Name" box. Though this time, instead of clicking "Open", I pressed enter, which reproduces the problem! Killing bash and resuming troubleshooting...




One more test ~ this time, I try to save the file I opened using "File -> Save". Again, pressing enter reproduces the problem!

@Emdek, I am using Qt 5.5.0. I'll now try the special minimal test case you mentioned...

Re: Need debugging tips (search hangs)

Reply #11
Guess what? I tried the minimal test case, "test-qtwebkit" and it demonstrates the problem! Wow, now what to do?

Update: Not sure why I didn't try this sooner but, every Qt5 example I made from Qt Creator has this problem. So it's looking very much like this isn't a problem with Otter Browser. Though, it's an ugly thing when the enter key causes Qt to barf.

The upside is, I can use a smaller testcase to debug the issue. Creating testcase now.

Re: Need debugging tips (search hangs)

Reply #12
So I took the time to make a tiny testcase and stumbled on this, "export QT_QPA_ENABLE_TERMINAL_KEYBOARD=1" from here http://doc.qt.io/qt-5/embedded-linux.html and guess what happened? The computer caught on fire! JK... it worked!!  :hat:  :cheers:  :hat:

I'm not totally sure the ins and outs of it yet but this is great! Here's a screenshot of Otter Browser working on the Linux framebuffer using two displays:

Re: Need debugging tips (search hangs)

Reply #13
That's neat! What's rendering/scrolling performance like, btw?

Re: Need debugging tips (search hangs)

Reply #14
@jawicks, congratulations. :-)

I wonder what is the reason to require such option in first place.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.

Re: Need debugging tips (search hangs)

Reply #15
I don't really understand what that option does yet. I can say performance is awesome - it's really responsive.