Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Chromium crashes while trying to save a page. #147

Closed
kalyankondapally opened this issue Nov 29, 2013 · 20 comments
Closed

Chromium crashes while trying to save a page. #147

kalyankondapally opened this issue Nov 29, 2013 · 20 comments
Assignees
Milestone

Comments

@kalyankondapally
Copy link
Contributor

open Chromium and click right-button in the content window and then "Save As" to crash. 100% reproducible.

Steps:
1)Launch chrome with ./out/Debug/chrome --no-sandbox
2)Right click to open context menu
3)Select Save As option

Expected result:
Opens a Dialog box and one is able to save the page.

Actual result:
Chrome crashes.

Dependency: None.
Blocks: None.
SubTasks: None.
Works on Chromium-X11: Yes.

@kalyankondapally
Copy link
Contributor Author

bt:

#0 0x00007ffff340a425 in __GI_raise (sig=)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff340db8b in __GI_abort () at abort.c:91
#2 0x00007ffff34030ee in assert_fail_base (fmt=,
assertion=0x55555c9ca060 "ptr
!= null",
file=0x55555c9ca040 "../../base/memory/ref_counted.h", line=,
function=) at assert.c:94
#3 0x00007ffff3403192 in GI___assert_fail (
assertion=0x55555c9ca060 "ptr
!= null",
file=0x55555c9ca040 "../../base/memory/ref_counted.h", line=260,
function=0x55555c9ca220 "T* scoped_refptr::operator->() const [with T = ui::SelectFileDialog]") at assert.c:103
#4 0x00005555569982e5 in scoped_refptrui::SelectFileDialog::operator-> (
this=0x23b6559b5e48) at ../../base/memory/ref_counted.h:260
#5 0x00005555569b4535 in SavePackageFilePicker::SavePackageFilePicker (
this=0x23b6559b5e20, web_contents=0x23b6515de020, suggested_path=...,
default_extension=..., can_save_as_complete=true, download_prefs=0x23b653fe09c0,
callback=...) at ../../chrome/browser/download/save_package_file_picker.cc:214
#6 0x000055555698fcea in ChromeDownloadManagerDelegate::ChooseSavePath(content::WebContents
, base::FilePath const&, std::string const&, bool, base::Callback<void (base::FilePath const&, content::SavePageType, base::Callback<void (content::DownloadItem
)> const&)> const&) (this=0x23b65445dc80, web_contents=0x23b6515de020,
suggested_path=..., default_extension=..., can_save_as_complete=true,
---Type to continue, or q to quit---
callback=...)
at ../../chrome/browser/download/chrome_download_manager_delegate.cc:409
#7 0x000055555a3e84ec in content::SavePackage::ContinueGetSaveInfo (
this=0x23b654458d60, suggested_path=..., can_save_as_complete=true)
at ../../content/browser/download/save_package.cc:1403
#8 0x000055555a3f2faa in base::internal::RunnableAdapter<void (content::SavePackage::)(base::FilePath const&, bool)>::Run (this=0x7fffffffca60, object=0x23b654458d60,
a1=..., a2=@0x23b6529eb670: true) at ../../base/bind_internal.h:248
#9 0x000055555a3f0f2f in base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (content::SavePackage::
)(base::FilePath const&, bool)>, void (content::SavePackage* const&, base::FilePath const&, bool const&)>::MakeItSo(base::internal::RunnableAdapter<void (content::SavePackage::)(base::FilePath const&, bool)>, content::SavePackage* const&, base::FilePath const&, bool const&) (runnable=...,
a1=@0x23b6529eb660: 0x23b654458d60, a2=..., a3=@0x23b6529eb670: true)
at ../../base/bind_internal.h:927
#10 0x000055555a3ef434 in base::internal::Invoker<3, base::internal::BindState<base::internal::RunnableAdapter<void (content::SavePackage::
)(base::FilePath const&, bool)>, void (content::SavePackage
, base::FilePath const&, bool), void (content::SavePackage, base::FilePath, bool)>, void (content::SavePackage, base::FilePath const&, bool)>::Run(base::internal::BindStateBase) (base=0x23b6529eb640)
at ../../base/bind_internal.h:1383
#11 0x0000555555fddd39 in base::Callback<void ()>::Run() const (this=0x7fffffffcde8)
at ../../base/callback.h:396
---Type to continue, or q to quit---
#12 0x0000555556ccf76e in base::MessageLoop::RunTask (this=0x7ffff7effc60,
pending_task=...) at ../../base/message_loop/message_loop.cc:511
#13 0x0000555556ccf892 in base::MessageLoop::DeferOrRunPendingTask (
this=0x7ffff7effc60, pending_task=...)
at ../../base/message_loop/message_loop.cc:523
#14 0x0000555556ccfdb7 in base::MessageLoop::DoWork (this=0x7ffff7effc60)
at ../../base/message_loop/message_loop.cc:637
#15 0x0000555556c7512b in base::MessagePumpLibevent::Run (this=0x7ffff7eddda0,
delegate=0x7ffff7effc60) at ../../base/message_loop/message_pump_libevent.cc:232
#16 0x0000555556ccf2e3 in base::MessageLoop::RunInternal (this=0x7ffff7effc60)
at ../../base/message_loop/message_loop.cc:461
#17 0x0000555556ccf19c in base::MessageLoop::RunHandler (this=0x7ffff7effc60)
at ../../base/message_loop/message_loop.cc:433
#18 0x0000555556d01190 in base::RunLoop::Run (this=0x7fffffffd3f0)
at ../../base/run_loop.cc:47
#19 0x000055555660d60b in ChromeBrowserMainParts::MainMessageLoopRun (
this=0x7ffff7eddc80, result_code=0x7ffff7efcb78)
at ../../chrome/browser/chrome_browser_main.cc:1653
#20 0x000055555a355e24 in content::BrowserMainLoop::RunMainMessageLoopParts (
this=0x7ffff7efcb60) at ../../content/browser/browser_main_loop.cc:726
#21 0x000055555a35c722 in content::BrowserMainRunnerImpl::Run (this=0x7ffff7ef80e0)
at ../../content/browser/browser_main_runner.cc:122
#22 0x000055555a35217f in content::BrowserMain (parameters=...)
---Type to continue, or q to quit---
at ../../content/browser/browser_main.cc:26
#23 0x0000555556c6824e in content::RunNamedProcessTypeMain (process_type=...,
main_function_params=..., delegate=0x7fffffffddf0)
at ../../content/app/content_main_runner.cc:472
#24 0x0000555556c6922c in content::ContentMainRunnerImpl::Run (this=0x7ffff7ed4fa0)
at ../../content/app/content_main_runner.cc:791
#25 0x0000555556c676d3 in content::ContentMain (argc=3, argv=0x7fffffffdf48,
delegate=0x7fffffffddf0) at ../../content/app/content_main.cc:35
26 0x0000555555e8f611 in ChromeMain (argc=3, argv=0x7fffffffdf48)
at ../../chrome/app/chrome_main.cc:39
#27 0x0000555555e8f5dc in main (argc=3, argv=0x7fffffffdf48)
at ../../chrome/app/chrome_exe_main_aura.cc:17

