MOZ_DUMP_PAINT_TO_FILE does not work on B2G phone

RESOLVED WONTFIX

Status

Firefox OS
General
RESOLVED WONTFIX
6 years ago
2 months ago

People

(Reporter: bjacob, Assigned: gal)

Tracking

unspecified
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:-)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Reason unclear. I tried prepending the filenames with "/data/local/tmp" so that they would go into that directory where we have write permissions, but no file gets created there.

Fixing this should be useful to help debugging rendering bugs such as bug 790764, bug 790723.
(Reporter)

Comment 1

6 years ago
Here is what I tried, and didn't work:

bjacob:/hack/b2g/B2G/gecko$ git diff layout
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index 64f8666..a69d3e6 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1814,7 +1814,11 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIF
 #ifdef MOZ_DUMP_PAINTING
   if (gfxUtils::sDumpPaintList || gfxUtils::sDumpPainting) {
     if (gfxUtils::sDumpPaintingToFile) {
-      nsCString string("dump-");
+      nsCString string;
+#ifdef MOZ_WIDGET_GONK
+      string.Append("/data/local/tmp");
+#endif
+      string.Append("dump-");
       string.AppendInt(gPaintCount);
       string.Append(".html");
       gfxUtils::sDumpPaintFile = fopen(string.BeginReading(), "w");
I ran into the same problem quite some time ago (bug 737319). I looked into a bit and I think it all gets screwed up due to OMTC. My recollection of the problem that the dump file gets opened/closed on one thread, but the writing of the data into the file descriptor happens on another thread, after the dump file has been closed.
(Reporter)

Comment 3

6 years ago
(In reply to Benoit Jacob [:bjacob] from comment #1)
> +      string.Append("/data/local/tmp");

I was missing a trailing / here, but it still doesn't work with it.

Updated

6 years ago
blocking-basecamp: --- → ?
This is not a user visible feature.
blocking-basecamp: ? → -
(Assignee)

Comment 5

6 years ago
Created attachment 682861 [details] [diff] [review]
patch
Assignee: nobody → gal
(Assignee)

Comment 6

6 years ago
Created attachment 682862 [details] [diff] [review]
patch
Attachment #682861 - Attachment is obsolete: true
(Assignee)

Comment 7

6 years ago
Created attachment 682863 [details] [diff] [review]
patch
Attachment #682862 - Attachment is obsolete: true

Comment 8

2 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.