beeware / Python-Apple-support

A meta-package for building a version of Python that can be embedded into a macOS, iOS, tvOS or watchOS project.
MIT License
1.11k stars 160 forks source link

MultilineTextInput crashes #113

Closed rkimoakbioinformatics closed 2 years ago

rkimoakbioinformatics commented 3 years ago

Describe the bug MultilineTextInput crashes briefcase run iOS.

To Reproduce

  1. Make test folder.
  2. Go to the test folder.
  3. briefcase new
  4. Change src/test/app.py to:
    
    import toga
    from toga.style import Pack
    from toga.style.pack import COLUMN, ROW

class App(toga.App):

def startup(self): main_box = toga.Box(style=Pack(alignment = 'top', direction = COLUMN)) label = toga.MultilineTextInput(initial='Test') main_box.add(label) self.main_window = toga.MainWindow(title=self.formal_name) self.main_window.content = main_box self.main_window.show()

def main(): return App()


4. `briefcase create iOS`
5. `briefcase build iOS`. I used iPhone 12.
6.  `briefcase run iOS`. I used iPhone 12.
7. The app installs on the iPhone simulator but the app starts and then the entire screen of the simulated phone goes black.
8. Change the MultilineTextInput part in the app.py to `toga.Label('test')` and do the same. It will run normally.

**Expected behavior**
The app should start and "Test" multi-line input box should appear on white background on the simulated phone.

**Environment:**
 - Operating System: macOS Big Sur 11.2.1
 - Python version: 3.8 (on a Miniconda env)
 - Software versions:
   - Briefcase: 0.3.4
   - Toga: 0.3.0.dev26
- Hardware: MacBook Air M1 chip
rkimoakbioinformatics commented 3 years ago

system.log of the iPhone simulator has the following error message:

Mar  2 15:25:26 Ricks-Air Mobile OpenCRAVAT[26522]: assertion failed: 20D74 18D46: libxpc.dylib + 50260 [26B6416F-496E-32F6-AC9D-FFCD86331B43]: 0x7d
freakboy3742 commented 2 years ago

Apologies for the delayed response; I believe this may have been caused by beeware/toga#1440, which has now been fixed.

rkimoakbioinformatics commented 2 years ago

Thanks!