@joone
Copy link
Contributor

joone commented Feb 24, 2014

We need to implement a file picker for this.
Here is the bug: https://crosswalk-project.org/jira/browse/XWALK-950

@baleboy
Copy link

baleboy commented Mar 13, 2014

Any estimate of when this could be implemented?

@tiagovignatti
Copy link
Contributor

@baleboy I'll take a look on it now and I'll come back to you then.

@tiagovignatti
Copy link
Contributor

alright, this is not so simple as I thought.

At the moment Linux Aura-X11 still relies on GTK+ for theme integration and a few other things like the File Dialog:
https://code.google.com/p/chromium/issues/detail?id=130810

that said, Linux Aura-X11 should port most of these GTK+ dialogs to use Views/Aura only, getting rid of GTK+ dep and thus Linux Aura-Ozone would take advantage of that as well. More specifically to solves our particular issue we need to implement ui::SelectFileDialog for Aura only (see also ui::LinuxShellDialog).

Nevertheless, all the File Dialog logic happens inside chrome/ (i.e. meant for the browser and Ash only) but possibly could be moved to content/ so say Content Shell and Crosswalk could benefit as well. This has to be definitely discussed with Chromium developers though.

@kalyankondapally
Copy link
Contributor Author

Sorry missed this conversation. Ya, so this is something we have been discussing for a while. @joone had some ideas of helping upstream to push this forward. If I remember right their is no plan to port the dialogs to use views/aura but rather move to gtk3. This will take some time as gtk3 is not compatible with gtk2.

