public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][runtime]: Download feature in runtime
8+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][runtime]: Download feature in runtime
@ 2016-06-30 09:42 Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Neel Patel @ 2016-06-30 09:42 UTC (permalink / raw)
  To: pgadmin-hackers

Hi,

Please find attached patch file for initial version of download file in
runtime application.

With this patch, we have implemented two features.

*Feature 1 :- Normal "Download file" from runtime application*

Previously "Download file" was not implemented in runtime application.
With this patch file, we have handled Qt signal for download file properly.

*Feature 2 :-   "download" attribute support for 'a' tag for client side
download*

As per our knowledge, webkit has not implemented the download attribute at
'a' tag.
Currently it shows under development from below link.

https://bugreports.qt.io/browse/QTBUG-47732

We did not found any signal in Qt for download attribute feature but to
implement this feature in runtime application, we added one workaround to
make it work with download CSV file.

When we click on download buttons, we are getting Qt signal
"urlLinkClicked" and in that url we are finding "data:text/csv" from
encoded URL generated from sqleditor. Once we found that tag then we are
decoding the csv data and writing to file.

Is that right approach ? Should we add our own custom mime-type to header ?
Let us know your thoughts on this feature.


Please review it and let us know comments.

Thanks,
Neel Patel


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] download_runtime.patch (12.1K, 3-download_runtime.patch)
  download | inline diff:
diff --git a/runtime/BrowserWindow.cpp b/runtime/BrowserWindow.cpp
index 5419c0e..d33b515 100644
--- a/runtime/BrowserWindow.cpp
+++ b/runtime/BrowserWindow.cpp
@@ -23,7 +23,6 @@
 #include <QInputDialog>
 #include <QLineEdit>
 #endif
-
 // App headers
 #include "BrowserWindow.h"
 #include "ConfigWindow.h"
@@ -42,6 +41,12 @@ BrowserWindow::BrowserWindow(QString url)
     m_widget = NULL;
     m_toolBtnBack = NULL;
     m_toolBtnForward = NULL;
+    downloadStarted = 0;
+    is_download_canceled = 0;
+    m_file = NULL;
+    downloadedFileName = "";
+    defaultFileName = "";
+    progressDlg = NULL;
 
     m_appServerUrl = url;
 
@@ -83,6 +88,11 @@ BrowserWindow::BrowserWindow(QString url)
     // Register the slot on tab index change
     connect(m_tabWidget,SIGNAL(currentChanged(int )),this,SLOT(tabIndexChanged(int )));
 
+    // Listen for the download file request from the web page
+    m_mainWebView->page()->setForwardUnsupportedContent(true);
+    connect(m_mainWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+    connect(m_mainWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
     m_mainWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
 
     // Restore the geometry
@@ -199,6 +209,191 @@ int BrowserWindow::findURLTab(const QUrl &name)
     return 0;
 }
 
+// This slot will be called when user right click the download link and select "Save Link..."
+void BrowserWindow::download(const QNetworkRequest &request)
+{
+    if (downloadStarted)
+    {
+        //Inform the user that one download already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress - %1").arg(defaultFileName));
+        return;
+    }
+
+    defaultFileName = QFileInfo(request.url().toString()).fileName();
+    QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), defaultFileName);
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        downloadedFileName = fileName;
+
+        QNetworkRequest newRequest = request;
+        newRequest.setAttribute(QNetworkRequest::User, fileName);
+
+        QObject *obj_web_page = QObject::sender();
+        if (obj_web_page != NULL)
+        {
+            QWebPage *sender_web_page = dynamic_cast<QWebPage*>(obj_web_page);
+            if (sender_web_page != NULL)
+            {
+                QNetworkAccessManager *networkManager = sender_web_page->networkAccessManager();
+                QNetworkReply *reply = networkManager->get(newRequest);
+                if (reply != NULL)
+                {
+                    downloadStarted = 1;
+                    is_download_canceled = 0;
+                    // Connect the signal for downloadprogress and downloadFinished for file download
+                    connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)) );
+                    connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+                }
+            }
+        }
+    }
+}
+
+//This slot will called in chunk and give the progress for the file download
+void BrowserWindow::downloadFileProgress(qint64 readData, qint64 totalData)
+{
+    QNetworkReply *reply = ((QNetworkReply*)sender());
+    QNetworkRequest request = reply->request();
+    QVariant v = request.attribute(QNetworkRequest::User);
+
+    // Is download is canceled by the user then no action is taken, just return
+    if (is_download_canceled)
+        return;
+
+    if(reply != NULL && reply->error() != QNetworkReply::NoError)
+    {
+        qDebug() << "Network error occured during downloding " << defaultFileName << " file";
+        return;
+    }
+
+    // Download is not yet started so open the file first time.
+    if (!m_file)
+    {
+        m_file = new QFile(downloadedFileName);
+        if (!m_file->open(QIODevice::WriteOnly))
+        {
+            qDebug() << "Error opening file: " << downloadedFileName;
+            downloadedFileName.clear();
+            defaultFileName.clear();
+            downloadStarted = 0;
+            return;
+        }
+
+        // Start downaloding progress bar
+        progressDlg = new QProgressDialog (tr("Downloading file...%1 ").arg(defaultFileName), "Cancel", readData, totalData, this);
+        progressDlg->setWindowTitle("Download progress..");
+        progressDlg->setMinimumWidth(450);
+        progressDlg->setMinimumHeight(80);
+        progressDlg->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
+        QObject::connect(progressDlg, SIGNAL(canceled()), this, SLOT(progressCanceled()));
+        progressDlg->show();
+    }
+
+    if (m_file)
+    {
+        // Write the data to file
+        m_file->write(reply->read(readData));
+        progressDlg->setValue(readData);
+        // As read data and totalData difference is zero means downloading is finished
+        if ((totalData - readData) == 0)
+        {
+            if (progressDlg)
+            {
+                delete progressDlg;
+                progressDlg = NULL;
+            }
+
+            // Downloading complted so we need to display the message
+            // Inform user that downloading is completed
+            QMessageBox::information(this, tr("Download completed"), tr("%1 file downloaded successfully").arg(defaultFileName));
+            downloadedFileName.clear();
+            defaultFileName.clear();
+            downloadStarted = 0;
+            is_download_canceled = 0;
+            if (m_file)
+            {
+                delete m_file;
+                m_file = NULL;
+            }
+        }
+    }
+}
+
+//This slot will called when user cancel the downloading file which is in progress.
+void BrowserWindow::progressCanceled()
+{
+    is_download_canceled = 1;
+
+    if (progressDlg)
+    {
+        delete progressDlg;
+        progressDlg = NULL;
+    }
+
+    if (m_file)
+    {
+        delete m_file;
+        m_file = NULL;
+    }
+
+    downloadedFileName.clear();
+    defaultFileName.clear();
+    downloadStarted = 0;
+}
+
+// This slot will called when file downloading is finished
+void BrowserWindow::downloadFinished()
+{
+    if (progressDlg)
+    {
+        delete progressDlg;
+        progressDlg = NULL;
+    }
+
+    // Inform user that downloading is completed
+    if (downloadStarted)
+        QMessageBox::information(this, tr("Download completed"), tr("%1 file downloaded successfully").arg(defaultFileName));
+
+    downloadedFileName.clear();
+    defaultFileName.clear();
+    downloadStarted = 0;
+    is_download_canceled = 0;
+    if (m_file)
+    {
+        delete m_file;
+        m_file = NULL;
+    }
+}
+
+// This slot will be called when user directly click on any download file
+void BrowserWindow::unsupportedContent(QNetworkReply * reply)
+{
+    if (downloadStarted)
+    {
+        //Inform the user that one download already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress - %1").arg(defaultFileName));
+        return;
+    }
+
+    defaultFileName = QFileInfo(reply->url().toString()).fileName();
+    QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), defaultFileName);
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        downloadedFileName = fileName;
+        if (reply != NULL)
+        {
+            downloadStarted = 1;
+            is_download_canceled = 0;
+            connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)));
+            connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+        }
+    }
+}
+
 // Slot: When the tab index change, hide/show the toolbutton displayed on tab
 void BrowserWindow::tabIndexChanged(int index)
 {
@@ -343,6 +538,40 @@ void BrowserWindow::tabTitleChanged(const QString &str)
 // Slot: Link is open from pgAdmin mainwindow
 void BrowserWindow::urlLinkClicked(const QUrl &name)
 {
+    QString csv_data = QString::fromUtf8(name.toEncoded());
+
+    // Find the "data:text/csv" tag, get the decoded data from QUrl class and write to csv file.
+    if (csv_data.contains(QRegExp("^data:text\/csv")))
+    {
+        // Ask user where to save the csv file in filesystem.
+        QString filename = QFileDialog::getSaveFileName(this, tr("Save csv file"), QDir::currentPath(), tr("Files (*.csv)") );
+        if(!filename.isEmpty())
+        {
+            // Decode the encoded uri data
+            QString csvData = QUrl::fromPercentEncoding(name.toEncoded());
+            QStringList csvStrList = csvData.split(";");
+            QString extractString = "";
+            if (csvStrList.size() >= 3)
+                extractString = csvStrList.at(2);
+            QFile csvfile(filename);
+            if (!csvfile.open(QIODevice::WriteOnly | QIODevice::Text))
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while opening file %1").arg(filename));
+                return;
+            }
+            // Write the csv data to file
+	    qint64 data_return = csvfile.write(extractString.toUtf8().constData());
+            if (data_return == -1)
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while writing data to file %1").arg(filename));
+                csvfile.close();
+                return;
+            }
+            csvfile.close();
+        }
+        return;
+    }
+
     // First check is there any tab opened with same URL then open it again.
     int tabFound = findURLTab(name);
 
@@ -353,6 +582,11 @@ void BrowserWindow::urlLinkClicked(const QUrl &name)
         m_addNewGridLayout->setContentsMargins(0, 0, 0, 0);
         m_addNewWebView = new WebViewWindow(m_addNewTab);
 
+	// Listen for the download request from the web page
+	m_addNewWebView->page()->setForwardUnsupportedContent(true);
+        connect(m_addNewWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+        connect(m_addNewWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
         m_widget = new QWidget(m_addNewTab);
         m_toolBtnBack = new QToolButton(m_widget);
         m_toolBtnBack->setFixedHeight(PGA_BTN_SIZE);
diff --git a/runtime/BrowserWindow.h b/runtime/BrowserWindow.h
index 43f90fe..d0e4150 100644
--- a/runtime/BrowserWindow.h
+++ b/runtime/BrowserWindow.h
@@ -54,6 +54,11 @@ public slots:
     void tabIndexChanged(int index);
     void goBackPage();
     void goForwardPage();
+    void download(const QNetworkRequest &request);
+    void unsupportedContent(QNetworkReply * reply);
+    void downloadFinished();
+    void downloadFileProgress(qint64 , qint64 );
+    void progressCanceled();
 
 private:
     QString m_appServerUrl;
@@ -79,6 +84,12 @@ private:
 
     bool m_initialLoad;
     int m_loadAttempt;
+    QString downloadedFileName;
+    int downloadStarted;
+    int is_download_canceled;
+    QFile *m_file;
+    QProgressDialog *progressDlg;
+    QString defaultFileName;
 
     void createActions();
     void pause(int seconds = 1);
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index c2282a1..535b543 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -2571,7 +2571,7 @@ define(
                 keys = _.pluck(self.columns, 'name');
 
             // Fetch the items from fullCollection and convert it as csv format
-            var csv = labels.join(',') + '\n';
+            var csv = keys.join(',') + '\n';
             csv += coll.map(function(item) {
                 return _.map(keys, function(key) {
                   var cell = csv_col [key].cell,
@@ -2584,7 +2584,7 @@ define(
             }).join('\n');
 
             // Download the file.
-            var encodedUri = encodeURI('data:text/csv;charset=utf-8,' + csv),
+            var encodedUri = encodeURI('data:text/csv;charset=utf-8;' + csv),
                     link = document.createElement('a');
             link.setAttribute('href', encodedUri);
 


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
@ 2016-06-30 14:01 ` Dave Page <[email protected]>
  2016-07-01 04:43   ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Page @ 2016-06-30 14:01 UTC (permalink / raw)
  To: Neel Patel <[email protected]>; +Cc: pgadmin-hackers

Hi

On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
<[email protected]> wrote:
> Hi,
>
> Please find attached patch file for initial version of download file in
> runtime application.

I've attached an update with some improved messages, and setting the
progress dialogue to be modal (seeing as we cannot have multiple
downloads, and it's easy to lose the dialogue).

> With this patch, we have implemented two features.
>
> Feature 1 :- Normal "Download file" from runtime application
>
> Previously "Download file" was not implemented in runtime application.
> With this patch file, we have handled Qt signal for download file properly.

This seems to work fine. I did get one crash (after I cancelled a
download, then tried it again), but I couldn't reproduce that.

> Feature 2 :-   "download" attribute support for 'a' tag for client side
> download
>
> As per our knowledge, webkit has not implemented the download attribute at
> 'a' tag.
> Currently it shows under development from below link.
>
> https://bugreports.qt.io/browse/QTBUG-47732
>
> We did not found any signal in Qt for download attribute feature but to
> implement this feature in runtime application, we added one workaround to
> make it work with download CSV file.
>
> When we click on download buttons, we are getting Qt signal "urlLinkClicked"
> and in that url we are finding "data:text/csv" from encoded URL generated
> from sqleditor. Once we found that tag then we are decoding the csv data and
> writing to file.
>
> Is that right approach ? Should we add our own custom mime-type to header ?
> Let us know your thoughts on this feature.

This doesn't work so well, for a number of reasons:

1) QT Creator is complaining that your regexp contains an invalid
escape sequence (line 546).

2) The default file name seems to be the entire data blob. I would
suggest making the file name "download.csv" if we don't know anything
better. The "csv" part should be taken from the mime type (see below)

3) Should we handle all "data:" downloads in this way? Taking the file
type and default extension from the mimetype offered.

4) When I change the filename the data is properly saved, but then I
get a confirmation message that still has the full data blob as the
filename.

5) It somehow seems to have let me save files with forward slashes in
the name. See attachment.

6) I get all sorts of weird redrawing on the screen when downloading a
data blob. I suspect it's because the filename (which is still the
entire data blob) is shown on the progress dialogue.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [image/png] Screen Shot 2016-06-30 at 14.59.04.png (128.1K, 2-Screen%20Shot%202016-06-30%20at%2014.59.04.png)
  download | view image

  [application/octet-stream] download_runtime-dave.patch (12.5K, 3-download_runtime-dave.patch)
  download | inline diff:
Index: runtime/BrowserWindow.h
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- runtime/BrowserWindow.h	(revision d79524ff60a4645af798ce1e926210320de26a99)
+++ runtime/BrowserWindow.h	(revision )
@@ -54,6 +54,11 @@
     void tabIndexChanged(int index);
     void goBackPage();
     void goForwardPage();
+    void download(const QNetworkRequest &request);
+    void unsupportedContent(QNetworkReply * reply);
+    void downloadFinished();
+    void downloadFileProgress(qint64 , qint64 );
+    void progressCanceled();
 
 private:
     QString m_appServerUrl;
@@ -79,6 +84,12 @@
 
     bool m_initialLoad;
     int m_loadAttempt;
+    QString m_downloadFilename;
+    int m_downloadStarted;
+    int m_downloadCancelled;
+    QFile *m_file;
+    QProgressDialog *m_progressDialog;
+    QString m_defaultFilename;
 
     void createActions();
     void pause(int seconds = 1);
Index: runtime/BrowserWindow.cpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- runtime/BrowserWindow.cpp	(revision d79524ff60a4645af798ce1e926210320de26a99)
+++ runtime/BrowserWindow.cpp	(revision )
@@ -23,7 +23,6 @@
 #include <QInputDialog>
 #include <QLineEdit>
 #endif
-
 // App headers
 #include "BrowserWindow.h"
 #include "ConfigWindow.h"
@@ -42,6 +41,12 @@
     m_widget = NULL;
     m_toolBtnBack = NULL;
     m_toolBtnForward = NULL;
+    m_downloadStarted = 0;
+    m_downloadCancelled = 0;
+    m_file = NULL;
+    m_downloadFilename = "";
+    m_defaultFilename = "";
+    m_progressDialog = NULL;
 
     m_appServerUrl = url;
 
@@ -83,6 +88,11 @@
     // Register the slot on tab index change
     connect(m_tabWidget,SIGNAL(currentChanged(int )),this,SLOT(tabIndexChanged(int )));
 
+    // Listen for the download file request from the web page
+    m_mainWebView->page()->setForwardUnsupportedContent(true);
+    connect(m_mainWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+    connect(m_mainWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
     m_mainWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
 
     // Restore the geometry
@@ -199,6 +209,193 @@
     return 0;
 }
 
+// This slot will be called when user right click the download link and select "Save Link..."
+void BrowserWindow::download(const QNetworkRequest &request)
+{
+    if (m_downloadStarted)
+    {
+        // Inform the user that a download is already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress: %1").arg(m_defaultFilename));
+        return;
+    }
+
+    m_defaultFilename = QFileInfo(request.url().toString()).fileName();
+    QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), m_defaultFilename);
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        m_downloadFilename = fileName;
+
+        QNetworkRequest newRequest = request;
+        newRequest.setAttribute(QNetworkRequest::User, fileName);
+
+        QObject *obj_web_page = QObject::sender();
+        if (obj_web_page != NULL)
+        {
+            QWebPage *sender_web_page = dynamic_cast<QWebPage*>(obj_web_page);
+            if (sender_web_page != NULL)
+            {
+                QNetworkAccessManager *networkManager = sender_web_page->networkAccessManager();
+                QNetworkReply *reply = networkManager->get(newRequest);
+                if (reply != NULL)
+                {
+                    m_downloadStarted = 1;
+                    m_downloadCancelled = 0;
+                    // Connect the signal for downloadProgress and downloadFinished for file download
+                    connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)) );
+                    connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+                }
+            }
+        }
+    }
+}
+
+//This slot will called in chunk and give the progress for the file download
+void BrowserWindow::downloadFileProgress(qint64 readData, qint64 totalData)
+{
+    QNetworkReply *reply = ((QNetworkReply*)sender());
+    QNetworkRequest request = reply->request();
+    QVariant v = request.attribute(QNetworkRequest::User);
+
+    // Is download is canceled by the user then no action is taken, just return
+    if (m_downloadCancelled)
+        return;
+
+    if(reply != NULL && reply->error() != QNetworkReply::NoError)
+    {
+        qDebug() << "Network error occurred whilst downloading: " << m_defaultFilename;
+        return;
+    }
+
+    // Download is not yet started so open the file first time.
+    if (!m_file)
+    {
+        m_file = new QFile(m_downloadFilename);
+        if (!m_file->open(QIODevice::WriteOnly))
+        {
+            qDebug() << "Error opening file: " << m_downloadFilename;
+            m_downloadFilename.clear();
+            m_defaultFilename.clear();
+            m_downloadStarted = 0;
+            return;
+        }
+
+        // Start downloading progress bar
+        m_progressDialog = new QProgressDialog (tr("Downloading file: %1 ").arg(m_defaultFilename), "Cancel", readData, totalData, this);
+        m_progressDialog->setWindowModality(Qt::WindowModal);
+        m_progressDialog->setWindowTitle("Download progress");
+        m_progressDialog->setMinimumWidth(450);
+        m_progressDialog->setMinimumHeight(80);
+        m_progressDialog->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
+        QObject::connect(m_progressDialog, SIGNAL(canceled()), this, SLOT(progressCanceled()));
+        m_progressDialog->show();
+    }
+
+    if (m_file)
+    {
+        // Write the data to file
+        m_file->write(reply->read(readData));
+        m_progressDialog->setValue(readData);
+
+        // As read data and totalData difference is zero means downloading is finished
+        if ((totalData - readData) == 0)
+        {
+            if (m_progressDialog)
+            {
+                delete m_progressDialog;
+                m_progressDialog = NULL;
+            }
+
+            // Downloading complted so we need to display the message
+            // Inform user that downloading is completed
+            QMessageBox::information(this, tr("Download completed"), tr("Successfully downloaded %1").arg(m_defaultFilename));
+            m_downloadFilename.clear();
+            m_defaultFilename.clear();
+            m_downloadStarted = 0;
+            m_downloadCancelled = 0;
+            if (m_file)
+            {
+                delete m_file;
+                m_file = NULL;
+            }
+        }
+    }
+}
+
+//This slot will called when user cancel the downloading file which is in progress.
+void BrowserWindow::progressCanceled()
+{
+    m_downloadCancelled = 1;
+
+    if (m_progressDialog)
+    {
+        delete m_progressDialog;
+        m_progressDialog = NULL;
+    }
+
+    if (m_file)
+    {
+        delete m_file;
+        m_file = NULL;
+    }
+
+    m_downloadFilename.clear();
+    m_defaultFilename.clear();
+    m_downloadStarted = 0;
+}
+
+// This slot will called when file downloading is finished
+void BrowserWindow::downloadFinished()
+{
+    if (m_progressDialog)
+    {
+        delete m_progressDialog;
+        m_progressDialog = NULL;
+    }
+
+    // Inform user that downloading is completed
+    if (m_downloadStarted)
+        QMessageBox::information(this, tr("Download completed"), tr("Successfully downloaded %1").arg(m_defaultFilename));
+
+    m_downloadFilename.clear();
+    m_defaultFilename.clear();
+    m_downloadStarted = 0;
+    m_downloadCancelled = 0;
+    if (m_file)
+    {
+        delete m_file;
+        m_file = NULL;
+    }
+}
+
+// This slot will be called when user directly click on any download file
+void BrowserWindow::unsupportedContent(QNetworkReply * reply)
+{
+    if (m_downloadStarted)
+    {
+        //Inform the user that one download already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress: %1").arg(m_defaultFilename));
+        return;
+    }
+
+    m_defaultFilename = QFileInfo(reply->url().toString()).fileName();
+    QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), m_defaultFilename);
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        m_downloadFilename = fileName;
+        if (reply != NULL)
+        {
+            m_downloadStarted = 1;
+            m_downloadCancelled = 0;
+            connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)));
+            connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+        }
+    }
+}
+
 // Slot: When the tab index change, hide/show the toolbutton displayed on tab
 void BrowserWindow::tabIndexChanged(int index)
 {
@@ -343,6 +540,40 @@
 // Slot: Link is open from pgAdmin mainwindow
 void BrowserWindow::urlLinkClicked(const QUrl &name)
 {
+    QString csv_data = QString::fromUtf8(name.toEncoded());
+
+    // Find the "data:text/csv" tag, get the decoded data from QUrl class and write to csv file.
+    if (csv_data.contains(QRegExp("^data:text\\/csv")))
+    {
+        // Ask user where to save the csv file in filesystem.
+        QString filename = QFileDialog::getSaveFileName(this, tr("Save csv file"), QDir::currentPath(), tr("Files (*.csv)") );
+        if(!filename.isEmpty())
+        {
+            // Decode the encoded uri data
+            QString csvData = QUrl::fromPercentEncoding(name.toEncoded());
+            QStringList csvStrList = csvData.split(";");
+            QString extractString = "";
+            if (csvStrList.size() >= 3)
+                extractString = csvStrList.at(2);
+            QFile csvfile(filename);
+            if (!csvfile.open(QIODevice::WriteOnly | QIODevice::Text))
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while opening file %1").arg(filename));
+                return;
+            }
+            // Write the csv data to file
+	    qint64 data_return = csvfile.write(extractString.toUtf8().constData());
+            if (data_return == -1)
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while writing data to file %1").arg(filename));
+                csvfile.close();
+                return;
+            }
+            csvfile.close();
+        }
+        return;
+    }
+
     // First check is there any tab opened with same URL then open it again.
     int tabFound = findURLTab(name);
 
@@ -352,6 +583,11 @@
         m_addNewGridLayout = new QGridLayout(m_addNewTab);
         m_addNewGridLayout->setContentsMargins(0, 0, 0, 0);
         m_addNewWebView = new WebViewWindow(m_addNewTab);
+
+	// Listen for the download request from the web page
+	m_addNewWebView->page()->setForwardUnsupportedContent(true);
+        connect(m_addNewWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+        connect(m_addNewWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
 
         m_widget = new QWidget(m_addNewTab);
         m_toolBtnBack = new QToolButton(m_widget);
Index: web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js	(revision d79524ff60a4645af798ce1e926210320de26a99)
+++ web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js	(revision )
@@ -2572,7 +2572,7 @@
                 keys = _.pluck(self.columns, 'name');
 
             // Fetch the items from fullCollection and convert it as csv format
-            var csv = labels.join(',') + '\n';
+            var csv = keys.join(',') + '\n';
             csv += coll.map(function(item) {
                 return _.map(keys, function(key) {
                   var cell = csv_col [key].cell,
@@ -2585,7 +2585,7 @@
             }).join('\n');
 
             // Download the file.
-            var encodedUri = encodeURI('data:text/csv;charset=utf-8,' + csv),
+            var encodedUri = encodeURI('data:text/csv;charset=utf-8;' + csv),
                     link = document.createElement('a');
             link.setAttribute('href', encodedUri);
 


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
@ 2016-07-01 04:43   ` Neel Patel <[email protected]>
  2016-07-01 09:09     ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Neel Patel @ 2016-07-01 04:43 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

--94eb2c0b642492f54705368ba1d1
Content-Type: text/plain; charset=UTF-8

Hi Dave,

On Thu, Jun 30, 2016 at 7:31 PM, Dave Page <[email protected]> wrote:

> Hi
>
> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
> <[email protected]> wrote:
> > Hi,
> >
> > Please find attached patch file for initial version of download file in
> > runtime application.
>
> I've attached an update with some improved messages, and setting the
> progress dialogue to be modal (seeing as we cannot have multiple
> downloads, and it's easy to lose the dialogue).
>
> > With this patch, we have implemented two features.
> >
> > Feature 1 :- Normal "Download file" from runtime application
> >
> > Previously "Download file" was not implemented in runtime application.
> > With this patch file, we have handled Qt signal for download file
> properly.
>
> This seems to work fine. I did get one crash (after I cancelled a
> download, then tried it again), but I couldn't reproduce that.
>

Okay. I will try to reproduce the issue and also i will try to review the
code again if i can find something regrading crash.


>
> > Feature 2 :-   "download" attribute support for 'a' tag for client side
> > download
> >
> > As per our knowledge, webkit has not implemented the download attribute
> at
> > 'a' tag.
> > Currently it shows under development from below link.
> >
> > https://bugreports.qt.io/browse/QTBUG-47732
> >
> > We did not found any signal in Qt for download attribute feature but to
> > implement this feature in runtime application, we added one workaround to
> > make it work with download CSV file.
> >
> > When we click on download buttons, we are getting Qt signal
> "urlLinkClicked"
> > and in that url we are finding "data:text/csv" from encoded URL generated
> > from sqleditor. Once we found that tag then we are decoding the csv data
> and
> > writing to file.
> >
> > Is that right approach ? Should we add our own custom mime-type to
> header ?
> > Let us know your thoughts on this feature.
>
> This doesn't work so well, for a number of reasons:
>
> 1) QT Creator is complaining that your regexp contains an invalid
> escape sequence (line 546).
>

I will fix.

>
> 2) The default file name seems to be the entire data blob. I would
> suggest making the file name "download.csv" if we don't know anything
> better. The "csv" part should be taken from the mime type (see below)
>
> 3) Should we handle all "data:" downloads in this way? Taking the file
> type and default extension from the mimetype offered.
>

We can handle all "data:" download. We will extract the filename and
extension from mime type.
As i know, Qt provides QUrlQuery class which will be useful to find the key
value pair. I will test and let you know.

e.g. If we have header as below

"data:text/csv;charset=utf-8;Content-disposition:attachment;filename=download.csv;"



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-01 04:43   ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
@ 2016-07-01 09:09     ` Dave Page <[email protected]>
  2016-07-06 08:12       ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Page @ 2016-07-01 09:09 UTC (permalink / raw)
  To: Neel Patel <[email protected]>; +Cc: pgadmin-hackers

On Fri, Jul 1, 2016 at 5:43 AM, Neel Patel <[email protected]> wrote:
> Hi Dave,
>
> On Thu, Jun 30, 2016 at 7:31 PM, Dave Page <[email protected]> wrote:
>>
>> Hi
>>
>> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
>> <[email protected]> wrote:
>> > Hi,
>> >
>> > Please find attached patch file for initial version of download file in
>> > runtime application.
>>
>> I've attached an update with some improved messages, and setting the
>> progress dialogue to be modal (seeing as we cannot have multiple
>> downloads, and it's easy to lose the dialogue).
>>
>> > With this patch, we have implemented two features.
>> >
>> > Feature 1 :- Normal "Download file" from runtime application
>> >
>> > Previously "Download file" was not implemented in runtime application.
>> > With this patch file, we have handled Qt signal for download file
>> > properly.
>>
>> This seems to work fine. I did get one crash (after I cancelled a
>> download, then tried it again), but I couldn't reproduce that.
>
>
> Okay. I will try to reproduce the issue and also i will try to review the
> code again if i can find something regrading crash.

Thanks.

>
>>
>> > Feature 2 :-   "download" attribute support for 'a' tag for client side
>> > download
>> >
>> > As per our knowledge, webkit has not implemented the download attribute
>> > at
>> > 'a' tag.
>> > Currently it shows under development from below link.
>> >
>> > https://bugreports.qt.io/browse/QTBUG-47732
>> >
>> > We did not found any signal in Qt for download attribute feature but to
>> > implement this feature in runtime application, we added one workaround
>> > to
>> > make it work with download CSV file.
>> >
>> > When we click on download buttons, we are getting Qt signal
>> > "urlLinkClicked"
>> > and in that url we are finding "data:text/csv" from encoded URL
>> > generated
>> > from sqleditor. Once we found that tag then we are decoding the csv data
>> > and
>> > writing to file.
>> >
>> > Is that right approach ? Should we add our own custom mime-type to
>> > header ?
>> > Let us know your thoughts on this feature.
>>
>> This doesn't work so well, for a number of reasons:
>>
>> 1) QT Creator is complaining that your regexp contains an invalid
>> escape sequence (line 546).
>
>
> I will fix.
>>
>>
>> 2) The default file name seems to be the entire data blob. I would
>> suggest making the file name "download.csv" if we don't know anything
>> better. The "csv" part should be taken from the mime type (see below)
>>
>> 3) Should we handle all "data:" downloads in this way? Taking the file
>> type and default extension from the mimetype offered.
>
>
> We can handle all "data:" download. We will extract the filename and
> extension from mime type.
> As i know, Qt provides QUrlQuery class which will be useful to find the key
> value pair. I will test and let you know.
>
> e.g. If we have header as below
>
> "data:text/csv;charset=utf-8;Content-disposition:attachment;filename=download.csv;"
>
> From the QurlQuery class we can query "filename" and "data:" and accordingly
> save the data to filename provided.
>
> Please suggest.

Sounds good.

>> 4) When I change the filename the data is properly saved, but then I
>> get a confirmation message that still has the full data blob as the
>> filename.
>>
>> 5) It somehow seems to have let me save files with forward slashes in
>> the name. See attachment.
>
>
> I think we should not ask for "Save as" dialog. If there is no key found of
> "filename" in encodedURI then we should create the file "download.csv" in
> user's download directory and save the csv data.

Well we can get the extension from the mimetype in that instance, but
otherwise I agree with the naming. I do think we need a Save As
dialogue, as the user should be able to choose the location for the
file (and rename it). We should also remember the last save location
for convenience.

>> 6) I get all sorts of weird redrawing on the screen when downloading a
>> data blob. I suspect it's because the filename (which is still the
>> entire data blob) is shown on the progress dialogue.
>>
>
> I will try to fix as per above comments and submit the patch again.
> Let us know for any misunderstanding.

Cool, thanks.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-01 04:43   ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-07-01 09:09     ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
@ 2016-07-06 08:12       ` Neel Patel <[email protected]>
  2016-07-07 08:43         ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Neel Patel @ 2016-07-06 08:12 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

Hi Dave,

I have tried to fix most of the review comments.  I have modified the patch
on top of your changes. Please find attached updated patch file.
Find my comments inline. Can you please review and let us know your
feedback ?

Thanks,
Neel Patel

On Fri, Jul 1, 2016 at 2:39 PM, Dave Page <[email protected]> wrote:

> On Fri, Jul 1, 2016 at 5:43 AM, Neel Patel <[email protected]>
> wrote:
> > Hi Dave,
> >
> > On Thu, Jun 30, 2016 at 7:31 PM, Dave Page <[email protected]> wrote:
> >>
> >> Hi
> >>
> >> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
> >> <[email protected]> wrote:
> >> > Hi,
> >> >
> >> > Please find attached patch file for initial version of download file
> in
> >> > runtime application.
> >>
> >> I've attached an update with some improved messages, and setting the
> >> progress dialogue to be modal (seeing as we cannot have multiple
> >> downloads, and it's easy to lose the dialogue).
> >>
> >> > With this patch, we have implemented two features.
> >> >
> >> > Feature 1 :- Normal "Download file" from runtime application
> >> >
> >> > Previously "Download file" was not implemented in runtime application.
> >> > With this patch file, we have handled Qt signal for download file
> >> > properly.
> >>
> >> This seems to work fine. I did get one crash (after I cancelled a
> >> download, then tried it again), but I couldn't reproduce that.
> >
> >
> > Okay. I will try to reproduce the issue and also i will try to review the
> > code again if i can find something regrading crash.
>

I have tried to reproduce the crash but no luck. I have tried on Linux and
Mac.


>
> Thanks.
>
> >
> >>
> >> > Feature 2 :-   "download" attribute support for 'a' tag for client
> side
> >> > download
> >> >
> >> > As per our knowledge, webkit has not implemented the download
> attribute
> >> > at
> >> > 'a' tag.
> >> > Currently it shows under development from below link.
> >> >
> >> > https://bugreports.qt.io/browse/QTBUG-47732
> >> >
> >> > We did not found any signal in Qt for download attribute feature but
> to
> >> > implement this feature in runtime application, we added one workaround
> >> > to
> >> > make it work with download CSV file.
> >> >
> >> > When we click on download buttons, we are getting Qt signal
> >> > "urlLinkClicked"
> >> > and in that url we are finding "data:text/csv" from encoded URL
> >> > generated
> >> > from sqleditor. Once we found that tag then we are decoding the csv
> data
> >> > and
> >> > writing to file.
> >> >
> >> > Is that right approach ? Should we add our own custom mime-type to
> >> > header ?
> >> > Let us know your thoughts on this feature.
> >>
> >> This doesn't work so well, for a number of reasons:
> >>
> >> 1) QT Creator is complaining that your regexp contains an invalid
> >> escape sequence (line 546).
> >
> >
> > I will fix.
> >>
> >>
> >> 2) The default file name seems to be the entire data blob. I would
> >> suggest making the file name "download.csv" if we don't know anything
> >> better. The "csv" part should be taken from the mime type (see below)
> >>
> >> 3) Should we handle all "data:" downloads in this way? Taking the file
> >> type and default extension from the mimetype offered.
> >
> >
> > We can handle all "data:" download. We will extract the filename and
> > extension from mime type.
> > As i know, Qt provides QUrlQuery class which will be useful to find the
> key
> > value pair. I will test and let you know.
> >
> > e.g. If we have header as below
> >
> >
> "data:text/csv;charset=utf-8;Content-disposition:attachment;filename=download.csv;"
> >
> > From the QurlQuery class we can query "filename" and "data:" and
> accordingly
> > save the data to filename provided.
> >
> > Please suggest.
>
> Sounds good.
>
> >> 4) When I change the filename the data is properly saved, but then I
> >> get a confirmation message that still has the full data blob as the
> >> filename.
>

I found that it is due to different Qt version. You might be using Qt 5.5.
In Qt 5.5, we are getting "download" signal and for Qt < 5.5 we are getting
"urlLinkClicked" signal for client side data download.
We have fixed the issue for all Qt version. Let me know if you can still
able to reproduce the issue.


> >>
> >> 5) It somehow seems to have let me save files with forward slashes in
> >> the name. See attachment.
>

Fixed.

>
> >
> > I think we should not ask for "Save as" dialog. If there is no key found
> of
> > "filename" in encodedURI then we should create the file "download.csv" in
> > user's download directory and save the csv data.
>
> Well we can get the extension from the mimetype in that instance, but
> otherwise I agree with the naming. I do think we need a Save As
> dialogue, as the user should be able to choose the location for the
> file (and rename it). We should also remember the last save location
> for convenience.
>

Fixed.


>
> >> 6) I get all sorts of weird redrawing on the screen when downloading a
> >> data blob. I suspect it's because the filename (which is still the
> >> entire data blob) is shown on the progress dialogue.
> >>
>

Fixed.


> >
> > I will try to fix as per above comments and submit the patch again.
> > Let us know for any misunderstanding.
>
> Cool, thanks.
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] download_runtime_v3.patch (19.1K, 3-download_runtime_v3.patch)
  download | inline diff:
diff --git a/runtime/BrowserWindow.cpp b/runtime/BrowserWindow.cpp
index e875b28..a73ab00 100644
--- a/runtime/BrowserWindow.cpp
+++ b/runtime/BrowserWindow.cpp
@@ -23,7 +23,6 @@
 #include <QInputDialog>
 #include <QLineEdit>
 #endif
-
 // App headers
 #include "BrowserWindow.h"
 #include "ConfigWindow.h"
@@ -42,6 +41,14 @@ BrowserWindow::BrowserWindow(QString url)
     m_widget = NULL;
     m_toolBtnBack = NULL;
     m_toolBtnForward = NULL;
+    m_downloadStarted = 0;
+    m_downloadCancelled = 0;
+    m_file = NULL;
+    m_downloadFilename = "";
+    m_defaultFilename = "";
+    m_progressDialog = NULL;
+    m_last_open_folder_path = QDir::currentPath();
+    m_dir = "";
 
     m_appServerUrl = url;
 
@@ -83,6 +90,11 @@ BrowserWindow::BrowserWindow(QString url)
     // Register the slot on tab index change
     connect(m_tabWidget,SIGNAL(currentChanged(int )),this,SLOT(tabIndexChanged(int )));
 
+    // Listen for the download file request from the web page
+    m_mainWebView->page()->setForwardUnsupportedContent(true);
+    connect(m_mainWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+    connect(m_mainWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
     m_mainWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
 
     // Restore the geometry
@@ -199,6 +211,281 @@ int BrowserWindow::findURLTab(const QUrl &name)
     return 0;
 }
 
+// This slot will be called when user right click the download link and select "Save Link..."
+void BrowserWindow::download(const QNetworkRequest &request)
+{
+    // Check that request contains the data download at client side
+    QUrl name;
+    if (checkClientDownload(name, request))
+        return;
+
+    if (m_downloadStarted)
+    {
+        // Inform the user that a download is already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress: %1").arg(m_defaultFilename));
+        return;
+    }
+
+    m_defaultFilename = QFileInfo(request.url().toString()).fileName();
+
+    QFileDialog save_dialog(this);
+    save_dialog.setAcceptMode(QFileDialog::AcceptSave);
+    save_dialog.setWindowTitle(tr("Save file"));
+    save_dialog.setDirectory(m_last_open_folder_path);
+    save_dialog.selectFile(m_defaultFilename);
+
+    QObject::connect(&save_dialog, SIGNAL(directoryEntered(const QString &)), this, SLOT(current_dir_path(const QString &)));
+    m_dir = m_last_open_folder_path;
+    QString fileName = "";
+    QString f_name = "";
+
+    if (save_dialog.exec() == QDialog::Accepted) {
+        fileName = save_dialog.selectedFiles().first();
+        f_name = fileName.replace(m_dir, "");
+        // remove the first character from fiename
+        f_name.remove(0,1);
+        m_defaultFilename = f_name;
+    }
+    else
+        return;
+
+    fileName = m_dir + fileName;
+    // clear the last folder open path
+    m_dir.clear();
+
+#ifdef __APPLE__
+    // Check that user has given valid file name or not - forward slash not allowed in file name
+    // In Mac OSX, forward slash is converted to colon(:) by Qt so we need to check for colon.
+    if (f_name.indexOf(":") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#else
+    // Check that user has given valid file name or not - forward slash not allowed in file name
+    if (f_name.indexOf("/") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#endif
+
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        m_downloadFilename = fileName;
+
+        QNetworkRequest newRequest = request;
+        newRequest.setAttribute(QNetworkRequest::User, fileName);
+
+        QObject *obj_web_page = QObject::sender();
+        if (obj_web_page != NULL)
+        {
+            QWebPage *sender_web_page = dynamic_cast<QWebPage*>(obj_web_page);
+            if (sender_web_page != NULL)
+            {
+                QNetworkAccessManager *networkManager = sender_web_page->networkAccessManager();
+                QNetworkReply *reply = networkManager->get(newRequest);
+                if (reply != NULL)
+                {
+                    m_downloadStarted = 1;
+                    m_downloadCancelled = 0;
+                    // Connect the signal for downloadProgress and downloadFinished for file download
+                    connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)) );
+                    connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+                }
+            }
+        }
+    }
+}
+
+//This slot will called in chunk and give the progress for the file download
+void BrowserWindow::downloadFileProgress(qint64 readData, qint64 totalData)
+{
+    QNetworkReply *reply = ((QNetworkReply*)sender());
+    QNetworkRequest request = reply->request();
+    QVariant v = request.attribute(QNetworkRequest::User);
+
+    // Is download is canceled by the user then no action is taken, just return
+    if (m_downloadCancelled)
+        return;
+
+    if(reply != NULL && reply->error() != QNetworkReply::NoError)
+    {
+        qDebug() << "Network error occurred whilst downloading: " << m_defaultFilename;
+        return;
+    }
+
+    // Download is not yet started so open the file first time.
+    if (!m_file)
+    {
+        m_file = new QFile(m_downloadFilename);
+        if (!m_file->open(QIODevice::WriteOnly))
+        {
+            qDebug() << "Error opening file: " << m_downloadFilename;
+            m_downloadFilename.clear();
+            m_defaultFilename.clear();
+            m_downloadStarted = 0;
+            return;
+        }
+
+        // Start downloading progress bar
+        m_progressDialog = new QProgressDialog (tr("Downloading file: %1 ").arg(m_defaultFilename), "Cancel", readData, totalData, this);
+        m_progressDialog->setWindowModality(Qt::WindowModal);
+        m_progressDialog->setWindowTitle("Download progress");
+        m_progressDialog->setMinimumWidth(450);
+        m_progressDialog->setMinimumHeight(80);
+        m_progressDialog->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
+        QObject::connect(m_progressDialog, SIGNAL(canceled()), this, SLOT(progressCanceled()));
+        m_progressDialog->show();
+    }
+
+    if (m_file)
+    {
+        // Write the data to file
+        m_file->write(reply->read(readData));
+        m_progressDialog->setValue(readData);
+
+        // As read data and totalData difference is zero means downloading is finished
+        if ((totalData - readData) == 0)
+        {
+            if (m_progressDialog)
+            {
+                delete m_progressDialog;
+                m_progressDialog = NULL;
+            }
+
+            // Downloading complted so we need to display the message
+            // Inform user that downloading is completed
+            QMessageBox::information(this, tr("Download completed"), tr("Successfully downloaded %1").arg(m_defaultFilename));
+            m_downloadFilename.clear();
+            m_defaultFilename.clear();
+            m_downloadStarted = 0;
+            m_downloadCancelled = 0;
+            if (m_file)
+            {
+                delete m_file;
+                m_file = NULL;
+            }
+        }
+    }
+}
+
+//This slot will called when user cancel the downloading file which is in progress.
+void BrowserWindow::progressCanceled()
+{
+    m_downloadCancelled = 1;
+
+    if (m_progressDialog)
+    {
+        delete m_progressDialog;
+        m_progressDialog = NULL;
+    }
+
+    if (m_file)
+    {
+        delete m_file;
+        m_file = NULL;
+    }
+
+    m_downloadFilename.clear();
+    m_defaultFilename.clear();
+    m_downloadStarted = 0;
+}
+
+// This slot will called when file downloading is finished
+void BrowserWindow::downloadFinished()
+{
+    if (m_progressDialog)
+    {
+        delete m_progressDialog;
+        m_progressDialog = NULL;
+    }
+
+    // Inform user that downloading is completed
+    if (m_downloadStarted)
+        QMessageBox::information(this, tr("Download completed"), tr("Successfully downloaded %1").arg(m_defaultFilename));
+
+    m_downloadFilename.clear();
+    m_defaultFilename.clear();
+    m_downloadStarted = 0;
+    m_downloadCancelled = 0;
+    if (m_file)
+    {
+        delete m_file;
+        m_file = NULL;
+    }
+}
+
+// This slot will be called when user directly click on any download file
+void BrowserWindow::unsupportedContent(QNetworkReply * reply)
+{
+    if (m_downloadStarted)
+    {
+        //Inform the user that one download already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress: %1").arg(m_defaultFilename));
+        return;
+    }
+
+    m_defaultFilename = QFileInfo(reply->url().toString()).fileName();
+    QFileDialog save_dialog(this);
+    save_dialog.setAcceptMode(QFileDialog::AcceptSave);
+    save_dialog.setWindowTitle(tr("Save file"));
+    save_dialog.setDirectory(m_last_open_folder_path);
+    save_dialog.selectFile(m_defaultFilename);
+
+    QObject::connect(&save_dialog, SIGNAL(directoryEntered(const QString &)), this, SLOT(current_dir_path(const QString &)));
+    m_dir = m_last_open_folder_path;
+    QString fileName = "";
+    QString f_name = "";
+
+    if (save_dialog.exec() == QDialog::Accepted) {
+        fileName = save_dialog.selectedFiles().first();
+        f_name = fileName.replace(m_dir, "");
+        // remove the first character from fiename
+        f_name.remove(0,1);
+        m_defaultFilename = f_name;
+    }
+    else
+        return;
+
+    fileName = m_dir + fileName;
+    // clear the last folder open path
+    m_dir.clear();
+
+#ifdef __APPLE__
+    // Check that user has given valid file name or not - forward slash not allowed in file name
+    // In Mac OSX, forward slash is converted to colon(:) by Qt so we need to check for colon.
+    if (f_name.indexOf(":") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#else
+    // Check that user has given valid file name or not - forward slash not allowed in file name
+    if (f_name.indexOf("/") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#endif
+
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        m_downloadFilename = fileName;
+        if (reply != NULL)
+        {
+            m_downloadStarted = 1;
+            m_downloadCancelled = 0;
+            connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)));
+            connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+        }
+    }
+}
+
 // Slot: When the tab index change, hide/show the toolbutton displayed on tab
 void BrowserWindow::tabIndexChanged(int index)
 {
@@ -340,9 +627,142 @@ void BrowserWindow::tabTitleChanged(const QString &str)
     }
 }
 
+// This function will used to download the data set in encoded URL so data will be downloaded at client side.
+bool BrowserWindow::checkClientDownload(const QUrl &name, const QNetworkRequest &request)
+{
+    QString mime_type = "";
+    QString file_name = "";
+    QString write_data = "";
+    QString csv_data = "";
+    bool return_val = false;
+
+    /*
+    In Qt version 5.5, "download" signal is emitted when 'download' attribute is set on 'a' tag.
+    In "download" signal emission, name will be empty and data will be in request object.
+    Earlier version ( < 5.5 ), "urlLinkClicked" signal is emitted so name will contain the object data.
+    */
+    if (name.isEmpty())
+        csv_data = QFileInfo(request.url().toString()).fileName();
+    else
+        csv_data = QString::fromUtf8(name.toEncoded());
+
+    QUrlQuery downloadData(csv_data);
+    QStringList keyValueData = csv_data.split("&");
+    file_name = downloadData.queryItemValue("filename");
+    write_data = downloadData.queryItemValue("value");
+
+    int key_value_length = keyValueData.size();
+    int i_count = 0;
+
+    // we have key value data so we need to tokeniza it and find the values
+    while (i_count < key_value_length)
+    {
+        //Extract the extension after "data:" word found from encoded url.
+        QString start_match_string = "data:";
+        int s_offset = keyValueData.at(i_count).indexOf(start_match_string);
+        if (s_offset != -1)
+        {
+            int format_offset = keyValueData.at(i_count).indexOf("/");
+            mime_type = keyValueData.at(i_count).mid((format_offset+1));
+            break;
+        }
+
+        int split_offset = keyValueData.at(i_count).indexOf("=");
+        if (split_offset == -1)
+        {
+            mime_type = keyValueData.at(i_count);
+            break;
+        }
+
+        i_count += 1;
+    }
+
+    // write data to file
+    if (!write_data.isEmpty())
+    {
+        QString filename = "";
+        QString f_name = "";
+        QFileDialog saveAsdialog(this);
+        saveAsdialog.setAcceptMode(QFileDialog::AcceptSave);
+        saveAsdialog.selectNameFilter(tr("Files (*.%1)").arg(mime_type));
+        saveAsdialog.setWindowTitle(tr("Save %1 file").arg(mime_type));
+        saveAsdialog.setDirectory(m_last_open_folder_path);
+        saveAsdialog.selectFile(file_name);
+        saveAsdialog.setDefaultSuffix(mime_type);
+
+        QObject::connect(&saveAsdialog, SIGNAL(directoryEntered(const QString &)), this, SLOT(current_dir_path(const QString &)));
+        m_dir = m_last_open_folder_path;
+
+        if (saveAsdialog.exec() == QDialog::Accepted) {
+            filename = saveAsdialog.selectedFiles().at(0);
+            QString filename = saveAsdialog.selectedFiles().first();
+            f_name = filename.replace(m_dir, "");
+            // remove the first character from fiename
+            f_name.remove(0,1);
+        }
+
+        // clear the last folder open path
+        m_dir.clear();
+
+        return_val = true;
+
+#ifdef __APPLE__
+        // Check that user has given valid file name or not - forward slash not allowed in file name
+        // In Mac OSX, forward slash is converted to colon(:) by Qt so we need to check for colon.
+        if (f_name.indexOf(":") != -1)
+        {
+            QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+            return return_val;
+        }
+#else
+        // Check that user has given valid file name or not - forward slash not allowed in file name
+        if (f_name.indexOf("/") != -1)
+        {
+            QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+            return return_val;
+        }
+#endif
+        if(!filename.isEmpty())
+        {
+            // save the last open folder path
+            m_last_open_folder_path = QFileInfo(filename).path();
+            // Decode the encoded uri data
+            QString csvData = QUrl::fromPercentEncoding(write_data.toUtf8());
+
+            QFile csvfile(filename);
+            if (!csvfile.open(QIODevice::WriteOnly | QIODevice::Text))
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while opening file %1").arg(filename));
+                return return_val;
+            }
+            // Write the csv data to file
+            qint64 data_return = csvfile.write(csvData.toUtf8().constData());
+            if (data_return == -1)
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while writing data to file %1").arg(filename));
+                csvfile.close();
+                return return_val;
+            }
+            csvfile.close();
+        }
+    }
+
+    return return_val;
+}
+
+void BrowserWindow::current_dir_path(const QString &dir)
+{
+    m_dir = dir;
+}
+
 // Slot: Link is open from pgAdmin mainwindow
 void BrowserWindow::urlLinkClicked(const QUrl &name)
 {
+    // Check that request contains the data download at client side
+    QNetworkRequest request;
+    if (checkClientDownload(name, request))
+        return;
+
     // First check is there any tab opened with same URL then open it again.
     int tabFound = findURLTab(name);
 
@@ -353,6 +773,11 @@ void BrowserWindow::urlLinkClicked(const QUrl &name)
         m_addNewGridLayout->setContentsMargins(0, 0, 0, 0);
         m_addNewWebView = new WebViewWindow(m_addNewTab);
 
+	// Listen for the download request from the web page
+	m_addNewWebView->page()->setForwardUnsupportedContent(true);
+        connect(m_addNewWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+        connect(m_addNewWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
         m_widget = new QWidget(m_addNewTab);
         m_toolBtnBack = new QToolButton(m_widget);
         m_toolBtnBack->setFixedHeight(PGA_BTN_SIZE);
diff --git a/runtime/BrowserWindow.h b/runtime/BrowserWindow.h
index 43f90fe..7635549 100644
--- a/runtime/BrowserWindow.h
+++ b/runtime/BrowserWindow.h
@@ -54,6 +54,12 @@ public slots:
     void tabIndexChanged(int index);
     void goBackPage();
     void goForwardPage();
+    void download(const QNetworkRequest &request);
+    void unsupportedContent(QNetworkReply * reply);
+    void downloadFinished();
+    void downloadFileProgress(qint64 , qint64 );
+    void progressCanceled();
+    void current_dir_path(const QString &dir);
 
 private:
     QString m_appServerUrl;
@@ -79,10 +85,19 @@ private:
 
     bool m_initialLoad;
     int m_loadAttempt;
+    QString m_downloadFilename;
+    int m_downloadStarted;
+    int m_downloadCancelled;
+    QFile *m_file;
+    QProgressDialog *m_progressDialog;
+    QString m_defaultFilename;
+    QString m_last_open_folder_path;
+    QString m_dir;
 
     void createActions();
     void pause(int seconds = 1);
     int  findURLTab(const QUrl &name);
+    bool checkClientDownload(const QUrl &name, const QNetworkRequest &request);
 };
 
 #endif // BROWSERWINDOW_H
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 295caf4..2df2b5f 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -2587,7 +2587,7 @@ define(
                 keys = _.pluck(self.columns, 'name');
 
             // Fetch the items from fullCollection and convert it as csv format
-            var csv = labels.join(',') + '\n';
+            var csv = keys.join(',') + '\n';
             csv += coll.map(function(item) {
                 return _.map(keys, function(key) {
                   var cell = csv_col [key].cell,
@@ -2600,7 +2600,7 @@ define(
             }).join('\n');
 
             // Download the file.
-            var encodedUri = encodeURI('data:text/csv;charset=utf-8,' + csv),
+            var encodedUri = encodeURI('data:text/csv&charset=utf-8&filename=download.csv&value=' + csv),
                     link = document.createElement('a');
             link.setAttribute('href', encodedUri);
 


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-01 04:43   ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-07-01 09:09     ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-06 08:12       ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
@ 2016-07-07 08:43         ` Dave Page <[email protected]>
  2016-07-08 06:17           ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Page @ 2016-07-07 08:43 UTC (permalink / raw)
  To: Neel Patel <[email protected]>; +Cc: pgadmin-hackers

Hi

On Wed, Jul 6, 2016 at 9:12 AM, Neel Patel <[email protected]> wrote:
> Hi Dave,
>
> I have tried to fix most of the review comments.  I have modified the patch
> on top of your changes. Please find attached updated patch file.
> Find my comments inline. Can you please review and let us know your feedback
> ?

That's definitely getting there;

- Please make sure you follow the code style requirements, e.g.
//<space>Comment text

- In your comments, typically you should refer to the user as "the
user" not just "user". e.g.
  // Check that *the* user has given *a* valid file name or not

  The same applies to other cases where you miss the article
(https://en.wikipedia.org/wiki/Article_(grammar)):
  // Check that *the* request contains the data download at client side

NOTE: This isn't a criticism of you in particular - most of the team
do this, I assume because it's more like the way you'd phrase things
in Hindi. I just find myself correcting such mistakes regularly, and
it's good for us all to continue to improve in general.

- I was able to reproduce the crash again:
  1) Open a tab, and go to the PostgreSQL download page on
enterprisedb.com (linked from the pg.org site)
  2) Start to download the 9.6b2 Win64 installer
  3) Cancel the download
  4) Click the link to download if your download didn't automatically start
  5) Overwrite the existing file

This results in:
  a) The progress bar flashes up and down weirdly on the second download
  b) The app crashes when the download completes:

The program has unexpectedly finished.
/Users/dpage/git/pgadmin4/build-pgAdmin4-Desktop_Qt_5_5_1_clang_64bit2-Debug/pgAdmin4.app/Contents/MacOS/pgAdmin4
crashed

See the attached backtrace.

Thanks!

> On Fri, Jul 1, 2016 at 2:39 PM, Dave Page <[email protected]> wrote:
>>
>> On Fri, Jul 1, 2016 at 5:43 AM, Neel Patel <[email protected]>
>> wrote:
>> > Hi Dave,
>> >
>> > On Thu, Jun 30, 2016 at 7:31 PM, Dave Page <[email protected]> wrote:
>> >>
>> >> Hi
>> >>
>> >> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
>> >> <[email protected]> wrote:
>> >> > Hi,
>> >> >
>> >> > Please find attached patch file for initial version of download file
>> >> > in
>> >> > runtime application.
>> >>
>> >> I've attached an update with some improved messages, and setting the
>> >> progress dialogue to be modal (seeing as we cannot have multiple
>> >> downloads, and it's easy to lose the dialogue).
>> >>
>> >> > With this patch, we have implemented two features.
>> >> >
>> >> > Feature 1 :- Normal "Download file" from runtime application
>> >> >
>> >> > Previously "Download file" was not implemented in runtime
>> >> > application.
>> >> > With this patch file, we have handled Qt signal for download file
>> >> > properly.
>> >>
>> >> This seems to work fine. I did get one crash (after I cancelled a
>> >> download, then tried it again), but I couldn't reproduce that.
>> >
>> >
>> > Okay. I will try to reproduce the issue and also i will try to review
>> > the
>> > code again if i can find something regrading crash.
>
>
> I have tried to reproduce the crash but no luck. I have tried on Linux and
> Mac.
>
>>
>>
>> Thanks.
>>
>> >
>> >>
>> >> > Feature 2 :-   "download" attribute support for 'a' tag for client
>> >> > side
>> >> > download
>> >> >
>> >> > As per our knowledge, webkit has not implemented the download
>> >> > attribute
>> >> > at
>> >> > 'a' tag.
>> >> > Currently it shows under development from below link.
>> >> >
>> >> > https://bugreports.qt.io/browse/QTBUG-47732
>> >> >
>> >> > We did not found any signal in Qt for download attribute feature but
>> >> > to
>> >> > implement this feature in runtime application, we added one
>> >> > workaround
>> >> > to
>> >> > make it work with download CSV file.
>> >> >
>> >> > When we click on download buttons, we are getting Qt signal
>> >> > "urlLinkClicked"
>> >> > and in that url we are finding "data:text/csv" from encoded URL
>> >> > generated
>> >> > from sqleditor. Once we found that tag then we are decoding the csv
>> >> > data
>> >> > and
>> >> > writing to file.
>> >> >
>> >> > Is that right approach ? Should we add our own custom mime-type to
>> >> > header ?
>> >> > Let us know your thoughts on this feature.
>> >>
>> >> This doesn't work so well, for a number of reasons:
>> >>
>> >> 1) QT Creator is complaining that your regexp contains an invalid
>> >> escape sequence (line 546).
>> >
>> >
>> > I will fix.
>> >>
>> >>
>> >> 2) The default file name seems to be the entire data blob. I would
>> >> suggest making the file name "download.csv" if we don't know anything
>> >> better. The "csv" part should be taken from the mime type (see below)
>> >>
>> >> 3) Should we handle all "data:" downloads in this way? Taking the file
>> >> type and default extension from the mimetype offered.
>> >
>> >
>> > We can handle all "data:" download. We will extract the filename and
>> > extension from mime type.
>> > As i know, Qt provides QUrlQuery class which will be useful to find the
>> > key
>> > value pair. I will test and let you know.
>> >
>> > e.g. If we have header as below
>> >
>> >
>> > "data:text/csv;charset=utf-8;Content-disposition:attachment;filename=download.csv;"
>> >
>> > From the QurlQuery class we can query "filename" and "data:" and
>> > accordingly
>> > save the data to filename provided.
>> >
>> > Please suggest.
>>
>> Sounds good.
>>
>> >> 4) When I change the filename the data is properly saved, but then I
>> >> get a confirmation message that still has the full data blob as the
>> >> filename.
>
>
> I found that it is due to different Qt version. You might be using Qt 5.5.
> In Qt 5.5, we are getting "download" signal and for Qt < 5.5 we are getting
> "urlLinkClicked" signal for client side data download.
> We have fixed the issue for all Qt version. Let me know if you can still
> able to reproduce the issue.
>
>>
>> >>
>> >> 5) It somehow seems to have let me save files with forward slashes in
>> >> the name. See attachment.
>
>
> Fixed.
>
>> >
>> >
>> > I think we should not ask for "Save as" dialog. If there is no key found
>> > of
>> > "filename" in encodedURI then we should create the file "download.csv"
>> > in
>> > user's download directory and save the csv data.
>>
>> Well we can get the extension from the mimetype in that instance, but
>> otherwise I agree with the naming. I do think we need a Save As
>> dialogue, as the user should be able to choose the location for the
>> file (and rename it). We should also remember the last save location
>> for convenience.
>
>
> Fixed.
>
>>
>>
>> >> 6) I get all sorts of weird redrawing on the screen when downloading a
>> >> data blob. I suspect it's because the filename (which is still the
>> >> entire data blob) is shown on the progress dialogue.
>> >>
>
>
> Fixed.
>
>>
>> >
>> > I will try to fix as per above comments and submit the patch again.
>> > Let us know for any misunderstanding.
>>
>> Cool, thanks.
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Process:               pgAdmin4 [28185]
Path:                  /Users/USER/*/pgAdmin4.app/Contents/MacOS/pgAdmin4
Identifier:            org.pgadmin.pgAdmin4
Version:               1.0.0 (1.0.0)
Code Type:             X86-64 (Native)
Parent Process:        Qt Creator [28108]
Responsible:           pgAdmin4 [28185]
User ID:               501

Date/Time:             2016-07-07 09:26:02.498 +0100
OS Version:            Mac OS X 10.11.5 (15F34)
Report Version:        11
Anonymous UUID:        8EDD1C6E-ECA1-3406-3699-E93A83594C48

Sleep/Wake UUID:       FC79734C-1C20-4B0D-9B04-9FB7EF1661A3

Time Awake Since Boot: 260000 seconds
Time Since Wake:       2300 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x8:
--> 
    __TEXT                 00000001013af000-00000001013dd000 [  184K] r-x/rwx SM=COW  /Users/USER/*/pgAdmin4.app/Contents/MacOS/pgAdmin4

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.qt-project.QtWidgets      	0x0000000101804144 QProgressDialog::setValue(int) + 20
1   org.pgadmin.pgAdmin4          	0x00000001013bbc7a BrowserWindow::downloadFileProgress(long long, long long) + 2170 (BrowserWindow.cpp:348)
2   org.pgadmin.pgAdmin4          	0x00000001013c6dd1 BrowserWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 369 (moc_BrowserWindow.cpp:140)
3   org.qt-project.QtCore         	0x00000001024722e2 QMetaObject::activate(QObject*, int, int, void**) + 2994
4   org.qt-project.QtNetwork      	0x0000000104f0c57c QNetworkReply::downloadProgress(long long, long long) + 76
5   org.qt-project.QtNetwork      	0x0000000104e83050 QNetworkReplyHttpImplPrivate::replyDownloadData(QByteArray) + 1280
6   org.qt-project.QtNetwork      	0x0000000104f0cebd QNetworkReplyHttpImpl::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 2141
7   org.qt-project.QtCore         	0x000000010246ae93 QObject::event(QEvent*) + 755
8   org.qt-project.QtWidgets      	0x00000001015eb4bb QApplicationPrivate::notify_helper(QObject*, QEvent*) + 251
9   org.qt-project.QtWidgets      	0x00000001015ee89e QApplication::notify(QObject*, QEvent*) + 8318
10  org.qt-project.QtCore         	0x000000010244265b QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 971
11  libqcocoa.dylib               	0x000000010877491e QCocoaEventDispatcherPrivate::processPostedEvents() + 190
12  libqcocoa.dylib               	0x00000001087751a1 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 33
13  com.apple.CoreFoundation      	0x00007fff88ffe881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14  com.apple.CoreFoundation      	0x00007fff88fddfbc __CFRunLoopDoSources0 + 556
15  com.apple.CoreFoundation      	0x00007fff88fdd4df __CFRunLoopRun + 927
16  com.apple.CoreFoundation      	0x00007fff88fdced8 CFRunLoopRunSpecific + 296
17  com.apple.HIToolbox           	0x00007fff8e43a935 RunCurrentEventLoopInMode + 235
18  com.apple.HIToolbox           	0x00007fff8e43a677 ReceiveNextEventCommon + 184
19  com.apple.HIToolbox           	0x00007fff8e43a5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
20  com.apple.AppKit              	0x00007fff930addf6 _DPSNextEvent + 1067
21  com.apple.AppKit              	0x00007fff930ad226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
22  com.apple.AppKit              	0x00007fff9331ca82 -[NSApplication _doModalLoop:peek:] + 653
23  com.apple.AppKit              	0x00007fff934fe530 __33-[NSApplication runModalSession:]_block_invoke + 80
24  com.apple.AppKit              	0x00007fff934fe3f0 -[NSApplication runModalSession:] + 148
25  libqcocoa.dylib               	0x0000000108773fca QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1994
26  org.qt-project.QtCore         	0x000000010243f07d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 381
27  org.qt-project.QtWidgets      	0x00000001017d8232 QDialog::exec() + 514
28  org.qt-project.QtWidgets      	0x00000001017ffa7a showNewMessageBox(QWidget*, QMessageBox::Icon, QString const&, QString const&, QFlags<QMessageBox::StandardButton>, QMessageBox::StandardButton) + 570
29  org.pgadmin.pgAdmin4          	0x00000001013bbe0c BrowserWindow::downloadFileProgress(long long, long long) + 2572 (BrowserWindow.cpp:361)
30  org.pgadmin.pgAdmin4          	0x00000001013c6dd1 BrowserWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 369 (moc_BrowserWindow.cpp:140)
31  org.qt-project.QtCore         	0x00000001024722e2 QMetaObject::activate(QObject*, int, int, void**) + 2994
32  org.qt-project.QtNetwork      	0x0000000104f0c57c QNetworkReply::downloadProgress(long long, long long) + 76
33  org.qt-project.QtNetwork      	0x0000000104e7d806 QNetworkReplyHttpImplPrivate::finished() + 886
34  org.qt-project.QtNetwork      	0x0000000104f0cf09 QNetworkReplyHttpImpl::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 2217
35  org.qt-project.QtCore         	0x000000010246ae93 QObject::event(QEvent*) + 755
36  org.qt-project.QtWidgets      	0x00000001015eb4bb QApplicationPrivate::notify_helper(QObject*, QEvent*) + 251
37  org.qt-project.QtWidgets      	0x00000001015ee89e QApplication::notify(QObject*, QEvent*) + 8318
38  org.qt-project.QtCore         	0x000000010244265b QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 971
39  libqcocoa.dylib               	0x000000010877491e QCocoaEventDispatcherPrivate::processPostedEvents() + 190
40  libqcocoa.dylib               	0x00000001087751a1 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 33
41  com.apple.CoreFoundation      	0x00007fff88ffe881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
42  com.apple.CoreFoundation      	0x00007fff88fddfbc __CFRunLoopDoSources0 + 556
43  com.apple.CoreFoundation      	0x00007fff88fdd4df __CFRunLoopRun + 927
44  com.apple.CoreFoundation      	0x00007fff88fdced8 CFRunLoopRunSpecific + 296
45  com.apple.HIToolbox           	0x00007fff8e43a935 RunCurrentEventLoopInMode + 235
46  com.apple.HIToolbox           	0x00007fff8e43a76f ReceiveNextEventCommon + 432
47  com.apple.HIToolbox           	0x00007fff8e43a5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
48  com.apple.AppKit              	0x00007fff930addf6 _DPSNextEvent + 1067
49  com.apple.AppKit              	0x00007fff930ad226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
50  com.apple.AppKit              	0x00007fff930a1d80 -[NSApplication run] + 682
51  libqcocoa.dylib               	0x000000010877408d QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2189
52  org.qt-project.QtCore         	0x000000010243f07d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 381
53  org.qt-project.QtCore         	0x0000000102441f5a QCoreApplication::exec() + 346
54  org.pgadmin.pgAdmin4          	0x00000001013b51fb main + 4523 (pgAdmin4.cpp:152)
55  org.pgadmin.pgAdmin4          	0x00000001013b3fd4 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib        	0x00007fff97eefefa kevent_qos + 10
1   libdispatch.dylib             	0x00007fff8fd0b165 _dispatch_mgr_invoke + 216
2   libdispatch.dylib             	0x00007fff8fd0adcd _dispatch_mgr_thread + 52

Thread 2:: com.apple.CFSocket.private
0   libsystem_kernel.dylib        	0x00007fff97eef07a __select + 10
1   com.apple.CoreFoundation      	0x00007fff8901b4fa __CFSocketManager + 762
2   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
3   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
4   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 3:: Server
0   libsystem_kernel.dylib        	0x00007fff97eef07a __select + 10
1   select.so                     	0x000000010c43c99a 0x10c43b000 + 6554
2   org.python.python             	0x0000000101489562 PyEval_EvalFrameEx + 12207
3   org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
4   org.python.python             	0x000000010148c4ae 0x101403000 + 562350
5   org.python.python             	0x000000010148930c PyEval_EvalFrameEx + 11609
6   org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
7   org.python.python             	0x000000010142b2e5 0x101403000 + 164581
8   org.python.python             	0x000000010140d202 PyObject_Call + 99
9   org.python.python             	0x0000000101417ff5 0x101403000 + 86005
10  org.python.python             	0x000000010140d202 PyObject_Call + 99
11  org.python.python             	0x0000000101488e37 PyEval_EvalFrameEx + 10372
12  org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
13  org.python.python             	0x000000010148c4ae 0x101403000 + 562350
14  org.python.python             	0x000000010148930c PyEval_EvalFrameEx + 11609
15  org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
16  org.python.python             	0x000000010148c4ae 0x101403000 + 562350
17  org.python.python             	0x000000010148930c PyEval_EvalFrameEx + 11609
18  org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
19  org.python.python             	0x000000010142b2e5 0x101403000 + 164581
20  org.python.python             	0x000000010140d202 PyObject_Call + 99
21  org.python.python             	0x00000001014894ac PyEval_EvalFrameEx + 12025
22  org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
23  org.python.python             	0x000000010148c4ae 0x101403000 + 562350
24  org.python.python             	0x000000010148930c PyEval_EvalFrameEx + 11609
25  org.python.python             	0x00000001014863c1 PyEval_EvalCodeEx + 1583
26  org.python.python             	0x0000000101485d8c PyEval_EvalCode + 54
27  org.python.python             	0x00000001014a5a42 0x101403000 + 666178
28  org.python.python             	0x00000001014a5ae5 PyRun_FileExFlags + 133
29  org.python.python             	0x00000001014a5634 PyRun_SimpleFileExFlags + 698
30  org.pgadmin.pgAdmin4          	0x00000001013c2ff8 Server::run() + 840 (Server.cpp:238)
31  org.qt-project.QtCore         	0x0000000102296d93 QThreadPrivate::start(void*) + 339
32  libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
33  libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
34  libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 4:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	0x00007fff97ee8f72 mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff97ee83b3 mach_msg + 55
2   com.apple.CoreFoundation      	0x00007fff88fde1c4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation      	0x00007fff88fdd68c __CFRunLoopRun + 1356
4   com.apple.CoreFoundation      	0x00007fff88fdced8 CFRunLoopRunSpecific + 296
5   com.apple.AppKit              	0x00007fff93203d95 _NSEventThread + 149
6   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
7   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
8   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 5:: Qt bearer thread
0   libsystem_kernel.dylib        	0x00007fff97eeed3e __pselect + 10
1   libsystem_kernel.dylib        	0x00007fff97eec274 pselect$1050 + 82
2   org.qt-project.QtCore         	0x0000000102490398 qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) + 104
3   org.qt-project.QtCore         	0x0000000102491450 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) + 672
4   org.qt-project.QtCore         	0x000000010249251a QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 234
5   org.qt-project.QtCore         	0x000000010243f07d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 381
6   org.qt-project.QtCore         	0x0000000102293245 QThread::exec() + 117
7   org.qt-project.QtCore         	0x0000000102296d93 QThreadPrivate::start(void*) + 339
8   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
9   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
10  libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 6:: JavaScriptCore::BlockFree
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103c88667 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 119
3   org.qt-project.QtWebKit       	0x0000000103998085 JSC::BlockAllocator::blockFreeingThreadMain() + 117
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 7:: JavaScriptCore::Marking
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103998fa7 JSC::GCThread::waitForNextPhase() + 119
3   org.qt-project.QtWebKit       	0x0000000103999038 JSC::GCThread::gcThreadMain() + 88
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 8:: JavaScriptCore::Marking
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103998fa7 JSC::GCThread::waitForNextPhase() + 119
3   org.qt-project.QtWebKit       	0x0000000103999038 JSC::GCThread::gcThreadMain() + 88
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 9:: JavaScriptCore::Marking
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103998fa7 JSC::GCThread::waitForNextPhase() + 119
3   org.qt-project.QtWebKit       	0x0000000103999038 JSC::GCThread::gcThreadMain() + 88
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 10:: JavaScriptCore::Marking
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103998fa7 JSC::GCThread::waitForNextPhase() + 119
3   org.qt-project.QtWebKit       	0x0000000103999038 JSC::GCThread::gcThreadMain() + 88
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 11:: JavaScriptCore::Marking
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103998fa7 JSC::GCThread::waitForNextPhase() + 119
3   org.qt-project.QtWebKit       	0x0000000103999038 JSC::GCThread::gcThreadMain() + 88
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 12:: JavaScriptCore::Marking
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtWebKit       	0x0000000103998fa7 JSC::GCThread::waitForNextPhase() + 119
3   org.qt-project.QtWebKit       	0x0000000103999038 JSC::GCThread::gcThreadMain() + 88
4   org.qt-project.QtWebKit       	0x0000000103c8776f WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
6   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
7   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 13:: Qt HTTP thread
0   libsystem_kernel.dylib        	0x00007fff97eeed3e __pselect + 10
1   libsystem_kernel.dylib        	0x00007fff97eec274 pselect$1050 + 82
2   org.qt-project.QtCore         	0x0000000102490398 qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) + 104
3   org.qt-project.QtCore         	0x0000000102491450 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) + 672
4   org.qt-project.QtCore         	0x000000010249251a QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 234
5   org.qt-project.QtCore         	0x000000010243f07d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 381
6   org.qt-project.QtCore         	0x0000000102293245 QThread::exec() + 117
7   org.qt-project.QtCore         	0x0000000102296d93 QThreadPrivate::start(void*) + 339
8   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
9   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
10  libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 14:: Qt HTTP thread
0   libsystem_kernel.dylib        	0x00007fff97eeed3e __pselect + 10
1   libsystem_kernel.dylib        	0x00007fff97eec274 pselect$1050 + 82
2   org.qt-project.QtCore         	0x0000000102490398 qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) + 104
3   org.qt-project.QtCore         	0x0000000102491450 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) + 672
4   org.qt-project.QtCore         	0x000000010249251a QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 234
5   org.qt-project.QtCore         	0x000000010243f07d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 381
6   org.qt-project.QtCore         	0x0000000102293245 QThread::exec() + 117
7   org.qt-project.QtCore         	0x0000000102296d93 QThreadPrivate::start(void*) + 339
8   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
9   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
10  libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 15:
0   libsystem_kernel.dylib        	0x00007fff97eef5e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff91ad7578 _pthread_wqthread + 1283
2   libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 16:: Dispatch queue: com.apple.root.default-qos
0   libsystem_kernel.dylib        	0x00007fff97ee8f72 mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff97ee83b3 mach_msg + 55
2   com.apple.CoreFoundation      	0x00007fff88fde1c4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation      	0x00007fff88fdd68c __CFRunLoopRun + 1356
4   com.apple.CoreFoundation      	0x00007fff88fdced8 CFRunLoopRunSpecific + 296
5   com.apple.Foundation          	0x00007fff94fb1ed9 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 270
6   com.apple.AppKit              	0x00007fff931f7d72 -[NSAnimation(NSInternal) _runBlocking] + 398
7   com.apple.AppKit              	0x00007fff931f7bcb -[NSAnimation(NSInternal) _animationThread] + 66
8   libdispatch.dylib             	0x00007fff8fd1093d _dispatch_call_block_and_release + 12
9   libdispatch.dylib             	0x00007fff8fd0540b _dispatch_client_callout + 8
10  libdispatch.dylib             	0x00007fff8fd0929b _dispatch_root_queue_drain + 1890
11  libdispatch.dylib             	0x00007fff8fd08b00 _dispatch_worker_thread3 + 91
12  libsystem_pthread.dylib       	0x00007fff91ad74de _pthread_wqthread + 1129
13  libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 17:
0   libsystem_kernel.dylib        	0x00007fff97eef5e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff91ad7578 _pthread_wqthread + 1283
2   libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 18:
0   libsystem_kernel.dylib        	0x00007fff97eef5e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff91ad7578 _pthread_wqthread + 1283
2   libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 19:: Thread (pooled)
0   libsystem_kernel.dylib        	0x00007fff97eeedb6 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff91ad8728 _pthread_cond_wait + 767
2   org.qt-project.QtCore         	0x00000001022985c0 QWaitConditionPrivate::wait_relative(unsigned long) + 288
3   org.qt-project.QtCore         	0x00000001022983fb QWaitConditionPrivate::wait(unsigned long) + 43
4   org.qt-project.QtCore         	0x00000001022982d2 QWaitCondition::wait(QMutex*, unsigned long) + 162
5   org.qt-project.QtCore         	0x0000000102293ace QThreadPoolThread::run() + 590
6   org.qt-project.QtCore         	0x0000000102296d93 QThreadPrivate::start(void*) + 339
7   libsystem_pthread.dylib       	0x00007fff91ad799d _pthread_body + 131
8   libsystem_pthread.dylib       	0x00007fff91ad791a _pthread_start + 168
9   libsystem_pthread.dylib       	0x00007fff91ad5351 thread_start + 13

Thread 20:: Dispatch queue: NSCGSDisableUpdates
0   libsystem_kernel.dylib        	0x00007fff97ee8f72 mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff97ee83b3 mach_msg + 55
2   com.apple.CoreGraphics        	0x00007fff91c72163 _CGSReenableUpdateForConnection + 92
3   com.apple.CoreGraphics        	0x00007fff91c71e3f CGSReenableUpdateToken + 532
4   libdispatch.dylib             	0x00007fff8fd1093d _dispatch_call_block_and_release + 12
5   libdispatch.dylib             	0x00007fff8fd0540b _dispatch_client_callout + 8
6   libdispatch.dylib             	0x00007fff8fd0a03b _dispatch_queue_drain + 754
7   libdispatch.dylib             	0x00007fff8fd10707 _dispatch_queue_invoke + 549
8   libdispatch.dylib             	0x00007fff8fd0540b _dispatch_client_callout + 8
9   libdispatch.dylib             	0x00007fff8fd0929b _dispatch_root_queue_drain + 1890
10  libdispatch.dylib             	0x00007fff8fd08b00 _dispatch_worker_thread3 + 91
11  libsystem_pthread.dylib       	0x00007fff91ad74de _pthread_wqthread + 1129
12  libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 21:
0   libsystem_kernel.dylib        	0x00007fff97eef5e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff91ad7578 _pthread_wqthread + 1283
2   libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 22:
0   libsystem_kernel.dylib        	0x00007fff97eef5e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff91ad7578 _pthread_wqthread + 1283
2   libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 23:
0   libsystem_kernel.dylib        	0x00007fff97eef5e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff91ad7578 _pthread_wqthread + 1283
2   libsystem_pthread.dylib       	0x00007fff91ad5341 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00007fff5e8507a0  rbx: 0x00007f99f02712c0  rcx: 0x0000000000000000  rdx: 0x0000000000100000
  rdi: 0x0000000000000000  rsi: 0x0000000004cb7503  rbp: 0x00007fff5e84baf0  rsp: 0x00007fff5e84bac0
   r8: 0x00000000000002a7   r9: 0x000000000000008d  r10: 0x0000000110b90000  r11: 0x0000000000000292
  r12: 0x000000000000000d  r13: 0x0000000004cb7503  r14: 0x0000000000000000  r15: 0x00007fff5e8507a0
  rip: 0x0000000101804144  rfl: 0x0000000000010206  cr2: 0x0000000000000008
  
Logical CPU:     6
Error Code:      0x00000004
Trap Number:     14


Binary Images:
       0x1013af000 -        0x1013dcfff +org.pgadmin.pgAdmin4 (1.0.0 - 1.0.0) <96430E79-1D3C-30EC-BACC-45709EA662AE> /Users/USER/*/pgAdmin4.app/Contents/MacOS/pgAdmin4
       0x101403000 -        0x1014f4ff7  org.python.python (2.7.10 - 2.7.10) <83AFAAA7-BDFA-354D-8A7A-8F40A30ACB91> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
       0x10155b000 -        0x101589ff7 +org.qt-project.QtWebKitWidgets (5.5 - 5.5.1) <1A06989E-36B5-30CB-9920-F536A7D4C93C> /Users/USER/*/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
       0x1015ba000 -        0x101acfff7 +org.qt-project.QtWidgets (5.5 - 5.5.1) <1AF6065B-6055-3DC7-B92D-AA106307735B> /Users/USER/*/QtWidgets.framework/Versions/5/QtWidgets
       0x101c8c000 -        0x102120fff +org.qt-project.QtGui (5.5 - 5.5.1) <64584329-006F-386F-B498-C7D0E5FC241E> /Users/USER/*/QtGui.framework/Versions/5/QtGui
       0x10225f000 -        0x10276eff7 +org.qt-project.QtCore (5.5 - 5.5.1) <D07C940F-8EB1-3F47-942F-6A00BCBCCD06> /Users/USER/*/QtCore.framework/Versions/5/QtCore
       0x102868000 -        0x1042d7fff +org.qt-project.QtWebKit (5.5 - 5.5.1) <E59AEE92-E38E-341A-B963-9E05AE93D357> /Users/USER/*/QtWebKit.framework/Versions/5/QtWebKit
       0x104e33000 -        0x104f50ff7 +org.qt-project.QtNetwork (5.5 - 5.5.1) <881C101B-D140-3F22-9A11-5D1D1854D3A5> /Users/USER/*/QtNetwork.framework/Versions/5/QtNetwork
       0x104fc0000 -        0x104fc4fff  com.apple.agl (3.3.1 - AGL-3.3.1) <4E401980-0F4F-33E2-A0CF-8C7CCF375F24> /System/Library/Frameworks/AGL.framework/Versions/A/AGL
       0x104fcf000 -        0x104ff1fff +org.qt-project.QtSensors (5.5 - 5.5.1) <C8E05F43-EFC0-3EC6-9BFB-F8962748475E> /Users/USER/*/QtSensors.framework/Versions/5/QtSensors
       0x105013000 -        0x105013fe7 +cl_kernels (???) <72375CDF-D5F0-40E9-8A4C-87D63E2B0386> cl_kernels
       0x105015000 -        0x105050fff +org.qt-project.QtPositioning (5.5 - 5.5.1) <3BC38E72-F104-36A2-856D-B1B3FAF80AC3> /Users/USER/*/QtPositioning.framework/Versions/5/QtPositioning
       0x105067000 -        0x10507bfff +org.qt-project.QtMultimediaWidgets (5.5 - 5.5.1) <EDEAFA0D-FE59-3B53-B470-4551DF06B990> /Users/USER/*/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets
       0x105093000 -        0x105128fff +org.qt-project.QtMultimedia (5.5 - 5.5.1) <FD73FF26-8C6B-3FE2-8EAF-AAB8D98EA31B> /Users/USER/*/QtMultimedia.framework/Versions/5/QtMultimedia
       0x105187000 -        0x1051bcfff +org.qt-project.QtPrintSupport (5.5 - 5.5.1) <9F5C686D-7C6D-327D-8D1A-DEF6977D4004> /Users/USER/*/QtPrintSupport.framework/Versions/5/QtPrintSupport
       0x1051e3000 -        0x105221fff +org.qt-project.QtOpenGL (5.5 - 5.5.1) <4BE1F8E5-6B6E-3988-A746-440D80603FB7> /Users/USER/*/QtOpenGL.framework/Versions/5/QtOpenGL
       0x10524e000 -        0x10527aff7 +org.qt-project.QtSql (5.5 - 5.5.1) <47415C7A-FFA9-3A7D-A2A7-997E634F1E85> /Users/USER/*/QtSql.framework/Versions/5/QtSql
       0x105296000 -        0x10557efff +org.qt-project.QtQuick (5.5 - 5.5.1) <F220A2F9-ED2B-387C-9BCF-FED6FE900CA5> /Users/USER/*/QtQuick.framework/Versions/5/QtQuick
       0x1056dc000 -        0x105a3aff7 +org.qt-project.QtQml (5.5 - 5.5.1) <1168D24E-E627-36D0-A8B9-12F0EB4B7005> /Users/USER/*/QtQml.framework/Versions/5/QtQml
       0x105b73000 -        0x105b89fff +org.qt-project.QtWebChannel (5.5 - 5.5.1) <3F3EB5C2-1FF0-3115-8B67-365719D4C257> /Users/USER/*/QtWebChannel.framework/Versions/5/QtWebChannel
       0x105dfa000 -        0x105dfbfff  _locale.so (94) <4394AC91-22AE-3D7D-85C4-792A4F35F3F2> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
       0x108752000 -        0x1087fafff +libqcocoa.dylib (0) <56ADBA40-C8E0-38A5-8C62-B485E4784B5D> /Users/USER/*/libqcocoa.dylib
       0x108857000 -        0x1088befff +org.qt-project.QtDBus (5.5 - 5.5.1) <245EE4C3-2FE2-3C91-92A3-F2E781973C9A> /Users/USER/*/QtDBus.framework/Versions/5/QtDBus
       0x10b691000 -        0x10b692ff7  time.so (94) <94E8BF2A-7841-32AD-8722-6B2526999CA1> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
       0x10b699000 -        0x10b69afff  cStringIO.so (94) <EC2054BE-E4CD-38B3-BBFB-4FEFB76CF1EF> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
       0x10b6a0000 -        0x10b6a2fff  _collections.so (94) <5FEB3871-0B8F-3233-876C-0E81CF581963> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
       0x10b6c9000 -        0x10b6ccfff  operator.so (94) <D60F7C86-DED4-34F8-BA1B-106E044B6F83> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
       0x10b75d000 -        0x10b761fff  itertools.so (94) <889782F7-5414-3881-BAAB-83CACDFDF0C5> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
       0x10b795000 -        0x10b796fff  _heapq.so (94) <9200023E-75BA-3F20-843C-398C3709CA88> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
       0x10b8a4000 -        0x10b8a5fff  _functools.so (94) <49B479ED-A07D-322D-9A29-AFF4CA084219> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
       0x10ba46000 -        0x10ba49ff7  strop.so (94) <44D8B4D6-D536-31EE-94EA-4F3C0FC773FA> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
       0x10bbd8000 -        0x10bbe1ff7  datetime.so (94) <94EF278A-0BE1-3990-A13B-2A5F36F64263> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so
       0x10bbeb000 -        0x10bbeefff  _struct.so (94) <0DCC6B47-A763-3AA6-82C5-B6A58073286B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
       0x10bbf5000 -        0x10bbf7fff  binascii.so (94) <9044E1C3-221F-3B79-847A-C9C3D8FEA9FD> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so
       0x10bbfc000 -        0x10bbffff7  math.so (94) <216DBA90-4498-361D-8321-B41F9A3B121C> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
       0x10bc06000 -        0x10bc07fff  _hashlib.so (94) <D6322B35-8141-3A7B-84CF-07BD4E35C938> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so
       0x10bc0d000 -        0x10bc0eff7  _random.so (94) <5A3C615E-01F8-37C2-A3F2-B1EDEB31C954> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so
       0x10bc53000 -        0x10bc5aff7  _socket.so (94) <0995C171-1F75-3087-89BE-EC0F68FB1231> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
       0x10bc65000 -        0x10bc6efff  _ssl.so (94) <027A0AA6-E941-32D2-A091-47C3A43DD846> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
       0x10bd7a000 -        0x10bd7afff  _scproxy.so (94) <07D4037C-CB1A-3850-9C0A-A29446A772CE> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so
       0x10bdff000 -        0x10be03fff  array.so (94) <C925356F-7B15-3672-BA29-430334F61FDC> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so
       0x10be0a000 -        0x10be19fff  _io.so (94) <39FEF2EC-8D20-33A6-B91F-EF7B2FAE9009> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
       0x10be2a000 -        0x10be2bfff  fcntl.so (94) <419069D5-A61F-3925-B320-EA7B9E38F44B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so
       0x10be70000 -        0x10be70fff  _bisect.so (94) <10358438-B2BC-363F-8141-91619C6E7E04> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so
       0x10bef5000 -        0x10bef7fff  zlib.so (94) <72EB0E79-95F2-316C-B49C-A259FEA56658> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so
       0x10bf3d000 -        0x10bf48fff  cPickle.so (94) <C34DAE95-E5D5-3B06-9CE1-1FAACAE18EE4> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
       0x10bf8f000 -        0x10bf8fff7 +_speedups.so (0) <27453FAA-BEF3-35D3-8869-94B27E337C58> /Users/USER/*/_speedups.so
       0x10c092000 -        0x10c0a0fff  _ctypes.so (94) <57C51BC5-542B-3E78-94AC-0AC3DDEAFE8F> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
       0x10c16c000 -        0x10c172fff +_speedups.so (0) <26823D1F-B53C-3A9B-8C59-647FD1B27BF8> /Users/USER/*/_speedups.so
       0x10c238000 -        0x10c238fff  grp.so (94) <88452F56-C511-3C40-82D7-C19307D67853> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so
       0x10c2bd000 -        0x10c2c5fff  parser.so (94) <EC869F8F-27D7-33DA-84C8-FC7177158F15> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/parser.so
       0x10c38b000 -        0x10c390ff7  pyexpat.so (94) <012BD38E-A1FC-3D33-AE5D-70AD95FBD04D> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/pyexpat.so
       0x10c398000 -        0x10c3b1fff  libexpat.1.dylib (12.40.1) <405B65BE-42E4-36FA-AA41-5B717CB3F5E7> /usr/lib/libexpat.1.dylib
       0x10c43b000 -        0x10c43dfff  select.so (94) <22170D1C-40EF-303A-8BB7-A48E783F9350> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
       0x10c4c4000 -        0x10c568fff  unicodedata.so (94) <97D831B6-2236-3045-89B1-6EC7800AEA2C> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/unicodedata.so
       0x10c56f000 -        0x10c56ffff  crypt.so (94) <5B9FE5C2-FE6D-37E9-9063-C02A0952C65C> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/crypt.so
       0x10c634000 -        0x10c638fff  _json.so (94) <8DF51919-72DB-335D-B4F5-D8B3B7A96A89> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_json.so
       0x10c7be000 -        0x10c7c3fff  _elementtree.so (94) <94BDDDE6-31A9-322F-9337-5C13D064D493> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_elementtree.so
       0x10ca09000 -        0x10ca0afff +cprocessors.so (0) <C0CAFC25-2A49-3D06-ABAD-676DAB8DE93C> /Users/USER/*/cprocessors.so
       0x10cb0e000 -        0x10cb0efff +cutils.so (0) <9D9B5DC1-A799-38BC-845B-C07221647AE1> /Users/USER/*/cutils.so
       0x10cb51000 -        0x10cb52fff +cresultproxy.so (0) <330EB1C7-1E11-3BFA-953D-D60FF36704FA> /Users/USER/*/cresultproxy.so
       0x10d196000 -        0x10d19efff  _sqlite3.so (94) <CD875191-CE19-32AC-AF7C-BD72C402179B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_sqlite3.so
       0x10d329000 -        0x10d340ff7 +_psycopg.so (0) <13C53A4A-8ACE-32D9-B7F5-53A62AD9F504> /Users/USER/*/_psycopg.so
       0x10d359000 -        0x10d376ff3 +libpq.5.dylib (0) <19D00420-85DA-385F-B69A-FA90B7B86A73> /usr/local/pgsql-9.6/lib/libpq.5.dylib
       0x10d381000 -        0x10d3c4fff +libssl.1.0.0.dylib (0) <1545C783-915F-3775-AE5D-E9E8A61232A2> /opt/local/lib/libssl.1.0.0.dylib
       0x10d3e0000 -        0x10d3f0fff +libz.1.dylib (0) <4987824D-DF1E-318D-94E9-13999F517041> /opt/local/lib/libz.1.dylib
       0x10d3f4000 -        0x10d3f5fff +_counter.so (0) <04BB73BC-C50C-358C-8044-967E5F0D456A> /Users/USER/*/_counter.so
       0x10d3f8000 -        0x10d3fdff7 +_AES.so (0) <08D3AF46-54C4-34A8-81AC-8C398A91322B> /Users/USER/*/_AES.so
       0x10d400000 -        0x10d416fff +libqcorewlanbearer.dylib (0) <85AA1ED8-0EDC-3AC9-9B56-E47A5632E606> /Users/USER/*/libqcorewlanbearer.dylib
       0x10d469000 -        0x10d5ea65f +libcrypto.1.0.0.dylib (0) <6AD9015F-E432-335B-9CA5-F8F43F618568> /opt/local/lib/libcrypto.1.0.0.dylib
       0x10d8a0000 -        0x10d8a9fff +libqgenericbearer.dylib (0) <95F094F6-75F7-368D-B1F3-3D6D83653113> /Users/USER/*/libqgenericbearer.dylib
       0x10d8bf000 -        0x10d8c1fff  _csv.so (94) <B82BFF9C-B641-3476-A06C-F60106DB7C1E> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_csv.so
       0x10e3c1000 -        0x10e3c8ff7 +libqgif.dylib (0) <E95776B6-59F4-335C-AC4C-020CF2304BDA> /Users/USER/*/libqgif.dylib
       0x10e4cf000 -        0x10e4d9ff7 +libqdds.dylib (0) <1C842A8F-5356-37EF-965C-D52058AEE8C6> /Users/USER/*/libqdds.dylib
       0x10e4de000 -        0x10e4e6fff +libqicns.dylib (0) <66B4CECB-D468-3C5F-A419-83B3715E498A> /Users/USER/*/libqicns.dylib
       0x10e4ec000 -        0x10e4f2ff7 +libqico.dylib (0) <F2C8D3FB-3F4F-3ECA-B89B-D712FDCD6081> /Users/USER/*/libqico.dylib
       0x10e4f7000 -        0x10e4fcff7 +libqsvg.dylib (0) <A8036103-105D-392F-A096-7A5177535CE3> /Users/USER/*/libqsvg.dylib
       0x10e501000 -        0x10e505ff7 +libqtga.dylib (0) <3614C65E-0566-31A3-A869-176E4E950099> /Users/USER/*/libqtga.dylib
       0x10e651000 -        0x10e6d8fff +libqjp2.dylib (0) <6B1F1E04-C0E5-3B0B-89A8-77A616052D9B> /Users/USER/*/libqjp2.dylib
       0x10e6f0000 -        0x10e72efff +libqjpeg.dylib (0) <970EDD5A-AE16-3F42-BBB3-34E9E221E752> /Users/USER/*/libqjpeg.dylib
       0x10e738000 -        0x10e788ff7 +libqmng.dylib (0) <41A11D2B-EDFD-3EAA-BB25-8E817935D375> /Users/USER/*/libqmng.dylib
       0x10e799000 -        0x10e7d4ff7 +org.qt-project.QtSvg (5.5 - 5.5.1) <DDB873A1-0BC0-3D91-BCB9-3F145A03FA94> /Users/USER/*/QtSvg.framework/Versions/5/QtSvg
       0x10e7f4000 -        0x10e856ff7 +libqtiff.dylib (0) <7AA0F0F1-C6F4-394D-8FBC-B20F0288F31D> /Users/USER/*/libqtiff.dylib
       0x10e864000 -        0x10e868ff7 +libqwbmp.dylib (0) <2316A2D2-74D5-3C34-A8D2-FE5E464B93CF> /Users/USER/*/libqwbmp.dylib
       0x10e86d000 -        0x10e8ccfff +libqwebp.dylib (0) <FF105B6E-760B-35BD-8732-B2534C1DE0BF> /Users/USER/*/libqwebp.dylib
       0x10e920000 -        0x10e925ff7 +libqtsensors_generic.dylib (0) <19BB4F7F-0027-3040-AA43-58A01FE411EF> /Users/USER/*/libqtsensors_generic.dylib
       0x10fe2c000 -        0x10ff2ffff  com.apple.GeForceMTLDriver (10.10.10 - 10.1.0) <C89D6A35-845F-30C9-96F5-8375D91E527B> /System/Library/Extensions/GeForceMTLDriver.bundle/Contents/MacOS/GeForceMTLDriver
       0x10ff72000 -        0x10ffd8ff7  com.apple.driver.AppleIntelHD5000GraphicsMTLDriver (10.14.66 - 10.1.4) <48A178A3-AA09-3B6C-AA4F-5BFA4145DE58> /System/Library/Extensions/AppleIntelHD5000GraphicsMTLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsMTLDriver
       0x1110a4000 -        0x1110a8fff  libFontRegistryUI.dylib (155.2) <8346E80E-5832-3944-A750-FBB9D328C2FE> /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Resources/libFontRegistryUI.dylib
       0x123230000 -        0x123231fff  com.apple.DefaultBrowser.PlugIn (601 - 601.6.11) <E5502943-2DE8-3950-8EF9-90B7E66F0459> /Library/Internet Plug-Ins/Default Browser.plugin/Contents/MacOS/Default Browser
       0x123910000 -        0x123913ff7 +com.callinfo.libWebMeetingPlugin (2.10.0-1c5cf7e) <92F2BF04-8431-39F6-B00F-BE20CC85B58B> /Users/USER/Library/Internet Plug-Ins/WebMeetingPlugin.bundle/Contents/MacOS/libWebMeetingPlugin
       0x1248d2000 -        0x1248d5ff7 +com.macromedia.Flash Player.plugin (22.0.0.192 - 22.0.0.192) <EB74982F-3556-3F05-9820-2435E35E1A3C> /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player
       0x124a62000 -        0x124a66fff  com.apple.JavaVM (15.0.1 - 15.0.1) <E1978FE9-F54C-332B-9B00-E96CD0E6F268> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
       0x124c02000 -        0x124c06fff +com.citrixonline.mac.WebDeploymentPlugin (1.0.105 - 105) <DA208660-07E0-760A-2195-0095B15F5EA7> /Users/USER/Library/Internet Plug-Ins/CitrixOnlineWebDeploymentPlugin.plugin/Contents/MacOS/CitrixOnlineWebDeploymentPlugin
       0x124d42000 -        0x124d46fff  JavaLaunching (42) <7AFDCF93-F07D-38FA-B259-B7B9D10579D8> /System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching
       0x12660b000 -        0x12689cff7  com.apple.RawCamera.bundle (6.20 - 856) <C66E7CF9-0352-3A5A-AD2B-DE16136EA6B1> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
       0x1281d0000 -        0x1281d7fff  com.apple.QuartzComposer.webplugin (1.4 - 34) <73B57B28-766C-3CD6-A075-339CE09D639F> /Library/Internet Plug-Ins/Quartz Composer.webplugin/Contents/MacOS/Quartz Composer
       0x129090000 -        0x12909afff +libjli.dylib (1) <842B8566-51A8-3842-9307-96BEC9966B8C> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib
       0x1291f0000 -        0x1291f8fff  JavaNativeFoundation (74) <CA27E60D-3E7D-3B94-BA0F-2E7DBD5255C7> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
       0x12a181000 -        0x12a1a3fff +com.cisco_webex.plugin.gpc64 (1.0 - 1.0.0.205) <C18DA493-C095-3438-8832-1C797BD8D9A9> /Users/USER/Library/Internet Plug-Ins/WebEx64.plugin/Contents/MacOS/WebEx64
       0x12a1c0000 -        0x12a1dbfff  com.apple.security.csparser (3.0 - 57337.50.23) <9597AF09-10B0-3C27-8350-439ED6C797BA> /System/Library/Frameworks/Security.framework/PlugIns/csparser.bundle/Contents/MacOS/csparser
       0x12a650000 -        0x12a67ffdf +com.google.o1dbrowserplugin (5.41.3.0 - 5.41.3.0) <3AB1C8AB-D74E-3654-943C-254E8FE41E45> /Library/Internet Plug-Ins/o1dbrowserplugin.plugin/Contents/MacOS/o1dbrowserplugin
       0x12a689000 -        0x12a6adff7 +com.logitech.harmony.LogitechHarmony (2.0 - 2.0) <FC9A2529-E31C-37E0-BB6B-2EFFA1F15ED6> /Library/Internet Plug-Ins/LogitechHarmony.plugin/Contents/MacOS/LogitechHarmony
       0x12a757000 -        0x12a78ffff +libSDE.dylib (1) <9985A7BB-7BD2-3D78-AF7F-E8C6CA88FBF6> /Library/Internet Plug-Ins/LogitechHarmony.plugin/Contents/MacOS/libSDE.dylib
       0x12a7d2000 -        0x12a803fff +libUsbDevice.dylib (1) <89269D1C-D734-3940-8511-1256B39F7444> /Library/Internet Plug-Ins/LogitechHarmony.plugin/Contents/MacOS/libUsbDevice.dylib
       0x12a837000 -        0x12a851ff7 +com.oracle.java.JavaAppletPlugin (Java 8 Update 60 build 27 - 1.8.60.27) <49599FFA-3B2E-3F60-9E75-FB45C0A27D2E> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/MacOS/JavaAppletPlugin
       0x12a868000 -        0x12a883fff +libdeploy.dylib (0) <98B0536F-0A17-3484-BF6A-1D543E328EE3> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/libdeploy.dylib
       0x12a8b2000 -        0x12a8d5fff +org.andymatuschak.Sparkle (1.5 Beta [git] - 1.5) <8F8A8AC9-2A14-3B2B-97BA-FEB3A3E8BE88> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Frameworks/Sparkle.framework/Versions/A/Sparkle
       0x12a8f4000 -        0x12a93afd7 +com.google.googletalkbrowserplugin (5.41.3.0 - 5.41.3.0) <A662F74D-BD85-303B-A077-9696657E57D9> /Library/Internet Plug-Ins/googletalkbrowserplugin.plugin/Contents/MacOS/googletalkbrowserplugin
       0x12c10b000 -        0x12d8a6937 +com.macromedia.FlashPlayer-10.6.plugin (22.0.0.192 - 22.0.0.192) <15EE0905-9E84-3D12-BE0D-2A6A074F834E> /Library/Internet Plug-Ins/Flash Player.plugin/Contents/PlugIns/FlashPlayer-10.6.plugin/Contents/MacOS/FlashPlayer-10.6
       0x12edd0000 -        0x12ede7ff7 +libqavfmediaplayer.dylib (0) <BF4E7873-5BF8-34C6-8A1C-E781E8D0F8A3> /Users/USER/*/libqavfmediaplayer.dylib
    0x7fff63f82000 -     0x7fff63fb925f  dyld (360.22) <A468D85E-D8D6-3461-8C99-49D3B9ACFC63> /usr/lib/dyld
    0x7fff865c4000 -     0x7fff86659fff  com.apple.ink.framework (10.9 - 214) <1F76CF36-3F79-36B8-BC37-C540AF34B338> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
    0x7fff8665a000 -     0x7fff86665ff7  libcommonCrypto.dylib (60075.50.1) <93732261-34B4-3914-B7A2-90A81A182DBA> /usr/lib/system/libcommonCrypto.dylib
    0x7fff86666000 -     0x7fff8694bffb  com.apple.CoreServices.CarbonCore (1136.2 - 1136.2) <2DBAFC9A-6CD6-351D-B1F4-87D81AA6D640> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
    0x7fff8694c000 -     0x7fff869f7fff  com.apple.PDFKit (3.1 - 3.1) <27AF3C85-1C0B-389C-856C-2E527620C195> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/Versions/A/PDFKit
    0x7fff869f8000 -     0x7fff86a0bfff  com.apple.CoreBluetooth (1.0 - 1) <E54CA9A2-A5C6-30C5-9D6E-8472DBA9371E> /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth
    0x7fff86a35000 -     0x7fff86b5afff  com.apple.LaunchServices (728.12 - 728.12) <F5AB56CD-CF33-33F0-A48D-372551714E77> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
    0x7fff86b5b000 -     0x7fff86f89fff  com.apple.vision.FaceCore (3.3.1 - 3.3.1) <E54028EA-4217-3078-A2B1-C52E4214D59E> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
    0x7fff86f8a000 -     0x7fff86fb3fff  com.apple.ProtectedCloudStorage (1.0 - 1) <7436B2B3-943A-3500-B099-80F133B3E002> /System/Library/PrivateFrameworks/ProtectedCloudStorage.framework/Versions/A/ProtectedCloudStorage
    0x7fff86fb4000 -     0x7fff86fc2fff  libxar.1.dylib (302) <03207F66-2C4A-3DBD-8D81-70F4C85903C4> /usr/lib/libxar.1.dylib
    0x7fff86fec000 -     0x7fff87110fff  libsqlite3.dylib (216.4) <280D67B8-F93D-3587-A146-19F36C817548> /usr/lib/libsqlite3.dylib
    0x7fff87970000 -     0x7fff8799bffb  libarchive.2.dylib (33.20.2) <6C370A21-63FD-3A68-B4B3-5333F24B770B> /usr/lib/libarchive.2.dylib
    0x7fff879c3000 -     0x7fff879ccfff  com.apple.icloud.FindMyDevice (1.0 - 1) <B9C741F2-6FAC-3BA7-B6E0-9A910C6E8D4E> /System/Library/PrivateFrameworks/FindMyDevice.framework/Versions/A/FindMyDevice
    0x7fff879cd000 -     0x7fff879fbff7  com.apple.CoreServicesInternal (248.2 - 248.2) <6E111F0A-D7F1-3738-ADE7-CF983BD4EC8B> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
    0x7fff879ff000 -     0x7fff87a00ff3  com.apple.print.framework.Print (10.0 - 266) <3E85F70C-D7D4-34E1-B88A-C1F503F99CDA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
    0x7fff87f03000 -     0x7fff87f3dfff  com.apple.QD (3.12 - 302) <0FE53180-2895-3D14-A1E7-F82DE1D106E1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
    0x7fff87f4e000 -     0x7fff880ccfff  com.apple.UIFoundation (1.0 - 436.1) <AABB5267-E7B7-3D75-B051-E665BDA8DEF4> /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation
    0x7fff880dd000 -     0x7fff88635ff7  com.apple.MediaToolbox (1.0 - 1731.15.204) <BD296DBD-BEC9-3B25-B859-E88A009BB879> /System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox
    0x7fff88636000 -     0x7fff88651ff7  libCRFSuite.dylib (34) <078B4CD8-6A8C-3067-B2BA-0C2A0BAB8AC3> /usr/lib/libCRFSuite.dylib
    0x7fff8866f000 -     0x7fff8867afff  libGL.dylib (12.1) <70D51643-04AC-3400-8F11-A6FC25985289> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
    0x7fff88688000 -     0x7fff888f5fff  com.apple.imageKit (2.6 - 932) <FAE317B8-DF15-3096-AFAC-464913BF2F3B> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/ImageKit
    0x7fff88ab1000 -     0x7fff88ab2ffb  libremovefile.dylib (41) <552EF39E-14D7-363E-9059-4565AC2F894E> /usr/lib/system/libremovefile.dylib
    0x7fff88ab3000 -     0x7fff88f4effb  com.apple.GeoServices (1.0 - 1151.49.1) <2D887517-B73D-30FF-91DC-AF6AD91F96B9> /System/Library/PrivateFrameworks/GeoServices.framework/Versions/A/GeoServices
    0x7fff88f54000 -     0x7fff893cafff  com.apple.CoreFoundation (6.9 - 1258.1) <943A1383-DA6A-3DC0-ABCD-D9AEB3D0D34D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff894f7000 -     0x7fff89507ff3  com.apple.ProtocolBuffer (1 - 243) <BAE5E5C9-DD59-3BB8-9741-EEFC5E3046EE> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer
    0x7fff89aec000 -     0x7fff89b06ff3  liblzma.5.dylib (10) <CC03591B-FA57-3CA5-AC81-0D76033AC0CE> /usr/lib/liblzma.5.dylib
    0x7fff89b07000 -     0x7fff89b07fff  com.apple.Accelerate.vecLib (3.10 - vecLib 3.10) <054DFE32-737D-3211-9A14-0FC5E1A880E3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
    0x7fff89b08000 -     0x7fff89b24ff7  libsystem_malloc.dylib (67.40.1) <5748E8B2-F81C-34C6-8B13-456213127678> /usr/lib/system/libsystem_malloc.dylib
    0x7fff89cc4000 -     0x7fff89cc7ff7  libCoreFSCache.dylib (119.5) <2389D7DA-B8EF-3EB4-AAAF-FBEDE01CDECA> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
    0x7fff89e60000 -     0x7fff89eafff7  com.apple.opencl (2.7.0 - 2.7.0) <C3AFF6D2-90FE-3108-A2D5-A1EBCFC5D627> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
    0x7fff89eb0000 -     0x7fff89f25fff  com.apple.framework.IOKit (2.0.2 - 1179.50.2) <A509D3AE-9D48-31B7-89C7-326A7A2007B2> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x7fff89f26000 -     0x7fff8a082ff3  com.apple.WebKitLegacy (11601 - 11601.6.17) <3F9A3DDF-AA37-388E-8C96-CFF86DB0D16E> /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy
    0x7fff8a088000 -     0x7fff8a0b3ff7  com.apple.AddressBook.ContactsFoundation (8.0 - 2137.1) <BAE70E9D-BCC8-3650-B554-6D646388EDEF> /System/Library/PrivateFrameworks/ContactsFoundation.framework/Versions/A/ContactsFoundation
    0x7fff8a0b4000 -     0x7fff8a0baff7  com.apple.speech.recognition.framework (5.1.1 - 5.1.1) <9E5A980A-F455-32D5-BBEE-3BD6018CC45E> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
    0x7fff8a123000 -     0x7fff8a140ff7  com.apple.AppleVPAFramework (2.1.2 - 2.1.2) <41378C0B-B56A-3A73-9BD0-E06FA1F87B8C> /System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA
    0x7fff8a15a000 -     0x7fff8a268ff3  com.apple.desktopservices (1.10.3 - 1.10.3) <3A6906D4-C0B8-30D1-B589-0466E5E42B69> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
    0x7fff8a269000 -     0x7fff8a5fefdb  com.apple.vImage (8.0 - 8.0) <4BAC9B6F-7482-3580-8787-AB0A5B4D331B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
    0x7fff8a619000 -     0x7fff8a632fff  com.apple.openscripting (1.7.1 - 169.1) <36EBF6A7-334A-3197-838F-E8C7B27FCDBB> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
    0x7fff8a633000 -     0x7fff8a634fff  libDiagnosticMessagesClient.dylib (100) <4243B6B4-21E9-355B-9C5A-95A216233B96> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff8a635000 -     0x7fff8b722ffb  com.apple.WebCore (11601 - 11601.6.17) <A715DA96-B504-36A3-88DD-13485DE8BA2D> /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore
    0x7fff8b728000 -     0x7fff8b736fff  com.apple.ToneLibrary (1.0 - 1) <AF05AF34-9BC4-3BA6-81C1-7420F22C9D7D> /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/ToneLibrary
    0x7fff8b74c000 -     0x7fff8b79dff7  libcups.2.dylib (435.2) <91584A40-214D-33E8-A613-CE22289037C8> /usr/lib/libcups.2.dylib
    0x7fff8b7ab000 -     0x7fff8b7abfff  com.apple.CoreServices (728.12 - 728.12) <A4FFF004-53B0-3EAC-A13F-5416BFFD8886> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x7fff8b7ac000 -     0x7fff8b7acfff  libenergytrace.dylib (10.40.1) <0A491CA7-3451-3FD5-999A-58AB4362682B> /usr/lib/libenergytrace.dylib
    0x7fff8b7e0000 -     0x7fff8b7efffb  com.apple.LangAnalysis (1.7.0 - 1.7.0) <18D21123-A3E7-3851-974A-08E5D4540475> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
    0x7fff8b7f0000 -     0x7fff8bbecfff  libLAPACK.dylib (1162.2) <987E42B0-5108-3065-87F0-9DF7616A8A06> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
    0x7fff8be2a000 -     0x7fff8be3bff7  libz.1.dylib (61.20.1) <B3EBB42F-48E3-3287-9F0D-308E04D407AC> /usr/lib/libz.1.dylib
    0x7fff8be3c000 -     0x7fff8be3ffff  com.apple.Mangrove (1.0 - 1) <2D86B3AD-64C3-3BB4-BC66-1CFD0C90E844> /System/Library/PrivateFrameworks/Mangrove.framework/Versions/A/Mangrove
    0x7fff8be40000 -     0x7fff8be82ff7  com.apple.Metal (56.6 - 56.6) <2B2C0F78-20B8-3878-B9B1-DE18BB92919D> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
    0x7fff8bf2a000 -     0x7fff8c000ffb  com.apple.DiskImagesFramework (10.11.4 - 417.4) <6D26E255-D7BB-3A9D-8B6F-E07D2DBB68AE> /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/DiskImages
    0x7fff8c001000 -     0x7fff8c2a7ff7  com.apple.CoreData (120 - 641.3) <A29A5491-6169-372B-828F-84EE0CFD4BC4> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x7fff8cb2b000 -     0x7fff8cb7dfff  com.apple.ImageCaptureCore (7.0 - 7.0) <9F3123D8-29D2-332F-AD6B-AB9BF1A58022> /System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/ImageCaptureCore
    0x7fff8cb7e000 -     0x7fff8cd2afff  com.apple.avfoundation (2.0 - 1046.9.11) <399D8273-E3CD-3358-9B80-64E6A5CBE278> /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation
    0x7fff8cdbe000 -     0x7fff8cdc9fff  com.apple.DirectoryService.Framework (10.11 - 194) <6F827D0E-0F02-3B09-B2A8-252865EECA7F> /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService
    0x7fff8ce6b000 -     0x7fff8d1cdf3f  libobjc.A.dylib (680) <7489D2D6-1EFD-3414-B18D-2AECCCC90286> /usr/lib/libobjc.A.dylib
    0x7fff8d1ce000 -     0x7fff8d1dafff  com.apple.SpeechRecognitionCore (2.2.7 - 2.2.7) <6BA06290-D4A3-351C-87F9-B61EF61FF055> /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
    0x7fff8d1db000 -     0x7fff8d2cdff7  libiconv.2.dylib (44) <F05A0A5A-92A9-3668-8F20-F27CBDA26BE9> /usr/lib/libiconv.2.dylib
    0x7fff8d2d2000 -     0x7fff8d51eff7  com.apple.AddressBook.framework (9.0 - 1679.10) <24F823D3-C3FC-3AF9-B8B3-C166539DBD11> /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook
    0x7fff8d51f000 -     0x7fff8d54dff7  libsandbox.1.dylib (460.50.4) <C6797DA3-DF51-3774-9D02-31670A820D18> /usr/lib/libsandbox.1.dylib
    0x7fff8d54e000 -     0x7fff8d551fff  com.apple.IOSurface (108.2.1 - 108.2.1) <A0037B0A-277A-393E-9BF6-688595BD564D> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
    0x7fff8d552000 -     0x7fff8d5bdff7  com.apple.framework.CoreWLAN (11.0 - 1101.20) <3B35C543-7FCE-333F-80C1-432FA41DDCDE> /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
    0x7fff8d764000 -     0x7fff8d772fff  com.apple.IntlPreferences (2.0 - 192) <A170BA4F-D39C-378C-99B5-CCB7C4F154C1> /System/Library/PrivateFrameworks/IntlPreferences.framework/Versions/A/IntlPreferences
    0x7fff8d773000 -     0x7fff8d781ff7  libbz2.1.0.dylib (38) <28E54258-C0FE-38D4-AB76-1734CACCB344> /usr/lib/libbz2.1.0.dylib
    0x7fff8d782000 -     0x7fff8d7e5fff  libAVFAudio.dylib (161.2) <1A98DBF3-490B-37FB-928A-AB1E36E6E5DD> /System/Library/Frameworks/AVFoundation.framework/Versions/A/Resources/libAVFAudio.dylib
    0x7fff8d850000 -     0x7fff8d850fff  com.apple.ApplicationServices (48 - 48) <ADD57D3A-142F-3EF5-BFD8-EACD82164884> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
    0x7fff8d85d000 -     0x7fff8d8eadd7  com.apple.AppleJPEG (1.0 - 1) <558ACADA-C41F-3EEF-82A0-C2D7B13C5428> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
    0x7fff8d940000 -     0x7fff8d941ff7  libodfde.dylib (23) <F84CB160-D638-3190-B6F5-A262E9AF09F6> /usr/lib/libodfde.dylib
    0x7fff8d9a5000 -     0x7fff8d9affff  com.apple.NetAuth (6.0 - 6.0) <D692B1EF-534F-3892-8E2F-2BBA7C8AFD74> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x7fff8e407000 -     0x7fff8e407ff7  libkeymgr.dylib (28) <8371CE54-5FDD-3CE9-B3DF-E98C761B6FE0> /usr/lib/system/libkeymgr.dylib
    0x7fff8e40a000 -     0x7fff8e6fffff  com.apple.HIToolbox (2.1.1 - 807.2) <36413C45-36AF-34EF-9C0E-F18B31D1E565> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
    0x7fff8e725000 -     0x7fff8e771fff  com.apple.print.framework.PrintCore (11.2 - 472.2) <5AE8AA6B-CE09-397D-B0D4-0F9CCBF1F77D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
    0x7fff8e7b7000 -     0x7fff8e809fff  com.apple.AppleVAFramework (5.0.32 - 5.0.32) <271ED7A9-73E5-3595-A8D6-28594C9F3C9D> /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA
    0x7fff8e98b000 -     0x7fff8e993ffb  libsystem_dnssd.dylib (625.50.5) <4D10E12B-59B5-386F-82DA-326F18028F0A> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff8e9d6000 -     0x7fff8e9d8fff  com.apple.EFILogin (2.0 - 2) <38150198-DD7F-3C73-BCAA-C74BB376393A> /System/Library/PrivateFrameworks/EFILogin.framework/Versions/A/EFILogin
    0x7fff8ea3b000 -     0x7fff8ea80ff7  com.apple.coreservices.SharedFileList (24.4 - 24.5) <1D2AD77B-778F-3253-A295-3D0A32A8121C> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
    0x7fff8ecd8000 -     0x7fff8ecfcfff  com.apple.quartzfilters (1.10.0 - 1.10.0) <F5C482E2-5AFB-3959-8C01-C149D48E7583> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters.framework/Versions/A/QuartzFilters
    0x7fff8ee9e000 -     0x7fff8eeb3fff  com.apple.AppContainer (4.0 - 261.40.2) <F220E702-1C00-3BD2-9943-C7E75C3B4418> /System/Library/PrivateFrameworks/AppContainer.framework/Versions/A/AppContainer
    0x7fff8eeb4000 -     0x7fff8eeb6fff  com.apple.CoreDuetDebugLogging (1.0 - 1) <7C932160-AC9C-3173-900F-98138E829CB3> /System/Library/PrivateFrameworks/CoreDuetDebugLogging.framework/Versions/A/CoreDuetDebugLogging
    0x7fff8eeb7000 -     0x7fff8eeb9ff7  com.apple.SafariServices.framework (11601 - 11601.6.17) <98035563-BCB5-3BCA-A519-FB27B4F02998> /System/Library/PrivateFrameworks/SafariServices.framework/Versions/A/SafariServices
    0x7fff8eeba000 -     0x7fff8eebbffb  libSystem.B.dylib (1226.10.1) <C5D09FE1-CC70-383E-AC27-18602F2EDEC4> /usr/lib/libSystem.B.dylib
    0x7fff8ef34000 -     0x7fff8ef90fff  com.apple.Suggestions (5.0 - 180) <450BCB58-786F-37DC-9AC7-2E3D13198032> /System/Library/PrivateFrameworks/Suggestions.framework/Versions/A/Suggestions
    0x7fff8efd4000 -     0x7fff8f008ff7  com.apple.CoreVideo (1.8 - 191.3) <1AA24A1B-CB84-3F6B-B6DE-11494542649C> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
    0x7fff8f032000 -     0x7fff8f051ff7  com.apple.contacts.vCard (1.0 - 2137.1) <41529BD9-1BCC-3A62-92BA-2A7110867355> /System/Library/PrivateFrameworks/vCard.framework/Versions/A/vCard
    0x7fff8f052000 -     0x7fff8f218fe7  com.apple.ImageIO.framework (3.3.0 - 1450) <18ABA1F4-43EC-3990-9777-C91FD3D6AF71> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    0x7fff8f219000 -     0x7fff8f309fff  libJP2.dylib (1450) <FAFF00CD-1CF6-34DE-A06F-31D4BB9C8BA9> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
    0x7fff8f30a000 -     0x7fff8f336fff  com.apple.framework.SystemAdministration (1.0 - 1.0) <1318B6A5-FFC3-3615-914D-95CBFE5BA727> /System/Library/PrivateFrameworks/SystemAdministration.framework/Versions/A/SystemAdministration
    0x7fff8f33e000 -     0x7fff8f5c5ff3  com.apple.CFNetwork (760.5.1 - 760.5.1) <EE9426D1-F11C-3DD4-AE08-EA29AEB27177> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x7fff8f5d6000 -     0x7fff8f5dafff  libpam.2.dylib (20) <CFCD19BD-87BC-3F2B-BB1C-4C23E8E55F1A> /usr/lib/libpam.2.dylib
    0x7fff8f5db000 -     0x7fff8f956ffb  com.apple.VideoToolbox (1.0 - 1731.15.204) <2B21F9B2-66A2-3900-84A5-0AB66F8056E4> /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
    0x7fff8f957000 -     0x7fff8f957fff  com.apple.Accelerate (1.10 - Accelerate 1.10) <185EC96A-5AF0-3620-A4ED-4D3654D25B39> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
    0x7fff8f95f000 -     0x7fff8f9c6fff  com.apple.framework.CoreWiFi (11.0 - 1101.20) <993592F1-B3F1-3FAD-87BD-EA83C361BCCF> /System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi
    0x7fff8f9c7000 -     0x7fff8fbd4fff  libicucore.A.dylib (551.51.3) <5BC80F94-C90D-3175-BD96-FF1DC222EC9C> /usr/lib/libicucore.A.dylib
    0x7fff8fcfe000 -     0x7fff8fd02fff  com.apple.CommonPanels (1.2.6 - 96) <4AE7E5AE-55B3-37FA-9BDE-B23147ADA2E9> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
    0x7fff8fd03000 -     0x7fff8fd30fff  libdispatch.dylib (501.40.12) <C7499857-61A5-3D7D-A5EA-65DCC8C3DF92> /usr/lib/system/libdispatch.dylib
    0x7fff8fd31000 -     0x7fff8fed7ff7  com.apple.audio.toolbox.AudioToolbox (1.13 - 1.13) <082319FC-59F2-3D36-AC9B-94759724E302> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
    0x7fff901e1000 -     0x7fff901ecff7  libChineseTokenizer.dylib (16) <79B8C67A-3061-3C78-92CD-4650719E68D4> /usr/lib/libChineseTokenizer.dylib
    0x7fff9030c000 -     0x7fff90408ff7  libFontParser.dylib (158.6) <267A9AE4-4138-3112-8D73-BDFDC96568FF> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
    0x7fff90570000 -     0x7fff90584fe3  libCGInterfaces.dylib (317.9) <5079DE4F-3717-32FF-B76A-77F53236D17D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/Libraries/libCGInterfaces.dylib
    0x7fff90585000 -     0x7fff9062cfff  com.apple.LanguageModeling (1.0 - 1) <58C18A47-BDE7-3CBE-81C0-797029D170A1> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
    0x7fff9062d000 -     0x7fff90630fff  libspindump.dylib (197.1) <48F4C673-9F0C-38BE-B550-88241E812518> /usr/lib/libspindump.dylib
    0x7fff90636000 -     0x7fff90650fff  com.apple.Kerberos (3.0 - 1) <1B4744BF-E5AE-38E2-AA56-E22D3270F2E8> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x7fff90651000 -     0x7fff90659fff  com.apple.AppleSRP (5.0 - 1) <840A5C20-6452-36BB-ACF7-29BA6CBF7C48> /System/Library/PrivateFrameworks/AppleSRP.framework/Versions/A/AppleSRP
    0x7fff9065a000 -     0x7fff90787ff3  com.apple.CoreText (352.0 - 494.11) <08E8640E-6602-3A00-BC28-94235FD311B4> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
    0x7fff90788000 -     0x7fff908d2ff7  com.apple.coreui (2.1 - 366.1) <8138636F-A0A7-31C7-896C-5F5747FA1B2A> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
    0x7fff90a07000 -     0x7fff90a63fff  libTIFF.dylib (1450) <14EB7C03-7DDA-3276-BAC5-D597913AC9C4> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    0x7fff90a8a000 -     0x7fff90b3afe7  libvMisc.dylib (563.5) <6D73C20D-D1C4-3BA5-809B-4B597C15AA86> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
    0x7fff90b3b000 -     0x7fff90b44ff7  com.apple.DisplayServicesFW (3.0 - 378) <45BE1B99-8E10-32F0-A180-A6B6CB5883AE> /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices
    0x7fff90d96000 -     0x7fff90d9efff  libMatch.1.dylib (27) <3AC0BFB8-7E69-3DBE-A175-7F3946FC4554> /usr/lib/libMatch.1.dylib
    0x7fff90daa000 -     0x7fff90df8fff  libcurl.4.dylib (90) <12E01E4B-24C9-394C-9D2C-85CF85D5F459> /usr/lib/libcurl.4.dylib
    0x7fff90e50000 -     0x7fff90e58fff  com.apple.NetFS (6.0 - 4.0) <842A5346-24C3-3F22-9ECF-E586A10EA1F2> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x7fff90f92000 -     0x7fff90f92fff  com.apple.Cocoa (6.11 - 22) <807787AB-D231-3F51-A99B-A9314623C571> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
    0x7fff9105d000 -     0x7fff91071fff  com.apple.CoreDuetDaemonProtocol (1.0 - 1) <1D60D60C-914A-3BAB-8607-79F68F4C712E> /System/Library/PrivateFrameworks/CoreDuetDaemonProtocol.framework/Versions/A/CoreDuetDaemonProtocol
    0x7fff91072000 -     0x7fff91072ff7  liblaunch.dylib (765.50.8) <834ED605-5114-3641-AA4D-ECF31B801C50> /usr/lib/system/liblaunch.dylib
    0x7fff91073000 -     0x7fff9144bfef  com.apple.CoreAUC (214.0.0 - 214.0.0) <F80C19CA-6CD0-3052-9C22-0288A257CCC8> /System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC
    0x7fff914af000 -     0x7fff914affff  libOpenScriptingUtil.dylib (169.1) <AD0DAC8A-9849-3077-999F-9AEC6112BDAB> /usr/lib/libOpenScriptingUtil.dylib
    0x7fff914b0000 -     0x7fff914e1fff  com.apple.GSS (4.0 - 2.0) <B490333A-3B3E-397A-AD75-68846E9A9140> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x7fff91503000 -     0x7fff9150bfef  libcldcpuengine.dylib (2.7.3) <511DF05F-B3A1-3810-9901-1F5C1EA278C4> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libcldcpuengine.dylib
    0x7fff9150c000 -     0x7fff9150eff7  libsystem_configuration.dylib (802.40.13) <3DEB7DF9-6804-37E1-BC83-0166882FF0FF> /usr/lib/system/libsystem_configuration.dylib
    0x7fff9150f000 -     0x7fff91517fff  libGFXShared.dylib (12.1) <5A0C2493-200C-30BE-97D5-8E8C0B8E604D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
    0x7fff91518000 -     0x7fff91627fe7  libvDSP.dylib (563.5) <9AB6CA3C-4F0E-35E6-9184-9DF86E7C3DAD> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
    0x7fff9167a000 -     0x7fff91707fff  libsystem_c.dylib (1082.50.1) <B552D565-B798-3B9B-AE63-F623B42A5F01> /usr/lib/system/libsystem_c.dylib
    0x7fff91708000 -     0x7fff91740ff7  com.apple.RemoteViewServices (2.0 - 101) <B2881449-8CFE-3D1C-B4BF-155640392533> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
    0x7fff91744000 -     0x7fff917b8ff7  com.apple.Heimdal (4.0 - 2.0) <5D365381-8B5E-3259-8867-FC4A7D307BDE> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
    0x7fff91a46000 -     0x7fff91a6fff7  libxslt.1.dylib (14.2) <6E8D0F06-9086-32D3-9D87-3870A1CE9E99> /usr/lib/libxslt.1.dylib
    0x7fff91a70000 -     0x7fff91ad0fff  com.apple.QuickLookFramework (5.0 - 696.7) <ECD33169-5EB1-3783-AF9E-1AB9240F8358> /System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook
    0x7fff91ad4000 -     0x7fff91addff7  libsystem_pthread.dylib (138.10.4) <3DD1EF4C-1D1B-3ABF-8CC6-B3B1CEEE9559> /usr/lib/system/libsystem_pthread.dylib
    0x7fff91ade000 -     0x7fff91b0dffb  libsystem_m.dylib (3105) <08E1A4B2-6448-3DFE-A58C-ACC7335BE7E4> /usr/lib/system/libsystem_m.dylib
    0x7fff91b0e000 -     0x7fff91b13fff  com.apple.TCC (1.0 - 1) <F5EEB2D3-9517-3975-97BE-22CB8E11B8A3> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
    0x7fff91c01000 -     0x7fff91c11fff  libbsm.0.dylib (34) <7E14504C-A8B0-3574-B6EB-5D5FABC72926> /usr/lib/libbsm.0.dylib
    0x7fff91c12000 -     0x7fff91c13fff  liblangid.dylib (122) <9CC4F0D1-5C51-3B69-BC8F-EE3A51FD0822> /usr/lib/liblangid.dylib
    0x7fff91c14000 -     0x7fff92e62fe7  com.apple.CoreGraphics (1.600.0 - 957) <B5D82A82-EDF9-34D5-A8C5-7F25B80985EE> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
    0x7fff92e63000 -     0x7fff92e65ff7  com.apple.xpc.ServiceManagement (1.0 - 1) <D96D7A6D-EDEB-35EE-B5D9-E33A3BF011B5> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
    0x7fff92e66000 -     0x7fff92e6bfff  com.apple.MediaAccessibility (1.0 - 79) <C5E61B45-1967-3602-A48C-31E132B998B2> /System/Library/Frameworks/MediaAccessibility.framework/Versions/A/MediaAccessibility
    0x7fff92f42000 -     0x7fff92f4efff  com.apple.CacheDelete (1.0 - 1) <678B521D-5B50-3137-A972-33F2DF1D7A5A> /System/Library/PrivateFrameworks/CacheDelete.framework/Versions/A/CacheDelete
    0x7fff92f83000 -     0x7fff92f9bfef  libcompression.dylib (28) <E7601B62-1053-369D-8A9E-91CF86239220> /usr/lib/libcompression.dylib
    0x7fff92f9c000 -     0x7fff92fc3fff  com.apple.ChunkingLibrary (167 - 167) <AD7F285C-005E-36BB-98A3-5826413533BE> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
    0x7fff92fc4000 -     0x7fff93064fff  com.apple.Metadata (10.7.0 - 972.34) <A93B485D-094C-3024-8CBB-D9E035FB83C4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
    0x7fff93065000 -     0x7fff93c8eff7  com.apple.AppKit (6.9 - 1404.47) <F3411F6E-DD87-34D0-8C68-C69B2205E41D> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7fff93c8f000 -     0x7fff93caafff  com.apple.aps.framework (4.0 - 4.0) <CAD47B6E-A581-3B35-885B-67B206F41D5E> /System/Library/PrivateFrameworks/ApplePushService.framework/Versions/A/ApplePushService
    0x7fff93cad000 -     0x7fff93cfdff7  com.apple.Symbolication (1.4 - 58044) <F70BF765-FBE9-3F1E-85CA-BB2F8E53E8C2> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
    0x7fff93cfe000 -     0x7fff93e43fff  com.apple.QTKit (7.7.3 - 2943.10) <9D0EA81D-7BDE-3B47-B300-5C53C5EE4846> /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit
    0x7fff93e9b000 -     0x7fff93ea4ff7  com.apple.CommonAuth (4.0 - 2.0) <4B8673E1-3697-3FE2-8D30-AC7AC5D4F8BF> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
    0x7fff93ea5000 -     0x7fff93f7efff  com.apple.CoreMedia (1.0 - 1731.15.204) <4BFDD68E-9411-3358-8679-BB3EDA94F9A2> /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia
    0x7fff94713000 -     0x7fff94724fff  libSparseBLAS.dylib (1162.2) <EBEB3848-3468-342A-91A6-5C47F2369CD9> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
    0x7fff947ab000 -     0x7fff947f7ffb  com.apple.HIServices (1.22 - 550) <6B76B41C-CF5A-34C4-89F4-EFD7CA3D1C9D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
    0x7fff947f8000 -     0x7fff948b2fff  com.apple.DiscRecording (9.0.1 - 9010.4.3) <540853B2-B123-3560-8023-C92EE229051A> /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording
    0x7fff948fe000 -     0x7fff94927fff  libc++abi.dylib (125) <DCCC8177-3D09-35BC-9784-2A04FEC4C71B> /usr/lib/libc++abi.dylib
    0x7fff94928000 -     0x7fff94939fff  libcmph.dylib (6) <BA4BF2C6-7F4E-33B8-9DD7-619C9EB83ECF> /usr/lib/libcmph.dylib
    0x7fff9493a000 -     0x7fff949b1feb  libcorecrypto.dylib (335.50.1) <B5C05FD7-A540-345A-87BF-8E41848A3C17> /usr/lib/system/libcorecrypto.dylib
    0x7fff94b02000 -     0x7fff94b0afff  com.apple.CoreServices.FSEvents (1223.10.1 - 1223.10.1) <7F5B7A23-BC1D-3FA9-A9B8-D534F1E1979A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
    0x7fff94b11000 -     0x7fff94da7fff  libmecabra.dylib (696.5) <EF6C0BD4-5FE8-34FB-8ADF-69A53CEC97A9> /usr/lib/libmecabra.dylib
    0x7fff94da8000 -     0x7fff94df3ff7  com.apple.CoreMediaIO (703.0 - 4791) <2FAE3CC1-145C-37AB-A836-E5D93A02BA23> /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/CoreMediaIO
    0x7fff94df4000 -     0x7fff94df6fff  libsystem_coreservices.dylib (19.2) <1B3F5AFC-FFCD-3ECB-8B9A-5538366FB20D> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff94eea000 -     0x7fff94ef9fe7  com.apple.AppleFSCompression (81.20.2 - 1.0) <2FE122A9-5265-320A-9600-FFC5CE4DE197> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression
    0x7fff94efa000 -     0x7fff94f11ff7  libsystem_coretls.dylib (83.40.5) <C90DAE38-4082-381C-A185-2A6A8B677628> /usr/lib/system/libsystem_coretls.dylib
    0x7fff94f12000 -     0x7fff94f14fff  libCGXType.A.dylib (957) <B901C222-E779-32EB-96C2-5A707A09FC5B> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib
    0x7fff94f8d000 -     0x7fff952e1fff  com.apple.Foundation (6.9 - 1259) <71A9D3A0-0B1F-3E3A-86F3-1486365A6EF2> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff95434000 -     0x7fff95486fff  com.apple.CloudDocs (1.0 - 383.13) <5FD9138D-09D9-3B97-BBAD-5692E1687F30> /System/Library/PrivateFrameworks/CloudDocs.framework/Versions/A/CloudDocs
    0x7fff95487000 -     0x7fff954c1ff7  com.apple.DebugSymbols (132 - 132) <23A42C53-B941-3871-9EE2-4C87A46005B5> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
    0x7fff955f7000 -     0x7fff9560eff7  libsystem_asl.dylib (323.50.1) <41F8E11F-1BD0-3F1D-BA3A-AA1577ED98A9> /usr/lib/system/libsystem_asl.dylib
    0x7fff95622000 -     0x7fff95647ff7  libPng.dylib (1450) <F7944170-4854-3CA5-B66F-7A6CA2292DF2> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
    0x7fff9564e000 -     0x7fff95651ffb  libScreenReader.dylib (426.42) <16FC79D1-4573-3E90-945F-CBA22D5185FD> /usr/lib/libScreenReader.dylib
    0x7fff95655000 -     0x7fff956ccff7  com.apple.MMCS (1.3 - 357.1) <549FBEFC-55F7-3101-BF51-A0B1F7CF2B46> /System/Library/PrivateFrameworks/MMCS.framework/Versions/A/MMCS
    0x7fff956cd000 -     0x7fff956d9ff7  com.apple.OpenDirectory (10.11 - 194) <31A67AD5-5CC2-350A-96D7-821DF4BC4196> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
    0x7fff95aaf000 -     0x7fff95ab4ff7  libmacho.dylib (875.1) <318264FA-58F1-39D8-8285-1F6254EE410E> /usr/lib/system/libmacho.dylib
    0x7fff95ab5000 -     0x7fff95ab9fff  libcache.dylib (75) <9548AAE9-2AB7-3525-9ECE-A2A7C4688447> /usr/lib/system/libcache.dylib
    0x7fff95aba000 -     0x7fff95adefff  com.apple.MultitouchSupport.framework (304.12 - 304.12) <65CB7653-EACD-3ADB-ABB6-2E0671708301> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
    0x7fff95adf000 -     0x7fff95afbff3  libresolv.9.dylib (60) <A650B5C8-1950-36A0-86D1-0B2465318BFA> /usr/lib/libresolv.9.dylib
    0x7fff95afc000 -     0x7fff95b41ff3  libFontRegistry.dylib (155.2) <A70DD497-35F3-34DA-9C19-F4B90080E961> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
    0x7fff95e0a000 -     0x7fff95e47ff3  com.apple.bom (14.0 - 193.7) <9B8AE30B-24A3-37AB-B04E-4CE67AED4775> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
    0x7fff95e48000 -     0x7fff960e2ff3  com.apple.security (7.0 - 57337.50.23) <8B6CF71D-A63E-34C9-9227-0AACAB643584> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x7fff9631d000 -     0x7fff96354ff7  com.apple.LDAPFramework (2.4.28 - 194.5) <9AE33BF2-FB17-342D-8F1E-5F83C6E6EB69> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
    0x7fff96355000 -     0x7fff963c9ff3  com.apple.securityfoundation (6.0 - 55126) <130656AE-2711-3914-8736-D8B021C93FE0> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
    0x7fff9640f000 -     0x7fff96410fff  libsystem_blocks.dylib (65) <1244D9D5-F6AA-35BB-B307-86851C24B8E5> /usr/lib/system/libsystem_blocks.dylib
    0x7fff96411000 -     0x7fff9643affb  libRIP.A.dylib (957) <5F18F20D-5921-3314-A9F8-F1B1CB62C83D> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
    0x7fff9647f000 -     0x7fff96b1eff7  com.apple.JavaScriptCore (11601 - 11601.6.13) <93B52DD9-7810-3562-8605-B97965F6DB94> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
    0x7fff97a3b000 -     0x7fff97a6afff  com.apple.securityinterface (10.0 - 55065.40.1) <1BB39B19-DD74-347E-A344-0E6781773577> /System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInterface
    0x7fff97a6b000 -     0x7fff97ac0fff  com.apple.AE (701 - 701) <AD492742-F884-386B-A450-FAC281B9FFA4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
    0x7fff97ac1000 -     0x7fff97b2fff7  com.apple.ApplicationServices.ATS (377 - 394.4) <9779E916-0788-3CAC-B1EC-F68BCB12A2B6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
    0x7fff97b30000 -     0x7fff97c1ffff  libxml2.2.dylib (29.7) <32BBF51E-B084-3FC2-AE9C-C008BE84102B> /usr/lib/libxml2.2.dylib
    0x7fff97c20000 -     0x7fff97c28fff  libsystem_networkextension.dylib (385.40.36) <66095DC7-6539-38F2-95EE-458F15F6D014> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff97c29000 -     0x7fff97cbffff  com.apple.ColorSync (4.9.0 - 4.9.0) <8FC37E20-6579-3CB2-9D49-BC39FC38DF87> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
    0x7fff97d20000 -     0x7fff97d36fff  com.apple.CoreMediaAuthoring (2.2 - 953) <DAC012D0-276D-3AF6-A6E9-EA32E692B923> /System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreMediaAuthoring
    0x7fff97d8a000 -     0x7fff97db9ffb  com.apple.datadetectors (5.0 - 308) <1949868C-BDCD-3772-BDBD-D7E9F2CC1451> /System/Library/PrivateFrameworks/DataDetectors.framework/Versions/A/DataDetectors
    0x7fff97dee000 -     0x7fff97df1ffb  libdyld.dylib (360.22) <CC088C2A-D407-33E7-A6B6-B06E0D4AD999> /usr/lib/system/libdyld.dylib
    0x7fff97dfd000 -     0x7fff97e13ff7  libLinearAlgebra.dylib (1162.2) <FFE54EDF-F06F-3C0A-864A-4CA7BBFD4B2D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
    0x7fff97e1b000 -     0x7fff97e1dff7  com.apple.securityhi (9.0 - 55006) <1E7BE52B-97EA-371A-AECA-1EE2AD246D8A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
    0x7fff97e41000 -     0x7fff97e47fff  com.apple.IOAccelerator (205.10 - 205.10) <E46ED853-C2CC-3F29-A7DD-5E9351A2E754> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
    0x7fff97e48000 -     0x7fff97ed7fff  com.apple.CorePDF (4.0 - 4) <849BBFF6-0700-3ED1-98DF-A6E93B9B707F> /System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF
    0x7fff97ed8000 -     0x7fff97ef6ff7  libsystem_kernel.dylib (3248.50.21) <78E54D59-D2B0-3F54-9A4A-0A68D671F253> /usr/lib/system/libsystem_kernel.dylib
    0x7fff97ef7000 -     0x7fff97f55fff  com.apple.SystemConfiguration (1.14 - 1.14) <D801FAD7-5A2D-3E5E-9F44-B6C9B8BEA747> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    0x7fff97f56000 -     0x7fff97f61fff  com.apple.CrashReporterSupport (10.11 - 718) <05892B57-F2CD-3C84-B984-0417F6B361DB> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
    0x7fff97ff2000 -     0x7fff980d8ff7  libcrypto.0.9.8.dylib (59.40.2) <2486D801-C756-3488-B519-1AA6807E8948> /usr/lib/libcrypto.0.9.8.dylib
    0x7fff980d9000 -     0x7fff980d9fff  com.apple.audio.units.AudioUnit (1.13 - 1.13) <93C1D642-37D4-3692-AD35-DCAD04F9610B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
    0x7fff980df000 -     0x7fff980e3fff  libGIF.dylib (1450) <DDEA46A2-85B7-32D7-8CC2-8F4C10AA12D5> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
    0x7fff980e4000 -     0x7fff9814aff7  libsystem_network.dylib (583.50.1) <B52DAB73-92DC-3DA7-B9F4-B899D66445C1> /usr/lib/system/libsystem_network.dylib
    0x7fff982d2000 -     0x7fff982d3fff  libsystem_secinit.dylib (20) <32B1A8C6-DC84-3F4F-B8CE-9A52B47C3E6B> /usr/lib/system/libsystem_secinit.dylib
    0x7fff982d4000 -     0x7fff982e9fff  com.apple.ToneKit (1.0 - 1) <6D5AD263-308F-3F70-8D86-7027569D2694> /System/Library/PrivateFrameworks/ToneKit.framework/Versions/A/ToneKit
    0x7fff984ff000 -     0x7fff98506ff7  com.apple.phonenumbers (1.1.1 - 105) <A616AFB5-2336-385A-B058-16A423D2B21B> /System/Library/PrivateFrameworks/PhoneNumbers.framework/Versions/A/PhoneNumbers
    0x7fff9850a000 -     0x7fff9850afff  com.apple.quartzframework (1.5 - 21) <5DC3D0D9-9E3F-3AA5-92F1-F229907A49B9> /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz
    0x7fff98512000 -     0x7fff9851afef  libsystem_platform.dylib (74.40.2) <29A905EF-6777-3C33-82B0-6C3A88C4BA15> /usr/lib/system/libsystem_platform.dylib
    0x7fff9870b000 -     0x7fff98759ff7  libstdc++.6.dylib (104.1) <76E2AFB1-07E5-3F19-B692-F6E21B7E470D> /usr/lib/libstdc++.6.dylib
    0x7fff9875a000 -     0x7fff9880afff  com.apple.backup.framework (1.7.4 - 1.7.4) <F304E9D1-991A-379E-9659-BF85C35B4808> /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
    0x7fff98814000 -     0x7fff98831ff7  com.apple.pluginkit.framework (1.0 - 1) <0BA96479-0451-3DA9-A2AC-FE1D86D383AB> /System/Library/PrivateFrameworks/PlugInKit.framework/Versions/A/PlugInKit
    0x7fff98870000 -     0x7fff98878fff  libcopyfile.dylib (127) <A48637BC-F3F2-34F2-BB68-4C65FD012832> /usr/lib/system/libcopyfile.dylib
    0x7fff98879000 -     0x7fff9889bfff  com.apple.IconServices (68.1 - 68.1) <CDEEDBE6-F53B-3BA1-82D4-23BCA3DD8949> /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
    0x7fff98910000 -     0x7fff9899fff7  libCoreStorage.dylib (517.50.1) <E6283FE9-B5AC-3110-8D4C-8E2BF185983E> /usr/lib/libCoreStorage.dylib
    0x7fff989a1000 -     0x7fff98a8cff7  com.apple.QuickLookUIFramework (5.0 - 696.7) <5A4AAFEC-D38C-3DA0-9361-CBF1D4C6B376> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI
    0x7fff98a8d000 -     0x7fff98a8fff7  libquarantine.dylib (80) <0F4169F0-0C84-3A25-B3AE-E47B3586D908> /usr/lib/system/libquarantine.dylib
    0x7fff98a90000 -     0x7fff98cb1ff7  com.apple.CoreImage (11.4.0 - 366.4.19) <F5B7B115-E43A-3C61-A6AD-EFCDE7FC43A1> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
    0x7fff993c3000 -     0x7fff993cefff  libkxld.dylib (3248.50.21) <99195052-038E-3490-ACF8-76F9AC43897E> /usr/lib/system/libkxld.dylib
    0x7fff993d6000 -     0x7fff993dfff3  libsystem_notify.dylib (150.40.1) <D48BDE34-0F7E-34CA-A0FF-C578E39987CC> /usr/lib/system/libsystem_notify.dylib
    0x7fff993e0000 -     0x7fff993e8fff  com.apple.frameworks.CoreDaemon (1.3 - 1.3) <CC53DC12-9231-3C4F-921B-9A770D463323> /System/Library/PrivateFrameworks/CoreDaemon.framework/Versions/B/CoreDaemon
    0x7fff993e9000 -     0x7fff99458fff  com.apple.SearchKit (1.4.0 - 1.4.0) <F159A888-34CA-36F1-AC8E-EB1B38C9DFB3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
    0x7fff99459000 -     0x7fff994fdfff  com.apple.Bluetooth (4.4.5 - 4.4.5f3) <141F2C36-70B6-32D3-A556-7A605832CDB3> /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
    0x7fff99571000 -     0x7fff996d8fff  libBLAS.dylib (1162.2) <A1398FE0-39D2-33EA-9A0F-B2644EEA29A0> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    0x7fff996fd000 -     0x7fff99701fff  com.apple.LoginUICore (3.2 - 3.2) <5524E4BC-4700-39F4-AF06-E53322712EE0> /System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Versions/A/LoginUICore
    0x7fff99702000 -     0x7fff99713ff7  libsystem_trace.dylib (201.10.3) <F00E92E4-DBDA-3749-B5B3-0C3FBBABA1CB> /usr/lib/system/libsystem_trace.dylib
    0x7fff9971a000 -     0x7fff9975bff7  libGLU.dylib (12.1) <CD7A5916-3E3C-3EF3-A275-B281016B99CB> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
    0x7fff9975c000 -     0x7fff9975dfff  com.apple.TrustEvaluationAgent (2.0 - 25) <0239494E-FEFE-39BC-9FC7-E251BA5128F1> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
    0x7fff997a7000 -     0x7fff997a8fff  libffi.dylib (18.1) <5BA9612C-747E-33CE-9DB1-3C01ECF3041D> /usr/lib/libffi.dylib
    0x7fff997a9000 -     0x7fff99862ff7  com.apple.cloudkit.CloudKit (482.29 - 482.29) <E235B37E-1491-3857-BDE8-38450D4FE8D0> /System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit
    0x7fff99863000 -     0x7fff998ecff7  com.apple.PerformanceAnalysis (1.0 - 1) <2064F7E8-5C3D-3E18-8029-2D832D13E2A2> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
    0x7fff998ed000 -     0x7fff999d3fef  unorm8_bgra.dylib (2.7.3) <B315AE9C-9E09-3D9F-9513-EC2195908516> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/ImageFormats/unorm8_bgra.dylib
    0x7fff999e8000 -     0x7fff99a88fff  com.apple.ViewBridge (159 - 159) <D8131B7E-DFC9-3FDD-9D56-49821C1D1521> /System/Library/PrivateFrameworks/ViewBridge.framework/Versions/A/ViewBridge
    0x7fff99af3000 -     0x7fff99af3fff  com.apple.Carbon (154 - 157) <8F6ED602-5943-3E29-A793-BC331E2C183D> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
    0x7fff99b10000 -     0x7fff99b22fff  libsasl2.2.dylib (209) <11C7D200-0CA5-30F4-A19A-178CA81D48FE> /usr/lib/libsasl2.2.dylib
    0x7fff99b34000 -     0x7fff99b36ff7  libRadiance.dylib (1450) <BE9E0EBE-C589-3684-B4AE-04F95C8D410A> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
    0x7fff99b37000 -     0x7fff99b53ff7  libextension.dylib (78) <FD952DA6-BBEC-3CB6-98B3-E1D111C5C54E> /usr/lib/libextension.dylib
    0x7fff99b54000 -     0x7fff99b5bff7  libcompiler_rt.dylib (62) <A13ECF69-F59F-38AE-8609-7B731450FBCD> /usr/lib/system/libcompiler_rt.dylib
    0x7fff99b6b000 -     0x7fff99bdafff  com.apple.datadetectorscore (7.0 - 460) <FA46DEE8-B25B-3E84-B067-6A31193A0885> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
    0x7fff99bdb000 -     0x7fff99bddfff  libCVMSPluginSupport.dylib (12.1) <D81B3D8D-B83F-3918-BD4B-6C794A30AF9F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
    0x7fff99bde000 -     0x7fff99c11ff7  com.apple.MediaKit (16 - 809) <BF8032FE-6645-37F6-A622-BC7EEE3EAABF> /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit
    0x7fff99c12000 -     0x7fff99c12ff7  libunc.dylib (29) <DDB1E947-C775-33B8-B461-63E5EB698F0E> /usr/lib/system/libunc.dylib
    0x7fff99ddb000 -     0x7fff99e27ff7  com.apple.corelocation (1486.17 - 1615.38) <6336CFC5-9D7D-3B76-B263-56DD6EBD0B8D> /System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation
    0x7fff99e28000 -     0x7fff99e57ff7  com.apple.DictionaryServices (1.2 - 250.3) <30250542-CBAA-39C1-91AA-B57A5DE17594> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
    0x7fff99e58000 -     0x7fff99e64fff  com.apple.speech.synthesis.framework (5.4.12 - 5.4.12) <71DA00B8-5EA2-326B-8814-59DB25512F65> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
    0x7fff9a0d2000 -     0x7fff9a0fbfff  libsystem_info.dylib (477.50.4) <FAA9226D-64DE-3769-A6D8-6CABA4B7FF4D> /usr/lib/system/libsystem_info.dylib
    0x7fff9aa47000 -     0x7fff9aa52fff  libcsfde.dylib (517.50.1) <52F0DB6A-13B8-355E-ADFD-72834D3CA183> /usr/lib/libcsfde.dylib
    0x7fff9aa53000 -     0x7fff9aadbfff  com.apple.CoreSymbolication (3.1 - 58048.1) <4730422E-4178-34F9-8550-BB92F2A4F44B> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
    0x7fff9aafb000 -     0x7fff9ab4cfff  com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <EA7D4F3B-062B-3C81-A98C-C89264D00D48> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
    0x7fff9ab4d000 -     0x7fff9ab50fff  libsystem_sandbox.dylib (460.50.4) <150A9D3D-F69E-32F7-8C7B-8E72CAAFF7E4> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff9ab64000 -     0x7fff9ab8dff7  libxpc.dylib (765.50.8) <54D1328E-054E-3DAA-89E2-375722F9D18F> /usr/lib/system/libxpc.dylib
    0x7fff9ab8e000 -     0x7fff9ab90fff  com.apple.SecCodeWrapper (4.0 - 261.40.2) <1F832591-59A8-3B3F-943F-D6D827463782> /System/Library/PrivateFrameworks/SecCodeWrapper.framework/Versions/A/SecCodeWrapper
    0x7fff9ab91000 -     0x7fff9ac71ff7  unorm8_rgba.dylib (2.7.3) <9EB6C346-CFF6-32D7-B4A1-2409DFBCB216> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/ImageFormats/unorm8_rgba.dylib
    0x7fff9ac72000 -     0x7fff9ac7dfff  com.apple.AppSandbox (4.0 - 261.40.2) <52766210-B6EB-3B73-AB1B-42E0A9AD2EE8> /System/Library/PrivateFrameworks/AppSandbox.framework/Versions/A/AppSandbox
    0x7fff9acc6000 -     0x7fff9ae94ff3  com.apple.QuartzCore (1.11 - 410.14) <076BDE58-8AED-3D47-84FD-548CF8E8EDB9> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
    0x7fff9ae95000 -     0x7fff9aedbff7  libauto.dylib (186) <999E610F-41FC-32A3-ADCA-5EC049B65DFB> /usr/lib/libauto.dylib
    0x7fff9af0a000 -     0x7fff9b42cfff  com.apple.QuartzComposer (5.1 - 334) <80235264-CA1B-3E3F-96F7-5F6F52FDC5B6> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/QuartzComposer
    0x7fff9bd6a000 -     0x7fff9bdbdff7  libc++.1.dylib (120.1) <8FC3D139-8055-3498-9AC5-6467CB7F4D14> /usr/lib/libc++.1.dylib
    0x7fff9bdbe000 -     0x7fff9bdd7fff  com.apple.CFOpenDirectory (10.11 - 194) <11F95672-55E0-3F9D-9171-5E8C56AEE948> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
    0x7fff9bdd8000 -     0x7fff9be16ff7  libGLImage.dylib (12.1) <BB1F1A93-5101-3906-AB17-8D83FCB200F9> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
    0x7fff9be17000 -     0x7fff9be25fff  com.apple.opengl (12.1.0 - 12.1.0) <BBC4458E-12FC-3C9B-BF7E-6985D61C7A67> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
    0x7fff9be26000 -     0x7fff9c199fff  com.apple.FinderKit (1.4.4 - 1.4.4) <76E52C7F-CA82-337E-BF8E-9961F11C4B8D> /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit
    0x7fff9c19a000 -     0x7fff9c19ffff  com.apple.ImageCapture (9.0 - 9.0) <ACECF0B7-7D92-3A22-BF47-E8FADF4C5378> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
    0x7fff9c1a0000 -     0x7fff9c3abfff  libFosl_dynamic.dylib (16.24) <5F9DB82D-FD4B-3952-8531-CE020F93ED49> /usr/lib/libFosl_dynamic.dylib
    0x7fff9c3ac000 -     0x7fff9c3e2fff  libssl.0.9.8.dylib (59.40.2) <523FEBFA-4BF7-3A69-83B7-164265BE7F4D> /usr/lib/libssl.0.9.8.dylib
    0x7fff9c42e000 -     0x7fff9c48cfff  com.apple.CoreServices.OSServices (728.12 - 728.12) <776EBD4F-7052-377F-A70D-E2FDBD465A5E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
    0x7fff9c48d000 -     0x7fff9c545ff7  com.apple.CoreDuet (1.0 - 1) <FC1EAEE1-73A4-3B13-A634-1D2A94D0C0B7> /System/Library/PrivateFrameworks/CoreDuet.framework/Versions/A/CoreDuet
    0x7fff9c546000 -     0x7fff9c56afff  libJPEG.dylib (1450) <1775E59E-D82C-3F7A-8E4F-B0C13F88F691> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
    0x7fff9c56b000 -     0x7fff9c8abfff  com.apple.WebKit (11601 - 11601.6.17) <F54752A4-B5AA-3993-BA9A-83F4B3AA176E> /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    0x7fff9c8cd000 -     0x7fff9c8e0fff  com.apple.contacts.ContactsPersistence (1.0 - 2137.1) <71232F20-11BD-370D-9F43-F262BFE46C93> /System/Library/PrivateFrameworks/ContactsPersistence.framework/Versions/A/ContactsPersistence
    0x7fff9c8e1000 -     0x7fff9c8e3fff  com.apple.loginsupport (1.0 - 1) <9B2F5F9B-ED38-313F-B798-D2B667BCD6B5> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
    0x7fff9c8e4000 -     0x7fff9c8fbfff  libmarisa.dylib (4) <E4919B03-D9BD-3AF8-B436-C415C98E3F0A> /usr/lib/libmarisa.dylib
    0x7fff9c916000 -     0x7fff9c919fff  libCoreVMClient.dylib (119.5) <560D70FB-709F-3030-96C9-F249FCB7DA6D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
    0x7fff9c91a000 -     0x7fff9c91dff7  com.apple.AppleSystemInfo (3.1.5 - 3.1.5) <6932B5EC-0EA9-333D-BF7E-665047392FEC> /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo
    0x7fff9c920000 -     0x7fff9c942ff7  com.apple.Sharing (442.13.6 - 442.13.6) <DDD2811C-6ECB-32F2-8EE1-69BF9657B4A8> /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
    0x7fff9c952000 -     0x7fff9c954ffb  libutil.dylib (43) <4C9BFE8B-563B-3EEA-A323-8F4F14E0A46C> /usr/lib/libutil.dylib
    0x7fff9c9b6000 -     0x7fff9c9bbfff  com.apple.DiskArbitration (2.7 - 2.7) <F55902AA-5316-3255-A701-FDED5B553065> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    0x7fff9c9be000 -     0x7fff9c9c3ff7  libheimdal-asn1.dylib (453.40.10) <981DE40B-FA16-36F7-BE92-8C8A115D6CD9> /usr/lib/libheimdal-asn1.dylib
    0x7fff9c9c4000 -     0x7fff9c9e0fff  com.apple.GenerationalStorage (2.0 - 239.1) <8C821448-4294-3736-9CEF-467C93785CB9> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
    0x7fff9c9e1000 -     0x7fff9ca00ff7  com.apple.framework.Apple80211 (11.0 - 1121.34.2) <90477FAE-B835-3931-80FB-FDFF02B21D9D> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
    0x7fff9ca01000 -     0x7fff9ca04ff7  com.apple.help (1.3.3 - 46) <35DA4D48-0BC2-35A1-8D7C-40905CDF4F64> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
    0x7fff9cabb000 -     0x7fff9caebff3  com.apple.CoreAVCHD (5.8.0 - 5800.4.2) <4AAFB1C4-3708-30F9-ACFA-90564347204C> /System/Library/PrivateFrameworks/CoreAVCHD.framework/Versions/A/CoreAVCHD
    0x7fff9cd10000 -     0x7fff9cd16fff  com.apple.XPCService (2.0 - 1) <5E2122D6-FFA2-3552-BF16-9FD3F36B40DB> /System/Library/PrivateFrameworks/XPCService.framework/Versions/A/XPCService
    0x7fff9cd17000 -     0x7fff9cd1cff3  libunwind.dylib (35.3) <F6EB48E5-4D12-359A-AB54-C937FBBE9043> /usr/lib/system/libunwind.dylib
    0x7fff9cd1d000 -     0x7fff9cd22ff7  com.apple.AssetCacheServices (14.1 - 14.1) <5F249F84-660A-3E94-B073-6729E7ED56D9> /System/Library/PrivateFrameworks/AssetCacheServices.framework/Versions/A/AssetCacheServices
    0x7fff9cd8d000 -     0x7fff9cd8dfff  libmetal_timestamp.dylib (600.0.44.1) <6576F284-BACA-332A-A6E7-FA1C347636E3> /System/Library/PrivateFrameworks/GPUCompiler.framework/libmetal_timestamp.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 1
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 163352
    thread_create: 0
    thread_set_state: 549

VM Region Summary:
ReadOnly portion of Libraries: Total=399.0M resident=0K(0%) swapped_out_or_unallocated=399.0M(100%)
Writable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)
 
                                  VIRTUAL   REGION 
REGION TYPE                          SIZE    COUNT (non-coalesced) 
===========                       =======  ======= 
Accelerate.framework                 256K        3 
Activity Tracing                    2048K        2 
CG backing stores                   12.3M       10 
CG image                             312K       53 
CG shared images                     560K       13 
CoreAnimation                        296K       57 
CoreUI image data                   2256K       24 
CoreUI image file                    320K        5 
Dispatch continuations              16.0M        2 
Foundation                            24K        3 
Image IO                               4K        2 
JS JIT generated code              256.0M        5 
JS JIT generated code (reserved)   768.0M        2         reserved VM address space (unallocated)
JS VM register file                 4096K        2 
JS garbage collector                21.4M       66 
Kernel Alloc Once                      8K        3 
MALLOC                             172.3M       70 
MALLOC guard page                     32K        7 
Memory Tag 240                     144.0M       19 
Memory Tag 242                        12K        2 
Memory Tag 251                        24K        3 
OpenCL                                 8K        2 
Process Corpse Info                 2048K        2 
STACK GUARD                         56.1M       25 
Stack                               19.2M       30 
VM_ALLOCATE                         36.8M       61 
WebKit Malloc                       59.9M      227 
__DATA                              36.2M      394 
__IMAGE                              528K        2 
__LINKEDIT                         112.4M      114 
__TEXT                             286.6M      390 
__UNICODE                            552K        2 
mapped file                        371.5M       54 
shared memory                       16.3M       12 
===========                       =======  ======= 
TOTAL                                2.3G     1634 
TOTAL, minus reserved VM space       1.6G     1634 

Model: MacBookPro11,3, BootROM MBP112.0138.B17, 4 processors, Intel Core i7, 2.8 GHz, 16 GB, SMC 2.19f12
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In
Graphics: NVIDIA GeForce GT 750M, NVIDIA GeForce GT 750M, PCIe, 2048 MB
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (7.21.95.175.1a6)
Bluetooth: Version 4.4.5f3 17904, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM1024F, 1 TB
USB Device: USB 3.0 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: Hub
USB Device: Keyboard Hub
USB Device: Apple Keyboard
USB Device: Dell Premium USB Optical Mouse
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.1



-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [text/plain] bt.txt (96.9K, 2-bt.txt)
  download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-01 04:43   ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-07-01 09:09     ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-06 08:12       ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-07-07 08:43         ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
@ 2016-07-08 06:17           ` Neel Patel <[email protected]>
  2016-07-13 11:26             ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Neel Patel @ 2016-07-08 06:17 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

Hi Dave,

Please find attached patch file for the fix of crash and comment text.
Downloading cancel request was not handled properly and due to that
application was getting crashed.

Do review it and let us know for comments.

Thanks,
Neel Patel

On Thu, Jul 7, 2016 at 2:13 PM, Dave Page <[email protected]> wrote:

> Hi
>
> On Wed, Jul 6, 2016 at 9:12 AM, Neel Patel <[email protected]>
> wrote:
> > Hi Dave,
> >
> > I have tried to fix most of the review comments.  I have modified the
> patch
> > on top of your changes. Please find attached updated patch file.
> > Find my comments inline. Can you please review and let us know your
> feedback
> > ?
>
> That's definitely getting there;
>
> - Please make sure you follow the code style requirements, e.g.
> //<space>Comment text
>
> - In your comments, typically you should refer to the user as "the
> user" not just "user". e.g.
>   // Check that *the* user has given *a* valid file name or not
>
>   The same applies to other cases where you miss the article
> (https://en.wikipedia.org/wiki/Article_(grammar)):
>   // Check that *the* request contains the data download at client side
>
> NOTE: This isn't a criticism of you in particular - most of the team
> do this, I assume because it's more like the way you'd phrase things
> in Hindi. I just find myself correcting such mistakes regularly, and
> it's good for us all to continue to improve in general.
>
> - I was able to reproduce the crash again:
>   1) Open a tab, and go to the PostgreSQL download page on
> enterprisedb.com (linked from the pg.org site)
>   2) Start to download the 9.6b2 Win64 installer
>   3) Cancel the download
>   4) Click the link to download if your download didn't automatically start
>   5) Overwrite the existing file
>
> This results in:
>   a) The progress bar flashes up and down weirdly on the second download
>   b) The app crashes when the download completes:
>
> The program has unexpectedly finished.
>
> /Users/dpage/git/pgadmin4/build-pgAdmin4-Desktop_Qt_5_5_1_clang_64bit2-Debug/pgAdmin4.app/Contents/MacOS/pgAdmin4
> crashed
>
> See the attached backtrace.
>
> Thanks!
>
> > On Fri, Jul 1, 2016 at 2:39 PM, Dave Page <[email protected]> wrote:
> >>
> >> On Fri, Jul 1, 2016 at 5:43 AM, Neel Patel <[email protected]
> >
> >> wrote:
> >> > Hi Dave,
> >> >
> >> > On Thu, Jun 30, 2016 at 7:31 PM, Dave Page <[email protected]> wrote:
> >> >>
> >> >> Hi
> >> >>
> >> >> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
> >> >> <[email protected]> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > Please find attached patch file for initial version of download
> file
> >> >> > in
> >> >> > runtime application.
> >> >>
> >> >> I've attached an update with some improved messages, and setting the
> >> >> progress dialogue to be modal (seeing as we cannot have multiple
> >> >> downloads, and it's easy to lose the dialogue).
> >> >>
> >> >> > With this patch, we have implemented two features.
> >> >> >
> >> >> > Feature 1 :- Normal "Download file" from runtime application
> >> >> >
> >> >> > Previously "Download file" was not implemented in runtime
> >> >> > application.
> >> >> > With this patch file, we have handled Qt signal for download file
> >> >> > properly.
> >> >>
> >> >> This seems to work fine. I did get one crash (after I cancelled a
> >> >> download, then tried it again), but I couldn't reproduce that.
> >> >
> >> >
> >> > Okay. I will try to reproduce the issue and also i will try to review
> >> > the
> >> > code again if i can find something regrading crash.
> >
> >
> > I have tried to reproduce the crash but no luck. I have tried on Linux
> and
> > Mac.
> >
> >>
> >>
> >> Thanks.
> >>
> >> >
> >> >>
> >> >> > Feature 2 :-   "download" attribute support for 'a' tag for client
> >> >> > side
> >> >> > download
> >> >> >
> >> >> > As per our knowledge, webkit has not implemented the download
> >> >> > attribute
> >> >> > at
> >> >> > 'a' tag.
> >> >> > Currently it shows under development from below link.
> >> >> >
> >> >> > https://bugreports.qt.io/browse/QTBUG-47732
> >> >> >
> >> >> > We did not found any signal in Qt for download attribute feature
> but
> >> >> > to
> >> >> > implement this feature in runtime application, we added one
> >> >> > workaround
> >> >> > to
> >> >> > make it work with download CSV file.
> >> >> >
> >> >> > When we click on download buttons, we are getting Qt signal
> >> >> > "urlLinkClicked"
> >> >> > and in that url we are finding "data:text/csv" from encoded URL
> >> >> > generated
> >> >> > from sqleditor. Once we found that tag then we are decoding the csv
> >> >> > data
> >> >> > and
> >> >> > writing to file.
> >> >> >
> >> >> > Is that right approach ? Should we add our own custom mime-type to
> >> >> > header ?
> >> >> > Let us know your thoughts on this feature.
> >> >>
> >> >> This doesn't work so well, for a number of reasons:
> >> >>
> >> >> 1) QT Creator is complaining that your regexp contains an invalid
> >> >> escape sequence (line 546).
> >> >
> >> >
> >> > I will fix.
> >> >>
> >> >>
> >> >> 2) The default file name seems to be the entire data blob. I would
> >> >> suggest making the file name "download.csv" if we don't know anything
> >> >> better. The "csv" part should be taken from the mime type (see below)
> >> >>
> >> >> 3) Should we handle all "data:" downloads in this way? Taking the
> file
> >> >> type and default extension from the mimetype offered.
> >> >
> >> >
> >> > We can handle all "data:" download. We will extract the filename and
> >> > extension from mime type.
> >> > As i know, Qt provides QUrlQuery class which will be useful to find
> the
> >> > key
> >> > value pair. I will test and let you know.
> >> >
> >> > e.g. If we have header as below
> >> >
> >> >
> >> >
> "data:text/csv;charset=utf-8;Content-disposition:attachment;filename=download.csv;"
> >> >
> >> > From the QurlQuery class we can query "filename" and "data:" and
> >> > accordingly
> >> > save the data to filename provided.
> >> >
> >> > Please suggest.
> >>
> >> Sounds good.
> >>
> >> >> 4) When I change the filename the data is properly saved, but then I
> >> >> get a confirmation message that still has the full data blob as the
> >> >> filename.
> >
> >
> > I found that it is due to different Qt version. You might be using Qt
> 5.5.
> > In Qt 5.5, we are getting "download" signal and for Qt < 5.5 we are
> getting
> > "urlLinkClicked" signal for client side data download.
> > We have fixed the issue for all Qt version. Let me know if you can still
> > able to reproduce the issue.
> >
> >>
> >> >>
> >> >> 5) It somehow seems to have let me save files with forward slashes in
> >> >> the name. See attachment.
> >
> >
> > Fixed.
> >
> >> >
> >> >
> >> > I think we should not ask for "Save as" dialog. If there is no key
> found
> >> > of
> >> > "filename" in encodedURI then we should create the file "download.csv"
> >> > in
> >> > user's download directory and save the csv data.
> >>
> >> Well we can get the extension from the mimetype in that instance, but
> >> otherwise I agree with the naming. I do think we need a Save As
> >> dialogue, as the user should be able to choose the location for the
> >> file (and rename it). We should also remember the last save location
> >> for convenience.
> >
> >
> > Fixed.
> >
> >>
> >>
> >> >> 6) I get all sorts of weird redrawing on the screen when downloading
> a
> >> >> data blob. I suspect it's because the filename (which is still the
> >> >> entire data blob) is shown on the progress dialogue.
> >> >>
> >
> >
> > Fixed.
> >
> >>
> >> >
> >> > I will try to fix as per above comments and submit the patch again.
> >> > Let us know for any misunderstanding.
> >>
> >> Cool, thanks.
> >>
> >>
> >> --
> >> Dave Page
> >> Blog: http://pgsnake.blogspot.com
> >> Twitter: @pgsnake
> >>
> >> EnterpriseDB UK: http://www.enterprisedb.com
> >> The Enterprise PostgreSQL Company
> >
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] download_runtime_v4.patch (19.4K, 3-download_runtime_v4.patch)
  download | inline diff:
diff --git a/runtime/BrowserWindow.cpp b/runtime/BrowserWindow.cpp
index e875b28..c507b61 100644
--- a/runtime/BrowserWindow.cpp
+++ b/runtime/BrowserWindow.cpp
@@ -23,7 +23,6 @@
 #include <QInputDialog>
 #include <QLineEdit>
 #endif
-
 // App headers
 #include "BrowserWindow.h"
 #include "ConfigWindow.h"
@@ -42,6 +41,15 @@ BrowserWindow::BrowserWindow(QString url)
     m_widget = NULL;
     m_toolBtnBack = NULL;
     m_toolBtnForward = NULL;
+    m_downloadStarted = 0;
+    m_downloadCancelled = 0;
+    m_file = NULL;
+    m_downloadFilename = "";
+    m_defaultFilename = "";
+    m_progressDialog = NULL;
+    m_last_open_folder_path = QDir::currentPath();
+    m_dir = "";
+    m_reply = NULL;
 
     m_appServerUrl = url;
 
@@ -83,6 +91,11 @@ BrowserWindow::BrowserWindow(QString url)
     // Register the slot on tab index change
     connect(m_tabWidget,SIGNAL(currentChanged(int )),this,SLOT(tabIndexChanged(int )));
 
+    // Listen for download file request from the web page
+    m_mainWebView->page()->setForwardUnsupportedContent(true);
+    connect(m_mainWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+    connect(m_mainWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
     m_mainWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
 
     // Restore the geometry
@@ -199,6 +212,297 @@ int BrowserWindow::findURLTab(const QUrl &name)
     return 0;
 }
 
+// Below slot will be called when user right click on download link and select "Save Link..." option from context menu
+void BrowserWindow::download(const QNetworkRequest &request)
+{
+    // Check that request contains data for download at client side
+    QUrl name;
+    if (checkClientDownload(name, request))
+        return;
+
+    if (m_downloadStarted)
+    {
+        // Inform user that a download is already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress: %1").arg(m_defaultFilename));
+        return;
+    }
+
+    m_defaultFilename = QFileInfo(request.url().toString()).fileName();
+
+    // Open the dialog to save file
+    QFileDialog save_dialog(this);
+    save_dialog.setAcceptMode(QFileDialog::AcceptSave);
+    save_dialog.setWindowTitle(tr("Save file"));
+    save_dialog.setDirectory(m_last_open_folder_path);
+    save_dialog.selectFile(m_defaultFilename);
+
+    // Register the slot for directory travesing when file dialog is opened and save the last open directory
+    QObject::connect(&save_dialog, SIGNAL(directoryEntered(const QString &)), this, SLOT(current_dir_path(const QString &)));
+    m_dir = m_last_open_folder_path;
+    QString fileName = "";
+    QString f_name = "";
+
+    if (save_dialog.exec() == QDialog::Accepted) {
+        fileName = save_dialog.selectedFiles().first();
+        f_name = fileName.replace(m_dir, "");
+        // Remove the first character(/) from fiename
+        f_name.remove(0,1);
+        m_defaultFilename = f_name;
+    }
+    else
+        return;
+
+    fileName = m_dir + fileName;
+    // Clear the last open directory path
+    m_dir.clear();
+
+#ifdef __APPLE__
+    // Check that user has given valid file name or not - forward slash is not allowed in file name
+    // In Mac OSX, forward slash is converted to colon(:) by Qt so we need to check for colon.
+    if (f_name.indexOf(":") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#else
+    // Check that user has given valid file name or not - forward slash is not allowed in file name
+    if (f_name.indexOf("/") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#endif
+
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        m_downloadFilename = fileName;
+
+        QNetworkRequest newRequest = request;
+        newRequest.setAttribute(QNetworkRequest::User, fileName);
+
+        QObject *obj_web_page = QObject::sender();
+        if (obj_web_page != NULL)
+        {
+            QWebPage *sender_web_page = dynamic_cast<QWebPage*>(obj_web_page);
+            if (sender_web_page != NULL)
+            {
+                QNetworkAccessManager *networkManager = sender_web_page->networkAccessManager();
+                QNetworkReply *reply = networkManager->get(newRequest);
+                if (reply != NULL)
+                {
+                    m_downloadStarted = 1;
+                    m_downloadCancelled = 0;
+                    // Connect the signal for downloadProgress and downloadFinished
+                    connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)) );
+                    connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+                }
+            }
+        }
+    }
+}
+
+// Below slot will be called when file download is in progress
+void BrowserWindow::downloadFileProgress(qint64 readData, qint64 totalData)
+{
+    QNetworkReply *reply = ((QNetworkReply*)sender());
+    QNetworkRequest request = reply->request();
+    QVariant v = request.attribute(QNetworkRequest::User);
+
+    // When download is canceled by user then no need to write data to file
+    if (m_downloadCancelled)
+        return;
+
+    if(reply != NULL && reply->error() != QNetworkReply::NoError)
+    {
+        qDebug() << "Network error occurred whilst downloading: " << m_defaultFilename;
+        return;
+    }
+
+    // Download is started so open the file
+    if (!m_file)
+    {
+        m_file = new QFile(m_downloadFilename);
+        if (!m_file->open(QIODevice::WriteOnly))
+        {
+            qDebug() << "Error opening file: " << m_downloadFilename;
+            m_downloadFilename.clear();
+            m_defaultFilename.clear();
+            m_downloadStarted = 0;
+            return;
+        }
+
+        // Create progress bar dialog
+        m_progressDialog = new QProgressDialog (tr("Downloading file: %1 ").arg(m_defaultFilename), "Cancel", readData, totalData, this);
+        m_progressDialog->setWindowModality(Qt::WindowModal);
+        m_progressDialog->setWindowTitle("Download progress");
+        m_progressDialog->setMinimumWidth(450);
+        m_progressDialog->setMinimumHeight(80);
+        m_progressDialog->setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
+        // Register slot for file download cancel request
+        QObject::connect(m_progressDialog, SIGNAL(canceled()), this, SLOT(progressCanceled()));
+        m_reply = reply;
+        // Show downloading progress bar
+        m_progressDialog->show();
+    }
+
+    if (m_file)
+    {
+        // Write data to file
+        m_file->write(reply->read(readData));
+        m_progressDialog->setValue(readData);
+
+        // As read data and totalData difference is zero means downloading is finished
+        if ((totalData - readData) == 0)
+        {
+            // As downloading is finished so remove progress bar dialog
+            if (m_progressDialog)
+            {
+                delete m_progressDialog;
+                m_progressDialog = NULL;
+            }
+
+            m_downloadStarted = 0;
+            m_downloadFilename.clear();
+            m_defaultFilename.clear();
+            m_downloadCancelled = 0;
+            if (m_file)
+            {
+                m_file->close();
+                delete m_file;
+                m_file = NULL;
+            }
+
+            if (m_reply)
+              m_reply = NULL;
+        }
+    }
+}
+
+// Below slot will be called when user cancel the downloading file which is in progress.
+void BrowserWindow::progressCanceled()
+{
+    m_downloadCancelled = 1;
+
+    if (m_progressDialog)
+    {
+        delete m_progressDialog;
+        m_progressDialog = NULL;
+    }
+
+    if (m_file)
+    {
+        m_file->close();
+        // Remove the file from file system as downloading is canceled by user
+        m_file->remove();
+        delete m_file;
+        m_file = NULL;
+    }
+
+    if (m_reply)
+    {
+        m_reply->abort();
+        m_reply = NULL;
+    }
+
+    m_downloadFilename.clear();
+    m_defaultFilename.clear();
+    m_downloadStarted = 0;
+}
+
+// Below slot will called when file download is finished
+void BrowserWindow::downloadFinished()
+{
+    if (m_progressDialog)
+    {
+        delete m_progressDialog;
+        m_progressDialog = NULL;
+    }
+
+    m_downloadFilename.clear();
+    m_defaultFilename.clear();
+    m_downloadStarted = 0;
+    m_downloadCancelled = 0;
+    if (m_file)
+    {
+        m_file->close();
+        delete m_file;
+        m_file = NULL;
+    }
+
+    if (m_reply)
+        m_reply = NULL;
+}
+
+// Below slot will be called when user directly click on any download link
+void BrowserWindow::unsupportedContent(QNetworkReply * reply)
+{
+    if (m_downloadStarted)
+    {
+        // Inform user that download is already started
+        QMessageBox::information(this, tr("Download warning"), tr("File download already in progress: %1").arg(m_defaultFilename));
+        return;
+    }
+
+    m_defaultFilename = QFileInfo(reply->url().toString()).fileName();
+    QFileDialog save_dialog(this);
+    save_dialog.setAcceptMode(QFileDialog::AcceptSave);
+    save_dialog.setWindowTitle(tr("Save file"));
+    save_dialog.setDirectory(m_last_open_folder_path);
+    save_dialog.selectFile(m_defaultFilename);
+
+    QObject::connect(&save_dialog, SIGNAL(directoryEntered(const QString &)), this, SLOT(current_dir_path(const QString &)));
+    m_dir = m_last_open_folder_path;
+    QString fileName = "";
+    QString f_name = "";
+
+    if (save_dialog.exec() == QDialog::Accepted) {
+        fileName = save_dialog.selectedFiles().first();
+        f_name = fileName.replace(m_dir, "");
+        // Remove the first character(/) from fiename
+        f_name.remove(0,1);
+        m_defaultFilename = f_name;
+    }
+    else
+        return;
+
+    fileName = m_dir + fileName;
+    // Clear last open folder path
+    m_dir.clear();
+
+#ifdef __APPLE__
+    // Check that user has given valid file name or not - forward slash is not allowed in file name
+    // In Mac OSX, forward slash is converted to colon(:) by Qt so we need to check for colon.
+    if (f_name.indexOf(":") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#else
+    // Check that user has given valid file name or not - forward slash is not allowed in file name
+    if (f_name.indexOf("/") != -1)
+    {
+        QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+        return;
+    }
+#endif
+
+    if (fileName.isEmpty())
+        return;
+    else
+    {
+        m_downloadFilename = fileName;
+        if (reply != NULL)
+        {
+            m_downloadStarted = 1;
+            m_downloadCancelled = 0;
+            connect( reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(downloadFileProgress(qint64, qint64)));
+            connect( reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
+        }
+    }
+}
+
 // Slot: When the tab index change, hide/show the toolbutton displayed on tab
 void BrowserWindow::tabIndexChanged(int index)
 {
@@ -340,9 +644,143 @@ void BrowserWindow::tabTitleChanged(const QString &str)
     }
 }
 
+// Below function will be used to download the data set in encoded URL so data will be downloaded at client side.
+bool BrowserWindow::checkClientDownload(const QUrl &name, const QNetworkRequest &request)
+{
+    QString mime_type = "";
+    QString file_name = "";
+    QString write_data = "";
+    QString csv_data = "";
+    bool return_val = false;
+
+    /*
+     In Qt version 5.5, "download" signal is emitted when 'download' attribute is set on 'a' tag.
+     In "download" signal emission, name will be empty and data will be in request object.
+     Earlier version ( < 5.5 ), "urlLinkClicked" signal is emitted so name will contain the object data.
+    */
+    if (name.isEmpty())
+        csv_data = QFileInfo(request.url().toString()).fileName();
+    else
+        csv_data = QString::fromUtf8(name.toEncoded());
+
+    // Extract the filename and value(data) from encoded URL
+    QUrlQuery downloadData(csv_data);
+    QStringList keyValueData = csv_data.split("&");
+    file_name = downloadData.queryItemValue("filename");
+    write_data = downloadData.queryItemValue("value");
+
+    int key_value_length = keyValueData.size();
+    int i_count = 0;
+
+    while (i_count < key_value_length)
+    {
+        // Extract the extension after "data:" word found from encoded url.
+        QString start_match_string = "data:";
+        int s_offset = keyValueData.at(i_count).indexOf(start_match_string);
+        if (s_offset != -1)
+        {
+            int format_offset = keyValueData.at(i_count).indexOf("/");
+            mime_type = keyValueData.at(i_count).mid((format_offset+1));
+            break;
+        }
+
+        int split_offset = keyValueData.at(i_count).indexOf("=");
+        if (split_offset == -1)
+        {
+            mime_type = keyValueData.at(i_count);
+            break;
+        }
+
+        i_count += 1;
+    }
+
+    // Write data to file
+    if (!write_data.isEmpty())
+    {
+        QString filename = "";
+        QString f_name = "";
+        QFileDialog saveAsdialog(this);
+        saveAsdialog.setAcceptMode(QFileDialog::AcceptSave);
+        saveAsdialog.selectNameFilter(tr("Files (*.%1)").arg(mime_type));
+        saveAsdialog.setWindowTitle(tr("Save %1 file").arg(mime_type));
+        saveAsdialog.setDirectory(m_last_open_folder_path);
+        saveAsdialog.selectFile(file_name);
+        saveAsdialog.setDefaultSuffix(mime_type);
+
+        QObject::connect(&saveAsdialog, SIGNAL(directoryEntered(const QString &)), this, SLOT(current_dir_path(const QString &)));
+        m_dir = m_last_open_folder_path;
+
+        if (saveAsdialog.exec() == QDialog::Accepted) {
+            filename = saveAsdialog.selectedFiles().at(0);
+            QString filename = saveAsdialog.selectedFiles().first();
+            f_name = filename.replace(m_dir, "");
+            // Remove first character from fiename
+            f_name.remove(0,1);
+        }
+
+        // clear last open folder path
+        m_dir.clear();
+
+        return_val = true;
+
+#ifdef __APPLE__
+        // Check that user has given valid file name or not - forward slash is not allowed in file name
+        // In Mac OSX, forward slash is converted to colon(:) by Qt so we need to check for colon.
+        if (f_name.indexOf(":") != -1)
+        {
+            QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+            return return_val;
+        }
+#else
+        // Check that user has given valid file name or not - forward slash is not allowed in file name
+        if (f_name.indexOf("/") != -1)
+        {
+            QMessageBox::information(this, tr("File name error"), tr("Invalid file name"));
+            return return_val;
+        }
+#endif
+        if(!filename.isEmpty())
+        {
+            // Save last open folder path
+            m_last_open_folder_path = QFileInfo(filename).path();
+            // Decode the encoded uri data
+            QString csvData = QUrl::fromPercentEncoding(write_data.toUtf8());
+
+            QFile csvfile(filename);
+            if (!csvfile.open(QIODevice::WriteOnly | QIODevice::Text))
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while opening file %1").arg(filename));
+                return return_val;
+            }
+            // Write csv data to file
+            qint64 data_return = csvfile.write(csvData.toUtf8().constData());
+            if (data_return == -1)
+            {
+                QMessageBox::information(this, tr("Save csv file"), tr("Error while writing data to file %1").arg(filename));
+                csvfile.close();
+                return return_val;
+            }
+            csvfile.close();
+        }
+    }
+
+    return return_val;
+}
+
+void BrowserWindow::current_dir_path(const QString &dir)
+{
+    m_dir = dir;
+    m_last_open_folder_path = dir;
+}
+
 // Slot: Link is open from pgAdmin mainwindow
 void BrowserWindow::urlLinkClicked(const QUrl &name)
 {
+    // Check that request contains the data download at client side
+    QNetworkRequest request;
+    if (checkClientDownload(name, request))
+        return;
+
     // First check is there any tab opened with same URL then open it again.
     int tabFound = findURLTab(name);
 
@@ -353,6 +791,11 @@ void BrowserWindow::urlLinkClicked(const QUrl &name)
         m_addNewGridLayout->setContentsMargins(0, 0, 0, 0);
         m_addNewWebView = new WebViewWindow(m_addNewTab);
 
+	// Listen for the download request from the web page
+	m_addNewWebView->page()->setForwardUnsupportedContent(true);
+        connect(m_addNewWebView->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(download(const QNetworkRequest &)));
+        connect(m_addNewWebView->page(), SIGNAL(unsupportedContent(QNetworkReply*)), this, SLOT(unsupportedContent(QNetworkReply*)));
+
         m_widget = new QWidget(m_addNewTab);
         m_toolBtnBack = new QToolButton(m_widget);
         m_toolBtnBack->setFixedHeight(PGA_BTN_SIZE);
diff --git a/runtime/BrowserWindow.h b/runtime/BrowserWindow.h
index 43f90fe..7200ff3 100644
--- a/runtime/BrowserWindow.h
+++ b/runtime/BrowserWindow.h
@@ -54,6 +54,12 @@ public slots:
     void tabIndexChanged(int index);
     void goBackPage();
     void goForwardPage();
+    void download(const QNetworkRequest &request);
+    void unsupportedContent(QNetworkReply * reply);
+    void downloadFinished();
+    void downloadFileProgress(qint64 , qint64 );
+    void progressCanceled();
+    void current_dir_path(const QString &dir);
 
 private:
     QString m_appServerUrl;
@@ -79,10 +85,20 @@ private:
 
     bool m_initialLoad;
     int m_loadAttempt;
+    QString m_downloadFilename;
+    int m_downloadStarted;
+    int m_downloadCancelled;
+    QFile *m_file;
+    QProgressDialog *m_progressDialog;
+    QString m_defaultFilename;
+    QString m_last_open_folder_path;
+    QString m_dir;
+    QNetworkReply *m_reply;
 
     void createActions();
     void pause(int seconds = 1);
     int  findURLTab(const QUrl &name);
+    bool checkClientDownload(const QUrl &name, const QNetworkRequest &request);
 };
 
 #endif // BROWSERWINDOW_H
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 295caf4..2df2b5f 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -2587,7 +2587,7 @@ define(
                 keys = _.pluck(self.columns, 'name');
 
             // Fetch the items from fullCollection and convert it as csv format
-            var csv = labels.join(',') + '\n';
+            var csv = keys.join(',') + '\n';
             csv += coll.map(function(item) {
                 return _.map(keys, function(key) {
                   var cell = csv_col [key].cell,
@@ -2600,7 +2600,7 @@ define(
             }).join('\n');
 
             // Download the file.
-            var encodedUri = encodeURI('data:text/csv;charset=utf-8,' + csv),
+            var encodedUri = encodeURI('data:text/csv&charset=utf-8&filename=download.csv&value=' + csv),
                     link = document.createElement('a');
             link.setAttribute('href', encodedUri);
 


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [pgAdmin4][runtime]: Download feature in runtime
  2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-06-30 14:01 ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-01 04:43   ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-07-01 09:09     ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-06 08:12       ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
  2016-07-07 08:43         ` Re: [pgAdmin4][runtime]: Download feature in runtime Dave Page <[email protected]>
  2016-07-08 06:17           ` Re: [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
@ 2016-07-13 11:26             ` Dave Page <[email protected]>
  0 siblings, 0 replies; 8+ messages in thread

From: Dave Page @ 2016-07-13 11:26 UTC (permalink / raw)
  To: Neel Patel <[email protected]>; +Cc: pgadmin-hackers

Thanks - applied.

On Fri, Jul 8, 2016 at 7:17 AM, Neel Patel <[email protected]> wrote:
> Hi Dave,
>
> Please find attached patch file for the fix of crash and comment text.
> Downloading cancel request was not handled properly and due to that
> application was getting crashed.
>
> Do review it and let us know for comments.
>
> Thanks,
> Neel Patel
>
> On Thu, Jul 7, 2016 at 2:13 PM, Dave Page <[email protected]> wrote:
>>
>> Hi
>>
>> On Wed, Jul 6, 2016 at 9:12 AM, Neel Patel <[email protected]>
>> wrote:
>> > Hi Dave,
>> >
>> > I have tried to fix most of the review comments.  I have modified the
>> > patch
>> > on top of your changes. Please find attached updated patch file.
>> > Find my comments inline. Can you please review and let us know your
>> > feedback
>> > ?
>>
>> That's definitely getting there;
>>
>> - Please make sure you follow the code style requirements, e.g.
>> //<space>Comment text
>>
>> - In your comments, typically you should refer to the user as "the
>> user" not just "user". e.g.
>>   // Check that *the* user has given *a* valid file name or not
>>
>>   The same applies to other cases where you miss the article
>> (https://en.wikipedia.org/wiki/Article_(grammar)):
>>   // Check that *the* request contains the data download at client side
>>
>> NOTE: This isn't a criticism of you in particular - most of the team
>> do this, I assume because it's more like the way you'd phrase things
>> in Hindi. I just find myself correcting such mistakes regularly, and
>> it's good for us all to continue to improve in general.
>>
>> - I was able to reproduce the crash again:
>>   1) Open a tab, and go to the PostgreSQL download page on
>> enterprisedb.com (linked from the pg.org site)
>>   2) Start to download the 9.6b2 Win64 installer
>>   3) Cancel the download
>>   4) Click the link to download if your download didn't automatically
>> start
>>   5) Overwrite the existing file
>>
>> This results in:
>>   a) The progress bar flashes up and down weirdly on the second download
>>   b) The app crashes when the download completes:
>>
>> The program has unexpectedly finished.
>>
>> /Users/dpage/git/pgadmin4/build-pgAdmin4-Desktop_Qt_5_5_1_clang_64bit2-Debug/pgAdmin4.app/Contents/MacOS/pgAdmin4
>> crashed
>>
>> See the attached backtrace.
>>
>> Thanks!
>>
>> > On Fri, Jul 1, 2016 at 2:39 PM, Dave Page <[email protected]> wrote:
>> >>
>> >> On Fri, Jul 1, 2016 at 5:43 AM, Neel Patel
>> >> <[email protected]>
>> >> wrote:
>> >> > Hi Dave,
>> >> >
>> >> > On Thu, Jun 30, 2016 at 7:31 PM, Dave Page <[email protected]> wrote:
>> >> >>
>> >> >> Hi
>> >> >>
>> >> >> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
>> >> >> <[email protected]> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > Please find attached patch file for initial version of download
>> >> >> > file
>> >> >> > in
>> >> >> > runtime application.
>> >> >>
>> >> >> I've attached an update with some improved messages, and setting the
>> >> >> progress dialogue to be modal (seeing as we cannot have multiple
>> >> >> downloads, and it's easy to lose the dialogue).
>> >> >>
>> >> >> > With this patch, we have implemented two features.
>> >> >> >
>> >> >> > Feature 1 :- Normal "Download file" from runtime application
>> >> >> >
>> >> >> > Previously "Download file" was not implemented in runtime
>> >> >> > application.
>> >> >> > With this patch file, we have handled Qt signal for download file
>> >> >> > properly.
>> >> >>
>> >> >> This seems to work fine. I did get one crash (after I cancelled a
>> >> >> download, then tried it again), but I couldn't reproduce that.
>> >> >
>> >> >
>> >> > Okay. I will try to reproduce the issue and also i will try to review
>> >> > the
>> >> > code again if i can find something regrading crash.
>> >
>> >
>> > I have tried to reproduce the crash but no luck. I have tried on Linux
>> > and
>> > Mac.
>> >
>> >>
>> >>
>> >> Thanks.
>> >>
>> >> >
>> >> >>
>> >> >> > Feature 2 :-   "download" attribute support for 'a' tag for client
>> >> >> > side
>> >> >> > download
>> >> >> >
>> >> >> > As per our knowledge, webkit has not implemented the download
>> >> >> > attribute
>> >> >> > at
>> >> >> > 'a' tag.
>> >> >> > Currently it shows under development from below link.
>> >> >> >
>> >> >> > https://bugreports.qt.io/browse/QTBUG-47732
>> >> >> >
>> >> >> > We did not found any signal in Qt for download attribute feature
>> >> >> > but
>> >> >> > to
>> >> >> > implement this feature in runtime application, we added one
>> >> >> > workaround
>> >> >> > to
>> >> >> > make it work with download CSV file.
>> >> >> >
>> >> >> > When we click on download buttons, we are getting Qt signal
>> >> >> > "urlLinkClicked"
>> >> >> > and in that url we are finding "data:text/csv" from encoded URL
>> >> >> > generated
>> >> >> > from sqleditor. Once we found that tag then we are decoding the
>> >> >> > csv
>> >> >> > data
>> >> >> > and
>> >> >> > writing to file.
>> >> >> >
>> >> >> > Is that right approach ? Should we add our own custom mime-type to
>> >> >> > header ?
>> >> >> > Let us know your thoughts on this feature.
>> >> >>
>> >> >> This doesn't work so well, for a number of reasons:
>> >> >>
>> >> >> 1) QT Creator is complaining that your regexp contains an invalid
>> >> >> escape sequence (line 546).
>> >> >
>> >> >
>> >> > I will fix.
>> >> >>
>> >> >>
>> >> >> 2) The default file name seems to be the entire data blob. I would
>> >> >> suggest making the file name "download.csv" if we don't know
>> >> >> anything
>> >> >> better. The "csv" part should be taken from the mime type (see
>> >> >> below)
>> >> >>
>> >> >> 3) Should we handle all "data:" downloads in this way? Taking the
>> >> >> file
>> >> >> type and default extension from the mimetype offered.
>> >> >
>> >> >
>> >> > We can handle all "data:" download. We will extract the filename and
>> >> > extension from mime type.
>> >> > As i know, Qt provides QUrlQuery class which will be useful to find
>> >> > the
>> >> > key
>> >> > value pair. I will test and let you know.
>> >> >
>> >> > e.g. If we have header as below
>> >> >
>> >> >
>> >> >
>> >> > "data:text/csv;charset=utf-8;Content-disposition:attachment;filename=download.csv;"
>> >> >
>> >> > From the QurlQuery class we can query "filename" and "data:" and
>> >> > accordingly
>> >> > save the data to filename provided.
>> >> >
>> >> > Please suggest.
>> >>
>> >> Sounds good.
>> >>
>> >> >> 4) When I change the filename the data is properly saved, but then I
>> >> >> get a confirmation message that still has the full data blob as the
>> >> >> filename.
>> >
>> >
>> > I found that it is due to different Qt version. You might be using Qt
>> > 5.5.
>> > In Qt 5.5, we are getting "download" signal and for Qt < 5.5 we are
>> > getting
>> > "urlLinkClicked" signal for client side data download.
>> > We have fixed the issue for all Qt version. Let me know if you can still
>> > able to reproduce the issue.
>> >
>> >>
>> >> >>
>> >> >> 5) It somehow seems to have let me save files with forward slashes
>> >> >> in
>> >> >> the name. See attachment.
>> >
>> >
>> > Fixed.
>> >
>> >> >
>> >> >
>> >> > I think we should not ask for "Save as" dialog. If there is no key
>> >> > found
>> >> > of
>> >> > "filename" in encodedURI then we should create the file
>> >> > "download.csv"
>> >> > in
>> >> > user's download directory and save the csv data.
>> >>
>> >> Well we can get the extension from the mimetype in that instance, but
>> >> otherwise I agree with the naming. I do think we need a Save As
>> >> dialogue, as the user should be able to choose the location for the
>> >> file (and rename it). We should also remember the last save location
>> >> for convenience.
>> >
>> >
>> > Fixed.
>> >
>> >>
>> >>
>> >> >> 6) I get all sorts of weird redrawing on the screen when downloading
>> >> >> a
>> >> >> data blob. I suspect it's because the filename (which is still the
>> >> >> entire data blob) is shown on the progress dialogue.
>> >> >>
>> >
>> >
>> > Fixed.
>> >
>> >>
>> >> >
>> >> > I will try to fix as per above comments and submit the patch again.
>> >> > Let us know for any misunderstanding.
>> >>
>> >> Cool, thanks.
>> >>
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2016-07-13 11:26 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 09:42 [pgAdmin4][runtime]: Download feature in runtime Neel Patel <[email protected]>
2016-06-30 14:01 ` Dave Page <[email protected]>
2016-07-01 04:43   ` Neel Patel <[email protected]>
2016-07-01 09:09     ` Dave Page <[email protected]>
2016-07-06 08:12       ` Neel Patel <[email protected]>
2016-07-07 08:43         ` Dave Page <[email protected]>
2016-07-08 06:17           ` Neel Patel <[email protected]>
2016-07-13 11:26             ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox