Bug 377199 - Cannot open multiple versions of Krita simultaneously
Summary: Cannot open multiple versions of Krita simultaneously
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 3.1.2
Platform: macOS (DMG) macOS
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-04 13:32 UTC by Michael Schwarz
Modified: 2017-03-16 09:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Schwarz 2017-03-04 13:32:23 UTC
I can't open multiple copies/versions of Krita at the same time, at least on OS X 10.11.6. This makes testing for regressions and comparing the behaviour with an older version very inconvenient.

Let's say I open Krita 3.1.2 and then double-click on Krita 3.1.1. The icon briefly appears in the dock and then disappears again. Launching the binary from the command line produces the following output:

    $ /Applications/Krita\ 3.1.1.app/Contents/MacOS/krita 
    QCoreApplication::arguments: Please instantiate the QApplication object first
    krita.lib.pigment: Compiled for arch: 4
    krita.lib.pigment: Features supported:
    krita.lib.pigment: 	 "SSE2" 	---	 yes
    krita.lib.pigment: 	 "SSSE3" 	---	 yes
    krita.lib.pigment: 	 "SSE4.1" 	---	 yes
    krita.lib.pigment: 	 "AVX " 	---	 no
    krita.lib.pigment: 	 "AVX2 " 	---	 no
    No "breeze" available.
    Set style "fusion"
    OpenGL Info
      Vendor:  ATI Technologies Inc.
      Renderer:  ATI Radeon HD 4850 OpenGL Engine
      Version:  3.3 ATI-10.0.51
      Shading language:  3.30
      Requested format:  QSurfaceFormat(version 3.2, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 0, profile  1)
      Current format:    QSurfaceFormat(version 3.3, options QFlags(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile  1)
         Version: 3 . 3
         Supports deprecated functions false
    krita has opengl true
    Setting XDG_DATA_DIRS "/Applications/Krita 3.1.1.app/Contents/share"
    Available translations QSet("en_US")
    Available domain translations QSet("en_US")
    Override language: ""

Comparing this to other applications on OS X/macOS, I would have assumed this to just work. If there is some deeper, hard to fix problem preventing this use-case from working, I would suggest that the second instance of Krita should at least display a dialog explaining why this does now work.
Comment 1 Halla Rempt 2017-03-04 14:22:01 UTC
That's not a bug, but a feature, requested by users. It means that newly opened documents go into the existing krita window, instead of in a new process/window. We might be adding a commandline flag to disable the single-application mode at some point, but that's not going to happen soon.
Comment 2 Michael Schwarz 2017-03-04 20:31:39 UTC
(In reply to Boudewijn Rempt from comment #1)
> That's not a bug, but a feature, requested by users. It means that newly
> opened documents go into the existing krita window, instead of in a new
> process/window. We might be adding a commandline flag to disable the
> single-application mode at some point, but that's not going to happen soon.

Thank you for your response.

I think you may have misunderstood my explanation. First of all, that use-case does not even work. When I open one version of Kirta and then explicitly open a document with the another version (e.g. by right-clicking and choosing Open With > Krita [version]), the selected version of Krita just opens and closes again, without the document getting opened in the already-open version of Krita.

Secondly, the use-case you are describing is already solved by macOS. Each document is associated with the bundle ID of the application it should be opened with. If an application with that bundle ID is already open, the event to open a document is sent to that application, otherwise the application will be launched before sending the event. What this means is that even if I have multiple versions installed, if one of them is already running, double-clicked documents will be opened by that version.

Nonetheless, the issue I'm describing does not relate to how documents are opened when multiple versions of Krita are installed. I'm talking about opening the _application itself_. I ask you to reconsider this issue as it is a contradiction to how applications on macOS are supposed to work (i.e. how they work when using Core Foundation). My perception is that the answers to questions like this will influence how well Krita will be accepted on macOS in the long run.
Comment 3 Halla Rempt 2017-03-16 09:44:45 UTC
Git commit 2ef180dde22df906cf729be776141571b471ddef by Boudewijn Rempt.
Committed on 16/03/2017 at 09:41.
Pushed by rempt into branch 'master'.

Probably most useful for developers and really busy people like
Bollebib with really big hardware. Others are probably better
of loading resources only once.
CCMAIL:kimageshop@kde.org

M  +3    -2    krita/main.cc
M  +5    -0    libs/ui/dialogs/kis_dlg_preferences.cc
M  +15   -1    libs/ui/forms/wdggeneralsettings.ui

https://commits.kde.org/krita/2ef180dde22df906cf729be776141571b471ddef
Comment 4 Halla Rempt 2017-03-16 09:48:11 UTC
Git commit 598621a95baeaa3dfb75e0049e7a956dab3a73ee by Boudewijn Rempt.
Committed on 16/03/2017 at 09:48.
Pushed by rempt into branch 'krita/3.1'.

Probably most useful for developers and really busy people like
Bollebib with really big hardware. Others are probably better
of loading resources only once.
CCMAIL:kimageshop@kde.org

M  +3    -2    krita/main.cc
M  +5    -0    libs/ui/dialogs/kis_dlg_preferences.cc
M  +15   -1    libs/ui/forms/wdggeneralsettings.ui

https://commits.kde.org/krita/598621a95baeaa3dfb75e0049e7a956dab3a73ee