Re: v3.0 release on hold

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>, Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>, Syed Fahar Abbas <fahar(dot)abbas(at)enterprisedb(dot)com>, Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
Subject: Re: v3.0 release on hold
Date: 2018-03-23 05:36:31
Message-ID: CANxoLDfH-sJk49vtg_cnHevkYwWXxFS4OUtXjNdMpNuxd082Cg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, Mar 22, 2018 at 10:24 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Thu, Mar 22, 2018 at 1:13 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>>
>>>>>> 2) Starting a second instance of the app bundle on Mac doesn't always
>>>>>> open a new pgAdmin window as it should. It works fine in the debugger, or
>>>>>> if you start the app with a command like: "/Applications/pgAdmin\
>>>>>> 4.app/Contents/MacOS/pgAdmin4". It doesn't work if you double-click
>>>>>> the appbundle or use a command like "open /Applications/pgAdmin\ 4.app"
>>>>>>
>>>>>
>>>>> Still working on this, not found any solution yet.
>>>>>
>>>>
>>> Not able to figure out the solution yet. I have tried to debug
>>> the code, but every time it will create a new instance(tray icon). Do I
>>> need to look into the code or something related to app bundle may be some
>>> settings in info.plist or any other pointer?
>>>
>>
>> Have a look at the code around line 85 an onwards of pgAdmin4.cpp. It
>> creates the shared memory interlock (and log/address files) based on the
>> current username and a hash of the executable name/path. My suspicion is
>> that the path hash (which is calculated from argv[0] on line 72) is for
>> some reason getting a different value each time when launched via the
>> Finder or "open", thus the interlock is failing.
>>
>
> So I took a look at this, and it seems the code is just fine. What is
> happening is that macOS only allows a single instance of an app to run at
> once. Whilst that is what we want of course, macOS is causing the new
> instance to exit before it has a change to open a new pgAdmin window. Using
> "open -n ..." or calling the embedded executable directly resolves that
> issue.
>
> So, there's another challenge to figure out... :-(
>

OK. Will try to figure that out.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

--
*Akshay Joshi*

*Sr. Software Architect *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Khushboo Vashi 2018-03-23 05:43:44 Re: v3.0 release on hold
Previous Message Joao De Almeida Pereira 2018-03-22 18:27:47 Re: Showstopper desktop runtime issue