Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezFNa-0001Dp-6n for pgadmin-hackers@arkaria.postgresql.org; Fri, 23 Mar 2018 05:36:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ezFNZ-0006nk-8d for pgadmin-hackers@arkaria.postgresql.org; Fri, 23 Mar 2018 05:36:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezFNY-0006nZ-Un for pgadmin-hackers@lists.postgresql.org; Fri, 23 Mar 2018 05:36:41 +0000 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ezFNS-0005L1-6Q for pgadmin-hackers@postgresql.org; Fri, 23 Mar 2018 05:36:40 +0000 Received: by mail-qt0-x22e.google.com with SMTP id i8so11444626qtj.0 for ; Thu, 22 Mar 2018 22:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hrvDKx2JMwJy0jr681fy8c51FGrZiVFF0g7A/un0MyM=; b=0/12Na1We5c8LgbDR5wFgr52x3wdAukHD/dDOxDjLzTpk6CrFHj7/Ma93lV/gZwB7r XMZNFOwAvJ6zu2WcsR1X1qeAGFmM3m2+pXJO+CvAh7meSXbbdP1DzKrEChUM8CCxKrmK tUWgssioAftMKiViMtQu5faapjylY5/tSBobpA27GSZFzZ42dhaQxCyFXKqeJynskw81 FXFaJwiVXdFmoK20zjXZ1cLqGRni7JSclFtfbwRhgUMWA1A4+si7l7OXlyyydoCBMtm3 5RabMa3NeBGRAN3Dwu6r4HjzslGzzBIp8cAD2EyY8YypzqDstIVRb4q1ehv4khDJ0rqa BAvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hrvDKx2JMwJy0jr681fy8c51FGrZiVFF0g7A/un0MyM=; b=D4b8cEO9O44fb530vkMHT5ChEKMFVn0e6ksVp+2rdVqKojD49+baXt8vXi/ME+NXvO VfTcl36pFajRg7Ke3jmkcd3vx0NNezQIr33uzpB4ald0PhA+KI5SqEooI1KLSFmsP+9Q YU0F1YLCBuNSUkBD1aj8QrFv2jVQCtQrDTrapOnPEIo15hRyJGaagdPtPqKe6F1XtzJ1 H7wX6KB0ICRWUDAR9sht5i4RpPgSfj7WerzsEyc/pnC9uRLwap6CC7Sl6ynMC4JRiMLy rEZ8lK4vx4HQ+Zyj18MQJCWkTOa5+5JIHMbqPPvmOBKUif7eRD5oVY4PSKchGMoiihMy wzFA== X-Gm-Message-State: AElRT7EH0RI/ce4MgA1U5aHZVA2VtOdKDyTqhM9UUo+fZIl2BIWfxdmk oljngiHRY2Sob/LQJNo7xAnCEjKfZEaWYJ5yE6Kj8A== X-Google-Smtp-Source: AG47ELum34da1/Si5Hg32MU9kMaHWTrq3CDv9TAv6QgI/i3V9Bs2jnQr4EgQw1OVxfByzaFDpJEeo1qGhREYxftdn6c= X-Received: by 10.200.1.2 with SMTP id e2mr34773859qtg.121.1521783392088; Thu, 22 Mar 2018 22:36:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.194.131 with HTTP; Thu, 22 Mar 2018 22:36:31 -0700 (PDT) In-Reply-To: References: From: Akshay Joshi Date: Fri, 23 Mar 2018 11:06:31 +0530 Message-ID: Subject: Re: v3.0 release on hold To: Dave Page Cc: pgadmin-hackers , Murtuza Zabuawala , Khushboo Vashi , Syed Fahar Abbas , =?UTF-8?B?RGV2cmltIEfDnE5Ew5xa?= Content-Type: multipart/alternative; boundary="f403045f39e482d5ed05680dce98" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f403045f39e482d5ed05680dce98 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 22, 2018 at 10:24 PM, Dave Page wrote: > Hi > > On Thu, Mar 22, 2018 at 1:13 PM, Dave Page 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* --f403045f39e482d5ed05680dce98 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Mar 22, 2018 at 10:24 PM, Dave Page <dpage@pgadmin.org>= wrote:
Hi

On = Thu, Mar 22, 2018 at 1:13 PM, Dave Page <dpage@pgadmin.org> = wrote:
<= div dir=3D"ltr">

2) Starting a= second instance of the app bundle on Mac doesn't always open a new pgA= dmin window as it should. It works fine in the debugger, or if you start th= e app with a command like: "/Applications/pgAdmin\ 4.app/Contents/MacO= S/pgAdmin4". It doesn't work if you double-click the appbundl= e or use a command like "open /Applications/pgAdmin\ 4.app"
=

=C2=A0 Still working on this,= not found any solution yet.

=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0Not able to figure out the solution yet. I have tried to debu= g the code, but every time it will create a new instance(tray icon). Do I n= eed to look into the code or something related to app bundle may be some se= ttings in info.plist or any other pointer?=C2=A0

Have a look at the code around line 85= an onwards of pgAdmin4.cpp. It creates the shared memory interlock (and lo= g/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 ar= gv[0] on line 72) is for some reason getting a different value each time wh= en launched via the Finder or "open", thus the interlock is faili= ng.

So I too= k 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 t= hat is what we want of course, macOS is causing the new instance to exit be= fore it has a change to open a new pgAdmin window. Using "open -n ...&= quot; or calling the embedded executable directly resolves that issue.

So, there's another challenge to figure out... :-(= =C2=A0

=C2=A0 =C2= =A0 OK. Will try to figure that out.=C2=A0
<= br>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @= pgsnake

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



--
Akshay Joshi
Sr. Software Architect
=

<= /font>

Phone: +91 20-3058-9517
Mob= ile: +91 976-788-8246
--f403045f39e482d5ed05680dce98--