Closed Bug 1651255 Opened 4 years ago Closed 1 year ago

A memory dump is not loaded into the profiler if the dump file name contains Russian characters in the name

Categories

(DevTools :: Memory, defect, P3)

78 Branch
x86_64
Windows 7
defect

Tracking

(firefox78 wontfix, firefox79 wontfix, firefox80 wontfix, firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox78 --- wontfix
firefox79 --- wontfix
firefox80 --- wontfix
firefox111 --- fixed

People

(Reporter: ex-er-sis, Assigned: julienw)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(3 files, 3 obsolete files)

Attached image Error.png

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

I just save the "map snapshot" from the profiler (devtools) to disk and set the file name, with Russian characters, for example:
"Снимок памяти Click.ru 08.06.2020 (Firefox dump).fxsnapshot"
Then I try to import this file into the profiler.

Actual results:

Profiler stop with error (look screenshot)

Expected results:

A map snapshot should be displayed, which is obvious.

If I just rename this file, removing Russian characters - everything is correctly displayed.

OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Attached image error.PNG

Hi,

Thanks for the details. I've tested this on windows 10 pro, 80.0a1 (2020-07-13) (64-bit), Release 78.0 (64-bit and Beta 79.0b5 (64-bit) and was able to reproduce.

I will move this over to a component so developers can take a look over it. If is not the correct component please feel free to change it to an appropriate one. I will also adjust flags accordingly.

Thanks for the report.

Best regards, Clara.

Status: UNCONFIRMED → NEW
Component: Untriaged → Memory
Ever confirmed: true
Product: Firefox → DevTools

I can reproduce also using french accents. Strangely lt looks like this code doesn't like UTF-8 characters in filenames.

From a quick glance at the code, I'd try to look at this piece of code [1] first, if anybody wants to look at this. The path is passed through all the way from [2], where it's selected by the user.

[1] https://searchfox.org/mozilla-central/rev/cf561cece0ca9aeaf0202e68699836d957d0c670/devtools/shared/heapsnapshot/HeapSnapshot.cpp#1534-1557
[2] https://searchfox.org/mozilla-central/rev/cf561cece0ca9aeaf0202e68699836d957d0c670/devtools/client/memory/actions/io.js#65-79

Severity: -- → S3
Priority: -- → P3
Assignee: nobody → felash

The old code was using non-UTF-8 C strings. This patch updates this to
use UTF-8 strings to handle paths.

Attachment #9166323 - Attachment is obsolete: true
Attachment #9166324 - Attachment description: Bug 1651255 - Support UTF-8 paths when importing devtools memory snapshots r=jimb! → Bug 1651255 - Support Unicode paths when importing devtools memory snapshots r=jimb!
Attachment #9166542 - Attachment description: Bug 1651255 - Run clang-format and some memory devtool cpp files r=jimb! → Bug 1651255 - Run clang-format on some memory devtool cpp files r=jimb!
Attachment #9166542 - Attachment is obsolete: true

As a quick note, I got the problem today with a french Firefox, and it's quite easy to trigger:

  1. save a captured memory snapshot => this will save in the directory called "Téléchargements"
  2. try to import it => we hit the problem, because the directory has these letters with accents.

I'll try to land this soon.

Attachment #9166324 - Attachment description: Bug 1651255 - Support Unicode paths when importing devtools memory snapshots r=jimb! → WIP: Bug 1651255 - Support Unicode paths when importing devtools memory snapshots r=jimb!
Attachment #9166547 - Attachment is obsolete: true
Attachment #9166324 - Attachment description: WIP: Bug 1651255 - Support Unicode paths when importing devtools memory snapshots r=jimb! → Bug 1651255 - Support Unicode paths when importing devtools memory snapshots r=jimb!
Pushed by jwajsberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1ac3ae2903aa
Support Unicode paths when importing devtools memory snapshots r=jimb
Keywords: dev-doc-needed
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
QA Whiteboard: [qa-111b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: