Project

General

Profile

Actions

Bug #891

open

View Source crashes if the source file is large.

Added by राही अखेराजोत 3 months ago. Updated about 1 month ago.

Status:
New
Priority:
3.x
Start date:
08/20/2022
Due date:
% Done:

0%

Estimated time:

Description

Please provide a feature to search text in View Source page.

Also Privacy Browser crashes while Viewing Source when source file is large, please address this issue.


Files

Untitled.txt (7.72 KB) Untitled.txt logcat when browser crashed while viewing source of a youtube video on *.googlevideo.com राही अखेराजोत, 08/29/2022 08:18 PM
Screenshot_20220905-172758_HttpCanary.jpg (703 KB) Screenshot_20220905-172758_HttpCanary.jpg राही अखेराजोत, 09/05/2022 05:01 AM
Screenshot_20220905-173553_Dev Tools.jpg (832 KB) Screenshot_20220905-173553_Dev Tools.jpg राही अखेराजोत, 09/05/2022 05:06 AM
Actions #1

Updated by Soren Stoutner 3 months ago

  • Tracker changed from Feature to Bug
  • Subject changed from Search text in View Source to View Source crashes if the source file is large.
  • Status changed from New to Feedback

Please file a separate issue for each item. Combining them makes it difficult to tell when each one is resolved.

As providing a search functionality is a duplicate of https://redmine.stoutner.com/issues/380, I will address the crashing aspect of your report. Please attach a logcat showing the details of the crash.

Actions #3

Updated by Soren Stoutner 3 months ago

  • Status changed from Feedback to New
  • Assignee set to Soren Stoutner

As you can see from the logcat, the problem is that the app is running out of memory. I am a little surprised as I don't think I have every seen Privacy Browser use that much memory (you can check at any time in About > Version). However, as this bug report is about really large files, I suppose that makes sense.

There is a plan in https://redmine.stoutner.com/issues/380 to render the source inside of a WebView instead of in a TextView. Doing so might solve the problem as WebViews have the ability to only render part of their content in RAM if resources are scarce, whereas I believe TextViews must render their entire contents in RAM.

Do you have a sample URL that can be used for testing to see if the problem is fixed? I will leave this bug report open and look at it more closely if the switch to WebView doesn't solve the problem.

Updated by राही अखेराजोत 3 months ago

You can look at Http Canary app, it shows a safe length of source in the textview and after that - "The data is too large to display all..."

Sample URL
https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4

Actions #5

Updated by Soren Stoutner 3 months ago

I would probably prefer to go the route of finding something that can display all the source, like the proposed WebView solution linked to above, rather than not displaying all the source. Especially because most modern Android devices have plenty of RAM and can display any source I have thrown at them, so truncating the source would be a step backwards in most cases.

Actions #6

Updated by राही अखेराजोत about 1 month ago

render the source inside of a WebView instead of in a TextView

Opening view source in a new tab will be very useful. Also searching is already implemented for tabs (Find on Page).

Actions

Also available in: Atom PDF