@kalyankondapally kalyankondapally modified the milestones: Summer, Easter Mar 23, 2014
@tiagovignatti
Copy link
Contributor

@kalyankondapally we'll be working together with @alexshalamov actually to solve this -- let's talk about that on IRC later...

@joone
Copy link
Contributor

joone commented Apr 25, 2014

Here is a patch: joone@2b6d4ec

This patch allows to show a demo WebUI that has just an input box and buttons for testing. We can implement a File Picker using HTML, CSS, and JS based on this patch, but Chromium OS seems to implement the File Picker UI using Aura so we could reuse it.

@joone
Copy link
Contributor

joone commented Apr 26, 2014

photo apr 25 4 49 12 pm

File Picker using WebUI

@joone
Copy link
Contributor

joone commented Apr 26, 2014

file_picker_chromiumos

File Save UI in Chromium OS

@tiagovignatti
Copy link
Contributor

Nice one @joone! The WebUI one is an interesting approach but before finishing that we'd need to understand whether upstream will want something that or instead use the Chromium OS for all Aura-based solutions. I think they prefer to go with the latter.

@joone
Copy link
Contributor

joone commented Apr 29, 2014

@tiagovignatti I think so. I will try to use the Aura based solutions, but I'm not sure if all the code related to file-picker could be moved to content/

@joone
Copy link
Contributor

joone commented May 2, 2014

I tried to move the file-picker of ChromeOS to Chrome Browser.
joone@de3391a
The file-picker UI can be shown like ChromeOS, but it is not drawn completely because I didn't add ChromeOS drive and file system features. In addition, we need to add more ChromeOS features like the volume manager, video manager, disk mount manager, mounted disk monitor, and zip file creator, but these features may be dependent on other ChromeOS features.

It is more complicated to run the file-picker of ChromiumOS in Ozone-wayland than I thought.

@joone
Copy link
Contributor

joone commented May 2, 2014

Here is a screen shot.
2014-04-30 16 07 40

@tiagovignatti
Copy link
Contributor

yup, it's indeed complicated but note that it'd be benefiting all Ozone implementations. Can the browser and ChromeOS code be shared instead? I see that you're adding code but maybe you could just have a common code for both targets.

My suggestions is that you should show already the WIP to the upstream developers and ask their opinion -- it can be done right now because the work is getting quite big and it gives the whole idea of the task. As I said previously, you can point out the following bug as reference: https://code.google.com/p/chromium/issues/detail?id=130810

overall, this work is looking good! I appreciate your efforts @joone.

@joone
Copy link
Contributor

joone commented May 6, 2014

I created an issue: https://code.google.com/p/chromium/issues/detail?id=370493

Thanks!

@baleboy
Copy link

baleboy commented May 12, 2014

Are we going to see this landing in Crosswalk anytime soon?

@joone
Copy link
Contributor

joone commented May 22, 2014

@baleboy I think that Crosswalk can't use the file manager of ChromeOS because it is designed for accessing Google Drive and it seems no local file system APIs. Therefore, I am going to use WebUI for Crosswalk, but it needs to access Tizen FileSystem API.

For Ozone-Wayland, we need to create private JS APIs for dealing with the local file system that can be used in the WebUI.

First, I will apply the WebUI to Crosswalk and then see if Tizen FileSystem API works.

@joone
Copy link
Contributor

joone commented Jun 24, 2014

Here is a patch: joone@963cf6b

This is ozone-wayland part of file-picker implementation.

@kalyankondapally
Copy link
Contributor Author

We have initial support for dialogs and we dont crash. So, closing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants