pgAdmin 4 commit: Fix usage of QString::toUtf8(). Fixes #2299

From: Dave Page <dpage(at)pgadmin(dot)org>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin 4 commit: Fix usage of QString::toUtf8(). Fixes #2299
Date: 2017-03-28 12:26:20
Message-ID: E1csqCa-0000r7-VH@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Fix usage of QString::toUtf8(). Fixes #2299

Desktop runtime has a couple bugs using already freed memory supplied to embedded python leading to occasional crashes and failures to start maintenance processes (VACUUM, ANALYZE, REINDEX, CLUSTER).

This is caused by incorrect usage of QString::toUtf8() which returns newly created QByteArray which is automatically destroyed once closing context; e.g.
Py_SetPythonHome(pythonHome.toUtf8().data());

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=72548a99e142ec508e815a7e50c5611e2fe34407
Author: Maxim Zakharov <dp(dot)maxime(at)gmail(dot)com>

Modified Files
--------------
runtime/Server.cpp | 32 ++++++++++++++++++++------------
runtime/Server.h | 5 +++++
2 files changed, 25 insertions(+), 12 deletions(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-03-28 12:41:42 pgAdmin 4 commit: Add header that seems to be needed with Python 3.
Previous Message Khushboo Vashi 2017-03-28 06:41:23 Re: [pgAdmin4][Patch]: Fixed Ascending/Descending order in backgrid