Bug #891


View Source crashes if the source file is large.

Added by राही अखेराजोत 7 months ago. Updated 5 months ago.

Start date:
Due date:
% Done:


Estimated time:


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.


Untitled.txt (7.72 KB) Untitled.txt logcat when browser crashed while viewing source of a youtube video on * राही अखेराजोत, 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 7 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, 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 7 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 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 राही अखेराजोत 7 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

Actions #5

Updated by Soren Stoutner 7 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 राही अखेराजोत 5 months 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).


Also available in: Atom PDF