imagej / imagej/pyimagej

pyimagej interefering with Tkinter GUI on Mac

Open
#39 2 comments 0 reactions 0 assignees View on GitHub
bug macos-gui
Dominant language
Python
Stars
534
Forks
95
PR merge metrics
No merged PRs in 30d

Description

I have an application using pyimagej for image processing and want to make a very simple interface for the users to provide some inputs. I am using tkinter for this gui. When I initialize pyimagej either in that script or one of its imports, it fails to produce the gui, but does not crash. It just shows the following message:
`2019-05-31 16:47:01.581 python[27137:9099880] In -[NSApplication(NSQuietSafeQuit) _updateCanQuitQuietlyAndSafely], _LSSetApplicationInformationItem(NSCanQuitQuietlyAndSafely) returned error -50`

Here is some dummy example code that reproduces this:
```
import imagej
import tkinter as tk
ij = imagej.init('sc.fiji:fiji:2.0.0-pre-10')
root = tk.Tk()
tk.Label(root, text='Test1').grid(row=0, column=0)
tk.Checkbutton(root, text='Test2').grid(row=1, column=0)
root.mainloop()
```

Without the imagej initialization, it runs fine. It happens both with a maven initialization and when wrapping the local Fiji installation. This problem **does not** reproduce on Windows for me (there, the gui comes up as expected) and I don't know whether it reproduces on Linux.
I do get this issue on my Mac running macOS 10.14.5.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the minimal example around imagej.init('sc.fiji:fiji:2.0.0-pre-10') followed by tkinter.Tk() on macOS 10.14.5, then compare it with the local Fiji initialization path and the Windows result. Done means the Tkinter window appears and remains usable after either pyimagej initialization path, without the reported macOS message preventing the GUI.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.