ywangd / stash

StaSh - Shell for Pythonista
MIT License
1.94k stars 227 forks source link

stash crashes on starting #136

Closed ifuchs closed 8 years ago

ifuchs commented 9 years ago

Stash crashes Pythonista (after ~7 sec) after starting. Here is the stash.log

[2015-09-11 08:09:26,509] [INFO] [MainThread] [StaSh] [init] [1657] - Before main screen [2015-09-11 08:09:26,511] [INFO] [MainThread] [StaSh] [init] [1663] - Before mini buffer [2015-09-11 08:09:26,513] [INFO] [MainThread] [StaSh] [init] [1668] - Before stream [2015-09-11 08:09:26,514] [INFO] [MainThread] [StaSh] [init] [1673] - Before IO [2015-09-11 08:09:26,514] [INFO] [MainThread] [StaSh] [init] [1677] - Before UI [2015-09-11 08:09:26,709] [INFO] [MainThread] [StaSh.UI] [init] [245] - About to create terminal [2015-09-11 08:09:26,711] [INFO] [MainThread] [StaSh.Terminal] [init] [92] - About to configure keyCommands [2015-09-11 08:09:26,711] [INFO] [MainThread] [StaSh.Terminal] [init] [157] - About to subclass SUITextView [2015-09-11 08:09:26,717] [INFO] [MainThread] [StaSh.Terminal] [init] [165] - SUITextView subclassed! [2015-09-11 08:09:26,735] [INFO] [MainThread] [StaSh.Terminal] [init] [172] - About to create instantiate _ShTerminal [2015-09-11 08:09:26,743] [INFO] [MainThread] [StaSh.Terminal] [init] [174] - Configuring tvo [2015-09-11 08:09:26,744] [INFO] [MainThread] [StaSh.Terminal] [init] [177] - content_inset [2015-09-11 08:09:26,752] [INFO] [MainThread] [StaSh.Terminal] [init] [179] - auto_content_inset [2015-09-11 08:09:26,759] [INFO] [MainThread] [StaSh.Terminal] [init] [182] - bgcolor [2015-09-11 08:09:26,769] [INFO] [MainThread] [StaSh.Terminal] [init] [185] - default_font [2015-09-11 08:09:26,773] [INFO] [MainThread] [StaSh.Terminal] [init] [187] - bold_font [2015-09-11 08:09:26,791] [INFO] [MainThread] [StaSh.Terminal] [init] [189] - italic_font [2015-09-11 08:09:26,807] [INFO] [MainThread] [StaSh.Terminal] [init] [191] - bold_italic_font [2015-09-11 08:09:26,818] [INFO] [MainThread] [StaSh.Terminal] [init] [193] - text_color [2015-09-11 08:09:26,828] [INFO] [MainThread] [StaSh.Terminal] [init] [195] - tint_color [2015-09-11 08:09:26,837] [INFO] [MainThread] [StaSh.Terminal] [init] [198] - indicator_style [2015-09-11 08:09:26,855] [INFO] [MainThread] [StaSh.Terminal] [init] [200] - autocapitalization_type [2015-09-11 08:09:26,864] [INFO] [MainThread] [StaSh.Terminal] [init] [202] - auto_content_inset [2015-09-11 08:09:26,873] [INFO] [MainThread] [StaSh.Terminal] [init] [204] - spellchecking_type [2015-09-11 08:09:26,881] [INFO] [MainThread] [StaSh.Terminal] [init] [207] - non_contiguous_layout [2015-09-11 08:09:26,889] [INFO] [MainThread] [StaSh.Terminal] [init] [214] - adding subview [2015-09-11 08:09:26,893] [INFO] [MainThread] [StaSh.Terminal] [init] [216] - Configuring tvo delegate [2015-09-11 08:09:26,903] [INFO] [MainThread] [StaSh.Terminal] [init] [219] - get TextStorage [2015-09-11 08:09:26,904] [INFO] [MainThread] [StaSh.Terminal] [init] [222] - Terminal created! [2015-09-11 08:09:26,905] [INFO] [MainThread] [StaSh.UI] [init] [250] - Terminal created [2015-09-11 08:09:26,906] [INFO] [MainThread] [StaSh] [init] [1680] - Before renderer [2015-09-11 08:09:26,906] [INFO] [MainThread] [StaSh] [init] [1684] - Before parser [2015-09-11 08:09:27,008] [INFO] [MainThread] [StaSh] [init] [1686] - Before expander [2015-09-11 08:09:27,009] [INFO] [MainThread] [StaSh] [init] [1688] - Before runtime [2015-09-11 08:09:27,011] [INFO] [MainThread] [StaSh] [init] [1690] - Before completer [2015-09-11 08:09:27,012] [INFO] [MainThread] [StaSh] [init] [1696] - Before load_rcfile [2015-09-11 08:09:27,012] [INFO] [MainThread] [StaSh.Runtime] [load_rcfile] [1180] - About to load _DEFAULT_RC [2015-09-11 08:09:27,013] [INFO] [MainThread] [StaSh] [call] [1715] - (['BIN_PATH=~/Documents/bin:$BIN_PATH', 'SELFUPDATE_BRANCH=master', 'PYTHONPATH=$STASH_ROOT/lib', "alias env='printenv'", 'alias logout=\'echo "Use the close button in the upper right corner to exit StaSh."\'', "alias help='man'", "alias la='ls -a'", "alias ll='ls -la'", "alias copy='pbcopy'", "alias paste='pbpaste'"],) [2015-09-11 08:09:27,013] [INFO] [MainThread] [StaSh] [call] [1716] - {'add_new_inp_line': False, 'add_to_history': False} [2015-09-11 08:09:27,854] [INFO] [MainThread] [StaSh] [init] [1698] - Before preamble [2015-09-11 08:09:27,854] [INFO] [MainThread] [StaSh.IO] [write] [150] - writing u'\x9b1m\x9b34mStaSh v0.5.0\n\x9b39m\x9b22m' [2015-09-11 08:09:27,855] [INFO] [MainThread] [StaSh.Stream] [feed] [328] - feeding u'\x9b1m\x9b34mStaSh v0.5.0\n\x9b39m\x9b22m', True, False [2015-09-11 08:09:27,856] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 08:09:27,858] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 08:09:27,858] [INFO] [MainThread] [StaSh.Stream] [feed] [338] - calling render False [2015-09-11 08:09:27,859] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [462] - At beginning of render [2015-09-11 08:09:27,859] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [464] - render it now [2015-09-11 08:09:27,860] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [467] - rendering ... [2015-09-11 08:09:27,865] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 08:09:27,867] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 08:09:27,914] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [469] - Done rendering [2015-09-11 08:09:27,915] [INFO] [MainThread] [StaSh.Stream] [feed] [340] - done feeding [2015-09-11 08:09:27,915] [INFO] [MainThread] [StaSh] [init] [1701] - Before script_will_end [2015-09-11 08:09:27,916] [INFO] [MainThread] [StaSh.Runtime] [script_will_end] [1349] - At beginning of script_will_end [2015-09-11 08:09:27,918] [INFO] [MainThread] [StaSh.IO] [write] [150] - writing u'\x9b52m[~/Documents]$ \x9b39m' [2015-09-11 08:09:27,918] [INFO] [MainThread] [StaSh.Stream] [feed] [328] - feeding u'\x9b52m[~/Documents]$ \x9b39m', True, True [2015-09-11 08:09:27,919] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 08:09:27,921] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 08:09:27,921] [INFO] [MainThread] [StaSh.Stream] [feed] [338] - calling render True [2015-09-11 08:09:27,922] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [462] - At beginning of render [2015-09-11 08:09:27,922] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [464] - render it now [2015-09-11 08:09:27,923] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [467] - rendering ... [2015-09-11 08:09:27,928] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 08:09:27,928] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 08:09:27,960] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [469] - Done rendering [2015-09-11 08:09:27,960] [INFO] [MainThread] [StaSh.Stream] [feed] [340] - done feeding [2015-09-11 08:09:27,961] [INFO] [MainThread] [StaSh.Runtime] [script_will_end] [1351] - Done writing prompt [2015-09-11 08:09:27,962] [INFO] [MainThread] [StaSh.Runtime] [script_will_end] [1356] - Done script_will_end [2015-09-11 08:09:27,962] [INFO] [MainThread] [StaSh] [init] [1704] - Before _load_lib

ywangd commented 9 years ago

@ifuchs It seems that the crash is NOT related to the objc_utils module. This could be a good sign because things are nasty to debug with objc_utils.

It looks like the crash is caused by the _load_lib method. The only reason that I can think of is the absolute file paths used in the method. I noticed that Pythonista 1.6 sometimes crashes when trying to write to a file with name specified as a full path from the root directory, e.g. /private/var/mobile/.../.../Documents/somefile. However _load_lib only reads from such files which should be fine.

Nevertheless, here are a few more steps to help further investigation on this issues:

Thanks a lot for the help!

ifuchs commented 9 years ago

Unfortunately both the commenting out of line 1760 and the new fix result in the same crash. Here is the log:

[2015-09-11 09:36:07,627] [INFO] [MainThread] [StaSh] [init] [1657] - Before main screen [2015-09-11 09:36:07,628] [INFO] [MainThread] [StaSh] [init] [1663] - Before mini buffer [2015-09-11 09:36:07,630] [INFO] [MainThread] [StaSh] [init] [1668] - Before stream [2015-09-11 09:36:07,630] [INFO] [MainThread] [StaSh] [init] [1673] - Before IO [2015-09-11 09:36:07,631] [INFO] [MainThread] [StaSh] [init] [1677] - Before UI [2015-09-11 09:36:07,808] [INFO] [MainThread] [StaSh.UI] [init] [245] - About to create terminal [2015-09-11 09:36:07,810] [INFO] [MainThread] [StaSh.Terminal] [init] [92] - About to configure keyCommands [2015-09-11 09:36:07,811] [INFO] [MainThread] [StaSh.Terminal] [init] [157] - About to subclass SUITextView [2015-09-11 09:36:07,816] [INFO] [MainThread] [StaSh.Terminal] [init] [165] - SUITextView subclassed! [2015-09-11 09:36:07,832] [INFO] [MainThread] [StaSh.Terminal] [init] [172] - About to create instantiate _ShTerminal [2015-09-11 09:36:07,840] [INFO] [MainThread] [StaSh.Terminal] [init] [174] - Configuring tvo [2015-09-11 09:36:07,841] [INFO] [MainThread] [StaSh.Terminal] [init] [177] - content_inset [2015-09-11 09:36:07,849] [INFO] [MainThread] [StaSh.Terminal] [init] [179] - auto_content_inset [2015-09-11 09:36:07,856] [INFO] [MainThread] [StaSh.Terminal] [init] [182] - bgcolor [2015-09-11 09:36:07,866] [INFO] [MainThread] [StaSh.Terminal] [init] [185] - default_font [2015-09-11 09:36:07,869] [INFO] [MainThread] [StaSh.Terminal] [init] [187] - bold_font [2015-09-11 09:36:07,873] [INFO] [MainThread] [StaSh.Terminal] [init] [189] - italic_font [2015-09-11 09:36:07,877] [INFO] [MainThread] [StaSh.Terminal] [init] [191] - bold_italic_font [2015-09-11 09:36:07,882] [INFO] [MainThread] [StaSh.Terminal] [init] [193] - text_color [2015-09-11 09:36:07,892] [INFO] [MainThread] [StaSh.Terminal] [init] [195] - tint_color [2015-09-11 09:36:07,902] [INFO] [MainThread] [StaSh.Terminal] [init] [198] - indicator_style [2015-09-11 09:36:07,911] [INFO] [MainThread] [StaSh.Terminal] [init] [200] - autocapitalization_type [2015-09-11 09:36:07,921] [INFO] [MainThread] [StaSh.Terminal] [init] [202] - auto_content_inset [2015-09-11 09:36:07,930] [INFO] [MainThread] [StaSh.Terminal] [init] [204] - spellchecking_type [2015-09-11 09:36:07,939] [INFO] [MainThread] [StaSh.Terminal] [init] [207] - non_contiguous_layout [2015-09-11 09:36:07,948] [INFO] [MainThread] [StaSh.Terminal] [init] [214] - adding subview [2015-09-11 09:36:07,951] [INFO] [MainThread] [StaSh.Terminal] [init] [216] - Configuring tvo delegate [2015-09-11 09:36:07,959] [INFO] [MainThread] [StaSh.Terminal] [init] [219] - get TextStorage [2015-09-11 09:36:07,961] [INFO] [MainThread] [StaSh.Terminal] [init] [222] - Terminal created! [2015-09-11 09:36:07,961] [INFO] [MainThread] [StaSh.UI] [init] [250] - Terminal created [2015-09-11 09:36:07,962] [INFO] [MainThread] [StaSh] [init] [1680] - Before renderer [2015-09-11 09:36:07,962] [INFO] [MainThread] [StaSh] [init] [1684] - Before parser [2015-09-11 09:36:08,064] [INFO] [MainThread] [StaSh] [init] [1686] - Before expander [2015-09-11 09:36:08,065] [INFO] [MainThread] [StaSh] [init] [1688] - Before runtime [2015-09-11 09:36:08,067] [INFO] [MainThread] [StaSh] [init] [1690] - Before completer [2015-09-11 09:36:08,068] [INFO] [MainThread] [StaSh] [init] [1696] - Before load_rcfile [2015-09-11 09:36:08,068] [INFO] [MainThread] [StaSh.Runtime] [load_rcfile] [1180] - About to load _DEFAULT_RC [2015-09-11 09:36:08,069] [INFO] [MainThread] [StaSh] [call] [1716] - (['BIN_PATH=~/Documents/bin:$BIN_PATH', 'SELFUPDATE_BRANCH=master', 'PYTHONPATH=$STASH_ROOT/lib', "alias env='printenv'", 'alias logout=\'echo "Use the close button in the upper right corner to exit StaSh."\'', "alias help='man'", "alias la='ls -a'", "alias ll='ls -la'", "alias copy='pbcopy'", "alias paste='pbpaste'"],) [2015-09-11 09:36:08,069] [INFO] [MainThread] [StaSh] [call] [1717] - {'add_new_inp_line': False, 'add_to_history': False} [2015-09-11 09:36:08,904] [INFO] [MainThread] [StaSh] [init] [1698] - Before preamble [2015-09-11 09:36:08,904] [INFO] [MainThread] [StaSh.IO] [write] [150] - writing u'\x9b1m\x9b34mStaSh v0.5.0\n\x9b39m\x9b22m' [2015-09-11 09:36:08,905] [INFO] [MainThread] [StaSh.Stream] [feed] [328] - feeding u'\x9b1m\x9b34mStaSh v0.5.0\n\x9b39m\x9b22m', True, False [2015-09-11 09:36:08,905] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 09:36:08,908] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 09:36:08,908] [INFO] [MainThread] [StaSh.Stream] [feed] [338] - calling render False [2015-09-11 09:36:08,909] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [462] - At beginning of render [2015-09-11 09:36:08,909] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [464] - render it now [2015-09-11 09:36:08,910] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [467] - rendering ... [2015-09-11 09:36:08,915] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 09:36:08,916] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 09:36:08,955] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [469] - Done rendering [2015-09-11 09:36:08,956] [INFO] [MainThread] [StaSh.Stream] [feed] [340] - done feeding [2015-09-11 09:36:08,956] [INFO] [MainThread] [StaSh] [init] [1701] - Before script_will_end [2015-09-11 09:36:08,957] [INFO] [MainThread] [StaSh.Runtime] [script_will_end] [1349] - At beginning of script_will_end [2015-09-11 09:36:08,958] [INFO] [MainThread] [StaSh.IO] [write] [150] - writing u'\x9b52m[~/Documents]$ \x9b39m' [2015-09-11 09:36:08,958] [INFO] [MainThread] [StaSh.Stream] [feed] [328] - feeding u'\x9b52m[~/Documents]$ \x9b39m', True, True [2015-09-11 09:36:08,959] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 09:36:08,961] [INFO] [MainThread] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 09:36:08,961] [INFO] [MainThread] [StaSh.Stream] [feed] [338] - calling render True [2015-09-11 09:36:08,962] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [462] - At beginning of render [2015-09-11 09:36:08,962] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [464] - render it now [2015-09-11 09:36:08,963] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [467] - rendering ... [2015-09-11 09:36:08,968] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 09:36:08,969] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 09:36:09,000] [INFO] [MainThread] [StaSh.SequentialRenderer] [render] [469] - Done rendering [2015-09-11 09:36:09,001] [INFO] [MainThread] [StaSh.Stream] [feed] [340] - done feeding [2015-09-11 09:36:09,001] [INFO] [MainThread] [StaSh.Runtime] [script_will_end] [1351] - Done writing prompt

On Sep 11, 2015, at 9:05 AM, ywangd notifications@github.com wrote:

@ifuchs https://github.com/ifuchs It seems that the crash is NOT related to the objc_utils module. This could be a good sign because things are nasty to debug with objc_utils.

It looks like the crash is caused by the _load_lib method. The only reason that I can think of is the absolute file paths used in the method. I noticed that Pythonista 1.6 sometimes crashes when trying to write to a file with name specified as a full path from the root directory, e.g. /private/var/mobile/.../.../Documents/somefile. However _load_lib only reads from such files which should be fine.

Nevertheless, here are a few more steps to help further investigation on this issues:

Comment out Line 1706 https://github.com/ywangd/stash/blob/beta16-log/stash.py#L1706. That is change the line from self._load_lib() to # self._load_lib()

Now unload Pythonista completely and restart, then try start StaSh by executing ~/Documents/launch_stash.py.

StaSh may launch successfully this time if the crash is indeed caused by _load_lib() I pushed a fix for the possible absolute path issue and also added more loggings inside _load_lib(). Regardless whether previous step is successful or not, please grab the latest changes by running following command again:

import urllib2; exec urllib2.urlopen('http://bit.ly/gsb16').read() in {'_br': 'beta16-log'} Unload Pythonista complete again and restart, now try start StaSh again.

Hopefully it can now be launched successfully. Please again copy the contents of stash.log file and paste them here to help me debug further.

Thanks a lot for the help!

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139540524.

ywangd commented 9 years ago

Did you paste the full log? It is weird because this time it crashes earlier and not even reached _load_lib(). Is this the log of the second run, i.e. after you getting the latest changes?

ifuchs commented 9 years ago

Yes sir. I deleted stash log along with the rest of stash before downloading the latest version and that is the full stash.log

On Sep 11, 2015, at 9:52 AM, ywangd notifications@github.com wrote:

Did you paste the full log? It is weird because this time it crashes earlier and not even reached _load_lib(). Is this the log of the second run, i.e. after you getting the latest changes?

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139553086.

ywangd commented 9 years ago

I made a few more changes. Could you please try update again?

import urllib2; exec urllib2.urlopen('http://bit.ly/gsb16').read() in {'_br': 'beta16-log'}

I commented out all the print statements in the launch process. So you'll be looking at a black screen if it does start successfully.

Thanks!

ifuchs commented 9 years ago

That worked!

On Sep 11, 2015, at 10:48 AM, ywangd notifications@github.com wrote:

I made a few more changes. Could you please try update again?

import urllib2; exec urllib2.urlopen('http://bit.ly/gsb16').read() in {'_br': 'beta16-log'} I commented out all the print statements in the launch process. So you'll be looking at a black screen if it does start successfully.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139565274.

ywangd commented 9 years ago

Could you try a few commands, e.g. ls, pwd , to see whether they would crash the app? Yes the black screen is still usable and waiting for commands.

On Saturday, 12 September 2015, ifuchs notifications@github.com wrote:

That worked!

On Sep 11, 2015, at 10:48 AM, ywangd <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I made a few more changes. Could you please try update again?

import urllib2; exec urllib2.urlopen('http://bit.ly/gsb16').read() in {'_br': 'beta16-log'} I commented out all the print statements in the launch process. So you'll be looking at a black screen if it does start successfully.

Thanks!

— Reply to this email directly or view it on GitHub < https://github.com/ywangd/stash/issues/136#issuecomment-139565274>.

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139569837.


                  Life is elsewhere
ifuchs commented 9 years ago

The moment I typed the “l” of “ls” it crashed Pythonista.

On Sep 11, 2015, at 11:13 AM, ywangd notifications@github.com wrote:

Could you try a few commands, e.g. ls, pwd , to see whether they would crash the app? Yes the black screen is still usable and waiting for commands.

On Saturday, 12 September 2015, ifuchs notifications@github.com wrote:

That worked!

On Sep 11, 2015, at 10:48 AM, ywangd <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I made a few more changes. Could you please try update again?

import urllib2; exec urllib2.urlopen('http://bit.ly/gsb16').read() in {'_br': 'beta16-log'} I commented out all the print statements in the launch process. So you'll be looking at a black screen if it does start successfully.

Thanks!

— Reply to this email directly or view it on GitHub < https://github.com/ywangd/stash/issues/136#issuecomment-139565274>.

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139569837.


Life is elsewhere — Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139571863.

ywangd commented 9 years ago

So after all, the crash is related to objc part. This could be difficult to fix. Could you please post log file of this crash?

Have you tried any of the sample codes that omz posted to showcase the new objc_utils module? For an example, the one creates an editor using Pythonista built in editor TextView class?

On Saturday, 12 September 2015, ifuchs notifications@github.com wrote:

The moment I typed the “l” of “ls” it crashed Pythonista.

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139597550.


                  Life is elsewhere
ifuchs commented 9 years ago

Here is the log:

[2015-09-11 12:52:08,418] [INFO] [MainThread] [StaSh] [init] [1658] - DEBUG 03 [2015-09-11 12:52:08,419] [INFO] [MainThread] [StaSh] [init] [1660] - Before external_tab_handler [2015-09-11 12:52:08,420] [INFO] [MainThread] [StaSh] [init] [1664] - Before main screen [2015-09-11 12:52:08,421] [INFO] [MainThread] [StaSh] [init] [1670] - Before mini buffer [2015-09-11 12:52:08,423] [INFO] [MainThread] [StaSh] [init] [1675] - Before stream [2015-09-11 12:52:08,424] [INFO] [MainThread] [StaSh] [init] [1680] - Before IO [2015-09-11 12:52:08,424] [INFO] [MainThread] [StaSh] [init] [1684] - Before UI [2015-09-11 12:52:08,602] [INFO] [MainThread] [StaSh.UI] [init] [245] - About to create terminal [2015-09-11 12:52:08,603] [INFO] [MainThread] [StaSh.Terminal] [init] [92] - About to configure keyCommands [2015-09-11 12:52:08,604] [INFO] [MainThread] [StaSh.Terminal] [init] [157] - About to subclass SUITextView [2015-09-11 12:52:08,609] [INFO] [MainThread] [StaSh.Terminal] [init] [165] - SUITextView subclassed! [2015-09-11 12:52:08,628] [INFO] [MainThread] [StaSh.Terminal] [init] [172] - About to create instantiate _ShTerminal [2015-09-11 12:52:08,636] [INFO] [MainThread] [StaSh.Terminal] [init] [174] - Configuring tvo [2015-09-11 12:52:08,637] [INFO] [MainThread] [StaSh.Terminal] [init] [177] - content_inset [2015-09-11 12:52:08,645] [INFO] [MainThread] [StaSh.Terminal] [init] [179] - auto_content_inset [2015-09-11 12:52:08,652] [INFO] [MainThread] [StaSh.Terminal] [init] [182] - bgcolor [2015-09-11 12:52:08,664] [INFO] [MainThread] [StaSh.Terminal] [init] [185] - default_font [2015-09-11 12:52:08,671] [INFO] [MainThread] [StaSh.Terminal] [init] [187] - bold_font [2015-09-11 12:52:08,676] [INFO] [MainThread] [StaSh.Terminal] [init] [189] - italic_font [2015-09-11 12:52:08,681] [INFO] [MainThread] [StaSh.Terminal] [init] [191] - bold_italic_font [2015-09-11 12:52:08,686] [INFO] [MainThread] [StaSh.Terminal] [init] [193] - text_color [2015-09-11 12:52:08,695] [INFO] [MainThread] [StaSh.Terminal] [init] [195] - tint_color [2015-09-11 12:52:08,704] [INFO] [MainThread] [StaSh.Terminal] [init] [198] - indicator_style [2015-09-11 12:52:08,714] [INFO] [MainThread] [StaSh.Terminal] [init] [200] - autocapitalization_type [2015-09-11 12:52:08,724] [INFO] [MainThread] [StaSh.Terminal] [init] [202] - auto_content_inset [2015-09-11 12:52:08,733] [INFO] [MainThread] [StaSh.Terminal] [init] [204] - spellchecking_type [2015-09-11 12:52:08,741] [INFO] [MainThread] [StaSh.Terminal] [init] [207] - non_contiguous_layout [2015-09-11 12:52:08,750] [INFO] [MainThread] [StaSh.Terminal] [init] [214] - adding subview [2015-09-11 12:52:08,752] [INFO] [MainThread] [StaSh.Terminal] [init] [216] - Configuring tvo delegate [2015-09-11 12:52:08,760] [INFO] [MainThread] [StaSh.Terminal] [init] [219] - get TextStorage [2015-09-11 12:52:08,762] [INFO] [MainThread] [StaSh.Terminal] [init] [222] - Terminal created! [2015-09-11 12:52:08,762] [INFO] [MainThread] [StaSh.UI] [init] [250] - Terminal created [2015-09-11 12:52:08,763] [INFO] [MainThread] [StaSh] [init] [1687] - Before renderer [2015-09-11 12:52:08,763] [INFO] [MainThread] [StaSh] [init] [1691] - Before parser [2015-09-11 12:52:08,865] [INFO] [MainThread] [StaSh] [init] [1693] - Before expander [2015-09-11 12:52:08,866] [INFO] [MainThread] [StaSh] [init] [1695] - Before runtime [2015-09-11 12:52:08,868] [INFO] [MainThread] [StaSh] [init] [1697] - Before completer [2015-09-11 12:52:08,869] [INFO] [MainThread] [StaSh] [init] [1703] - Before load_rcfile [2015-09-11 12:52:08,869] [INFO] [MainThread] [StaSh.Runtime] [load_rcfile] [1180] - About to load _DEFAULT_RC [2015-09-11 12:52:08,870] [INFO] [MainThread] [StaSh] [call] [1725] - (['BIN_PATH=~/Documents/bin:$BIN_PATH', 'SELFUPDATE_BRANCH=master', 'PYTHONPATH=$STASH_ROOT/lib', "alias env='printenv'", 'alias logout=\'echo "Use the close button in the upper right corner to exit StaSh."\'', "alias help='man'", "alias la='ls -a'", "alias ll='ls -la'", "alias copy='pbcopy'", "alias paste='pbpaste'"],) [2015-09-11 12:52:08,871] [INFO] [MainThread] [StaSh] [call] [1726] - {'add_new_inp_line': False, 'add_to_history': False} [2015-09-11 12:52:09,701] [INFO] [MainThread] [StaSh] [init] [1705] - Before preamble [2015-09-11 12:52:09,702] [INFO] [MainThread] [StaSh] [init] [1708] - Before script_will_end [2015-09-11 12:52:09,702] [INFO] [MainThread] [StaSh] [init] [1711] - directly config runtime callback [2015-09-11 12:52:09,703] [INFO] [MainThread] [StaSh] [init] [1714] - Before _load_lib [2015-09-11 12:52:09,703] [INFO] [MainThread] [StaSh] [_load_lib] [1784] - At start of _load_lib [2015-09-11 12:52:09,704] [INFO] [MainThread] [StaSh] [_load_lib] [1786] - lib_path = /private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash/lib [2015-09-11 12:52:09,705] [INFO] [MainThread] [StaSh] [_load_lib] [1788] - rel_lib_path = site-packages/stash/lib [2015-09-11 12:52:09,705] [INFO] [MainThread] [StaSh] [_load_lib] [1790] - {'CFFIXED_USER_HOME': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256', 'PYTHONPATH': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib_ext:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/PIL_compat', 'XPC_SERVICE_NAME': 'UIKitApplication:com.omz-software.Pythonista[0x2a25]', 'PYTHONDONTWRITEBYTECODE': '1', 'DYLD_INSERT_LIBRARIES': '/Library/MobileSubstrate/MobileSubstrate.dylib', 'LOGNAME': 'mobile', '_MSSafeMode': '0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2', 'TMPDIR': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256/tmp', 'SHELL': '/bin/sh', 'CLASSIC': '0', 'PYTHONHOME': '/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'FBSClientLogging': '0', 'USER': 'mobile'} [2015-09-11 12:52:09,706] [INFO] [MainThread] [StaSh] [_load_lib] [1792] - {'HOME2': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents', 'CFFIXED_USER_HOME': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256', 'PROMPT': '[\W]$ smb://W]$ ', 'PYTHONPATH': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash/lib', 'XPC_SERVICE_NAME': 'UIKitApplication:com.omz-software.Pythonista[0x2a25]', 'PYTHONDONTWRITEBYTECODE': '1', 'DYLD_INSERT_LIBRARIES': '/Library/MobileSubstrate/MobileSubstrate.dylib', 'LOGNAME': 'mobile', '_MSSafeMode': '0', 'HOME': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'TMPDIR': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256/tmp', 'STASH_ROOT': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash', 'SHELL': '/bin/sh', 'SELFUPDATE_BRANCH': 'master', 'CLASSIC': '0', 'PYTHONHOME': '/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'FBSClientLogging': '0', 'BIN_PATH': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/bin:/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash/bin', '?': 0, 'USER': 'mobile'} [2015-09-11 12:52:09,707] [INFO] [MainThread] [StaSh] [_load_lib] [1793] - before try [2015-09-11 12:52:09,707] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = git [2015-09-11 12:52:09,708] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = libcompleter.py [2015-09-11 12:52:09,709] [INFO] [MainThread] [StaSh] [_load_lib] [1799] - inside if [2015-09-11 12:52:09,709] [INFO] [MainThread] [StaSh] [_load_lib] [1801] - libcompleter, .py [2015-09-11 12:52:09,721] [INFO] [MainThread] [StaSh] [_load_lib] [1804] - site-packages/stash/lib/libcompleter.py loaded [2015-09-11 12:52:09,722] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = libcore.py [2015-09-11 12:52:09,723] [INFO] [MainThread] [StaSh] [_load_lib] [1799] - inside if [2015-09-11 12:52:09,723] [INFO] [MainThread] [StaSh] [_load_lib] [1801] - libcore, .py [2015-09-11 12:52:09,763] [INFO] [MainThread] [StaSh] [_load_lib] [1804] - site-packages/stash/lib/libcore.py loaded [2015-09-11 12:52:09,764] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = wakeonlan [2015-09-11 12:52:09,765] [INFO] [MainThread] [StaSh] [_load_lib] [1811] - Done _load_lib [2015-09-11 12:52:09,765] [INFO] [MainThread] [StaSh] [init] [1718] - After _load_lib [2015-09-11 12:52:09,766] [INFO] [MainThread] [StaSh] [init] [1720] - StaSh initialised! [2015-09-11 12:52:09,766] [INFO] [MainThread] [StaSh] [launch] [1817] - About to present [2015-09-11 12:52:10,435] [INFO] [MainThread] [StaSh] [launch] [1819] - Before editing [2015-09-11 12:52:10,612] [INFO] [MainThread] [StaSh] [launch] [1821] - Launch succeed! [2015-09-11 12:52:12,376] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 12:52:12,377] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 12:52:12,378] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 12:52:12,378] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-11 12:52:12,379] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [render] [462] - At beginning of render [2015-09-11 12:52:12,379] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [render] [464] - render it now [2015-09-11 12:52:12,380] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [render] [467] - rendering ... [2015-09-11 12:52:12,381] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-11 12:52:12,381] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released

I haven’t tried any of OMZ’s scripts that utilize the objc functionality. Where would I find the one you referred to?

On Sep 11, 2015, at 2:50 PM, ywangd notifications@github.com wrote:

So after all, the crash is related to objc part. This could be difficult to fix. Could you please post log file of this crash?

Have you tried any of the sample codes that omz posted to showcase the new objc_utils module? For an example, the one creates an editor using Pythonista built in editor TextView class?

On Saturday, 12 September 2015, ifuchs notifications@github.com wrote:

The moment I typed the “l” of “ls” it crashed Pythonista.

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139597550.


Life is elsewhere — Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139626348.

jsbain commented 9 years ago

did you completely uninstall 1.5 before loading the beta? Perhaps there is something conflicting in the install? might be worth uninstalling pythonista, then reinstalling from test flight? Also, out of curiosity, is the device jailbroken? How much space is remaining? What IOS version is this?

ywangd commented 9 years ago

@ifuchs It may worth checking out the sample objc_utils codes provided by omz

It may also worthwhile to try objc_hacks by @jsbain (especially attribtxt.py, attribtext2.py and attrib_textview_typing.py)

If any of above scripts crashes, it means the problem is not just StaSh alone and you may want to check the Pythonista beta installation as @jsbain suggested.

Thanks!

ifuchs commented 9 years ago

I tried both of OMZ’s scripts and they seem to work fine. I will try the objc_hacks as well.

On Sep 12, 2015, at 3:21 AM, ywangd notifications@github.com wrote:

@ifuchs https://github.com/ifuchs It may worth checking out the sample objc_utils codes provided by omz

Tinkering with Pythonista internals and Rainbow editor https://forum.omz-software.com/topic/2014/beta-tinkering-with-pythonista-s-internals-using-objc_util Subclass UIView to provide external keyboard support https://forum.omz-software.com/topic/2049/possible-to-subclass-uiview-and-redefine-keycommands-property It may also worthwhile to try objc_hacks https://github.com/jsbain/objc_hacks by @jsbain https://github.com/jsbain (especially attribtxt.py https://github.com/jsbain/objc_hacks/blob/master/attribtxt.py, attribtext2.py https://github.com/jsbain/objc_hacks/blob/master/attribtext2.py and attrib_textview_typing.py https://github.com/jsbain/objc_hacks/blob/master/attrib_textview_typing.py)

If any of above scripts crashes, it means the problem is not just StaSh alone and you may want to check the Pythonista beta installation as @jsbain https://github.com/jsbain suggested.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139738107.

ifuchs commented 9 years ago

Also works fine.

On Sep 12, 2015, at 3:21 AM, ywangd notifications@github.com wrote:

attrib_textview_typing.py https://github.com/jsbain/objc_hacks/blob/master/attrib_textview_typing.py

ywangd commented 9 years ago

@ifuchs Could you please again update to the latest changes? This is the version with initial black screen. Please then type any letter to let it crash. I added more loggings and hopefully it can show something.

In the meanwhile, I am working on a barebone version of stash that focus only on the main text input/rendering loop. This will help reduce the memory usage and hopefully narrow the scope of debugging.

ifuchs commented 9 years ago

Here it is:

[2015-09-13 15:10:27,600] [INFO] [MainThread] [StaSh] [init] [1658] - DEBUG 04 [2015-09-13 15:10:27,605] [INFO] [MainThread] [StaSh] [init] [1660] - Before external_tab_handler [2015-09-13 15:10:27,606] [INFO] [MainThread] [StaSh] [init] [1664] - Before main screen [2015-09-13 15:10:27,609] [INFO] [MainThread] [StaSh] [init] [1670] - Before mini buffer [2015-09-13 15:10:27,612] [INFO] [MainThread] [StaSh] [init] [1675] - Before stream [2015-09-13 15:10:27,613] [INFO] [MainThread] [StaSh] [init] [1680] - Before IO [2015-09-13 15:10:27,614] [INFO] [MainThread] [StaSh] [init] [1684] - Before UI [2015-09-13 15:10:27,801] [INFO] [MainThread] [StaSh.UI] [init] [245] - About to create terminal [2015-09-13 15:10:27,802] [INFO] [MainThread] [StaSh.Terminal] [init] [92] - About to configure keyCommands [2015-09-13 15:10:27,803] [INFO] [MainThread] [StaSh.Terminal] [init] [157] - About to subclass SUITextView [2015-09-13 15:10:27,809] [INFO] [MainThread] [StaSh.Terminal] [init] [165] - SUITextView subclassed! [2015-09-13 15:10:27,827] [INFO] [MainThread] [StaSh.Terminal] [init] [172] - About to create instantiate _ShTerminal [2015-09-13 15:10:27,835] [INFO] [MainThread] [StaSh.Terminal] [init] [174] - Configuring tvo [2015-09-13 15:10:27,836] [INFO] [MainThread] [StaSh.Terminal] [init] [177] - content_inset [2015-09-13 15:10:27,847] [INFO] [MainThread] [StaSh.Terminal] [init] [179] - auto_content_inset [2015-09-13 15:10:27,854] [INFO] [MainThread] [StaSh.Terminal] [init] [182] - bgcolor [2015-09-13 15:10:27,863] [INFO] [MainThread] [StaSh.Terminal] [init] [185] - default_font [2015-09-13 15:10:27,867] [INFO] [MainThread] [StaSh.Terminal] [init] [187] - bold_font [2015-09-13 15:10:27,886] [INFO] [MainThread] [StaSh.Terminal] [init] [189] - italic_font [2015-09-13 15:10:27,904] [INFO] [MainThread] [StaSh.Terminal] [init] [191] - bold_italic_font [2015-09-13 15:10:27,916] [INFO] [MainThread] [StaSh.Terminal] [init] [193] - text_color [2015-09-13 15:10:27,926] [INFO] [MainThread] [StaSh.Terminal] [init] [195] - tint_color [2015-09-13 15:10:27,935] [INFO] [MainThread] [StaSh.Terminal] [init] [198] - indicator_style [2015-09-13 15:10:27,944] [INFO] [MainThread] [StaSh.Terminal] [init] [200] - autocapitalization_type [2015-09-13 15:10:27,955] [INFO] [MainThread] [StaSh.Terminal] [init] [202] - auto_content_inset [2015-09-13 15:10:27,963] [INFO] [MainThread] [StaSh.Terminal] [init] [204] - spellchecking_type [2015-09-13 15:10:27,971] [INFO] [MainThread] [StaSh.Terminal] [init] [207] - non_contiguous_layout [2015-09-13 15:10:27,979] [INFO] [MainThread] [StaSh.Terminal] [init] [214] - adding subview [2015-09-13 15:10:27,982] [INFO] [MainThread] [StaSh.Terminal] [init] [216] - Configuring tvo delegate [2015-09-13 15:10:27,991] [INFO] [MainThread] [StaSh.Terminal] [init] [219] - get TextStorage [2015-09-13 15:10:27,993] [INFO] [MainThread] [StaSh.Terminal] [init] [222] - Terminal created! [2015-09-13 15:10:27,993] [INFO] [MainThread] [StaSh.UI] [init] [250] - Terminal created [2015-09-13 15:10:27,994] [INFO] [MainThread] [StaSh] [init] [1687] - Before renderer [2015-09-13 15:10:27,994] [INFO] [MainThread] [StaSh] [init] [1691] - Before parser [2015-09-13 15:10:28,096] [INFO] [MainThread] [StaSh] [init] [1693] - Before expander [2015-09-13 15:10:28,097] [INFO] [MainThread] [StaSh] [init] [1695] - Before runtime [2015-09-13 15:10:28,099] [INFO] [MainThread] [StaSh] [init] [1697] - Before completer [2015-09-13 15:10:28,100] [INFO] [MainThread] [StaSh] [init] [1703] - Before load_rcfile [2015-09-13 15:10:28,100] [INFO] [MainThread] [StaSh.Runtime] [load_rcfile] [1180] - About to load _DEFAULT_RC [2015-09-13 15:10:28,101] [INFO] [MainThread] [StaSh] [call] [1725] - (['BIN_PATH=~/Documents/bin:$BIN_PATH', 'SELFUPDATE_BRANCH=master', 'PYTHONPATH=$STASH_ROOT/lib', "alias env='printenv'", 'alias logout=\'echo "Use the close button in the upper right corner to exit StaSh."\'', "alias help='man'", "alias la='ls -a'", "alias ll='ls -la'", "alias copy='pbcopy'", "alias paste='pbpaste'"],) [2015-09-13 15:10:28,101] [INFO] [MainThread] [StaSh] [call] [1726] - {'add_new_inp_line': False, 'add_to_history': False} [2015-09-13 15:10:28,914] [INFO] [MainThread] [StaSh] [init] [1705] - Before preamble [2015-09-13 15:10:28,915] [INFO] [MainThread] [StaSh] [init] [1708] - Before script_will_end [2015-09-13 15:10:28,916] [INFO] [MainThread] [StaSh] [init] [1711] - directly config runtime callback [2015-09-13 15:10:28,916] [INFO] [MainThread] [StaSh] [init] [1714] - Before _load_lib [2015-09-13 15:10:28,917] [INFO] [MainThread] [StaSh] [_load_lib] [1784] - At start of _load_lib [2015-09-13 15:10:28,917] [INFO] [MainThread] [StaSh] [_load_lib] [1786] - lib_path = /private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash/lib [2015-09-13 15:10:28,918] [INFO] [MainThread] [StaSh] [_load_lib] [1788] - rel_lib_path = site-packages/stash/lib [2015-09-13 15:10:28,919] [INFO] [MainThread] [StaSh] [_load_lib] [1790] - {'CFFIXED_USER_HOME': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256', 'PYTHONPATH': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib_ext:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages:/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/PIL_compat', 'XPC_SERVICE_NAME': 'UIKitApplication:com.omz-software.Pythonista[0xf74a]', 'PYTHONDONTWRITEBYTECODE': '1', 'DYLD_INSERT_LIBRARIES': '/Library/MobileSubstrate/MobileSubstrate.dylib', 'LOGNAME': 'mobile', '_MSSafeMode': '0', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2', 'TMPDIR': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256/tmp', 'SHELL': '/bin/sh', 'CLASSIC': '0', 'PYTHONHOME': '/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'FBSClientLogging': '0', 'USER': 'mobile'} [2015-09-13 15:10:28,920] [INFO] [MainThread] [StaSh] [_load_lib] [1792] - {'HOME2': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents', 'CFFIXED_USER_HOME': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256', 'PROMPT': '[\W]$ smb://W]$ ', 'PYTHONPATH': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash/lib', 'XPC_SERVICE_NAME': 'UIKitApplication:com.omz-software.Pythonista[0xf74a]', 'PYTHONDONTWRITEBYTECODE': '1', 'DYLD_INSERT_LIBRARIES': '/Library/MobileSubstrate/MobileSubstrate.dylib', 'LOGNAME': 'mobile', '_MSSafeMode': '0', 'HOME': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'TMPDIR': '/private/var/mobile/Containers/Data/Application/1A2CF006-6F79-47E1-98F0-1A2EB11C8256/tmp', 'STASH_ROOT': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash', 'SHELL': '/bin/sh', 'SELFUPDATE_BRANCH': 'master', 'CLASSIC': '0', 'PYTHONHOME': '/var/mobile/Containers/Bundle/Application/F4074440-E218-4336-8A0D-136DC309604B/Pythonista.app/Frameworks/PythonistaKit.framework/pylib', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'FBSClientLogging': '0', 'BIN_PATH': '/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/bin:/private/var/mobile/Containers/Shared/AppGroup/637EEB4B-60E1-4F48-A8E5-66F2C7D9FCA2/Documents/site-packages/stash/bin', '?': 0, 'USER': 'mobile'} [2015-09-13 15:10:28,920] [INFO] [MainThread] [StaSh] [_load_lib] [1793] - before try [2015-09-13 15:10:28,921] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = git [2015-09-13 15:10:28,922] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = libcompleter.py [2015-09-13 15:10:28,923] [INFO] [MainThread] [StaSh] [_load_lib] [1799] - inside if [2015-09-13 15:10:28,923] [INFO] [MainThread] [StaSh] [_load_lib] [1801] - libcompleter, .py [2015-09-13 15:10:28,933] [INFO] [MainThread] [StaSh] [_load_lib] [1804] - site-packages/stash/lib/libcompleter.py loaded [2015-09-13 15:10:28,934] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = libcore.py [2015-09-13 15:10:28,935] [INFO] [MainThread] [StaSh] [_load_lib] [1799] - inside if [2015-09-13 15:10:28,936] [INFO] [MainThread] [StaSh] [_load_lib] [1801] - libcore, .py [2015-09-13 15:10:28,975] [INFO] [MainThread] [StaSh] [_load_lib] [1804] - site-packages/stash/lib/libcore.py loaded [2015-09-13 15:10:28,975] [INFO] [MainThread] [StaSh] [_load_lib] [1796] - f = wakeonlan [2015-09-13 15:10:28,976] [INFO] [MainThread] [StaSh] [_load_lib] [1811] - Done _load_lib [2015-09-13 15:10:28,977] [INFO] [MainThread] [StaSh] [init] [1718] - After _load_lib [2015-09-13 15:10:28,977] [INFO] [MainThread] [StaSh] [init] [1720] - StaSh initialised! [2015-09-13 15:10:28,978] [INFO] [MainThread] [StaSh] [launch] [1817] - About to present [2015-09-13 15:10:29,649] [INFO] [MainThread] [StaSh] [launch] [1819] - Before editing [2015-09-13 15:10:29,699] [INFO] [MainThread] [StaSh] [launch] [1821] - Launch succeed! [2015-09-13 15:10:32,734] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-13 15:10:32,735] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-13 15:10:32,736] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-13 15:10:32,736] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-13 15:10:32,737] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [render] [462] - At beginning of render [2015-09-13 15:10:32,737] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [render] [464] - render it now [2015-09-13 15:10:32,738] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [render] [467] - rendering ... [2015-09-13 15:10:32,739] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [184] - Lock Acquired [2015-09-13 15:10:32,740] [INFO] [Dummy-1] [StaSh.Screen] [acquire_lock] [188] - Lock Released [2015-09-13 15:10:32,740] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [492] - bounds = 0, 0 [2015-09-13 15:10:32,741] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [493] - screen_buffer_length = 1, cursor_x = 1 [2015-09-13 15:10:32,742] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [494] - [_Char(data=u'l', fg='default', bg='default', bold=False, italics=False, underscore=False, strikethrough=False, reverse=False)] [2015-09-13 15:10:32,742] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [495] - u'l' [2015-09-13 15:10:32,743] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [499] - tso before editing [2015-09-13 15:10:32,744] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [502] - before rotate left 0 [2015-09-13 15:10:32,745] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [510] - after rotate left [2015-09-13 15:10:32,746] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [512] - tv_text_length = 0 [2015-09-13 15:10:32,747] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [517] - before working on rbound 0, 1 [2015-09-13 15:10:32,748] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [519] - 1, [_Char(data=u'l', fg='default', bg='default', bold=False, italics=False, underscore=False, strikethrough=False, reverse=False)] [2015-09-13 15:10:32,748] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [521] - before replacing chars [2015-09-13 15:10:32,764] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [527] - after replacing chars [2015-09-13 15:10:32,765] [INFO] [Dummy-1] [StaSh.SequentialRenderer] [_render] [538] - before setting cursor position 1

On Sep 12, 2015, at 11:58 PM, ywangd notifications@github.com wrote:

@ifuchs https://github.com/ifuchs Could you please again update to the latest changes? This is the version with initial black screen. Please then type any letter to let it crash. I added more loggings and hopefully it can show something.

In the meanwhile, I am working on a barebone version of stash that focus only on the main text input/rendering loop. This will help reduce the memory usage and hopefully narrow the scope of debugging.

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-139843030.

ywangd commented 9 years ago

@ifuchs Your device appears to be jailbroken. Given how delicate the objc_utils module is, I highly suspect the crashes are caused by jailbreaking. It is even more likely especially considering that @jsbain also has a iPad 3 and has not experienced any crashes.

Nevertheless I pushed a few more updates. You can give it a try to see if it works. However if it still crashes, I'd stop debugging it any further as it is beyond my skills to support jailbroken devices. Thanks!

ifuchs commented 9 years ago

OK. It does run the examples that utilize objc but I guess there is something in Stash that doesn’t like the JB. I think I will wait to see if the objc modules make it into the app store before I un-JB my iPad. Thank you very much for trying to get this to work.

On Sep 14, 2015, at 7:36 AM, ywangd notifications@github.com wrote:

@ifuchs https://github.com/ifuchs Your device appears to be jailbroken. Given how delicate the objc_utils module is, I highly suspect the crashes are caused by jailbreaking. It is even more likely especially considering that @jsbain https://github.com/jsbain also has a iPad 3 and has not experienced any crashes.

Nevertheless I pushed a few more updates. You can give it a try to see if it works. However if it still crashes, I'd stop debugging it any further as it is beyond my skills to support jailbroken devices. Thanks!

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-140045787.

ifuchs commented 9 years ago

FYI, I had another iPad 2 that was JB and it had the same problem (crash on starting Stash). I un-jailbroke it by upgrading to ios 8.4.1 and it runs Stash. It does appear that the JB is the problem which is too bad but I understand that you can’t expend cycles working on it.

Thanks for all of your excellent work.

Ira

On Sep 14, 2015, at 9:05 AM, Fuchs Ira irafuchs@gmail.com wrote:

OK. It does run the examples that utilize objc but I guess there is something in Stash that doesn’t like the JB. I think I will wait to see if the objc modules make it into the app store before I un-JB my iPad. Thank you very much for trying to get this to work.

On Sep 14, 2015, at 7:36 AM, ywangd <notifications@github.com mailto:notifications@github.com> wrote:

@ifuchs https://github.com/ifuchs Your device appears to be jailbroken. Given how delicate the objc_utils module is, I highly suspect the crashes are caused by jailbreaking. It is even more likely especially considering that @jsbain https://github.com/jsbain also has a iPad 3 and has not experienced any crashes.

Nevertheless I pushed a few more updates. You can give it a try to see if it works. However if it still crashes, I'd stop debugging it any further as it is beyond my skills to support jailbroken devices. Thanks!

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-140045787.

ywangd commented 9 years ago

Thanks for taking long route to perform the test. Much appreciated.

Native objc stuff is alien to me and JB is even more so. I have done JB before. But all I know is how to use the tool and have zero knowledge about its internals. In my opinion, a real fix to this issue is most likely NOT from the Python side. As omz stated, the objc module is highly advanced and it is very easy to crash with it (in contrast, crashing is hardly possible with v1.5). To be honest, the whole objc stuff feels like a hack to me. Now with JB to further complicate the situation, it does not look very promising for me to solve the mystery.

Another thing is that we are still on beta (for like almost a year now?). I have my concerns whether the objc stuff would pass the App Store review for official release. Before that, I am refraining myself from putting too much effort on it. Also, based on my experience, things did not work with previous beta may work with future release.

jsbain commented 9 years ago

Out of curiosity, what in the logs made you think the device was Jb'd? Are the paths different in some way?

I wonder if this problem is jailbreak, or with IOS version? What version were the old JB'd devices running?

jsbain commented 9 years ago

Incidentally, you might try this ... the web has various "how to fix apps crashing jailbroken" pages. http://www.gizmodimension.com/how-to-fix-application-crashing-issue-on-ios-7-after-evasi0n-jailbreak/ You might want to backup first..

ywangd commented 9 years ago

@jsbain This entry was in the environmental variables: 'DYLD_INSERT_LIBRARIES': '/Library/MobileSubstrate/MobileSubstrate.dylib'. Mobile substrate is part of the basic files for JB.

ifuchs commented 9 years ago

@yawangd will have to answer about the logs but the version was 8.1.3. Once it was unJB to 8.4.1, Stash runs fine. The problem does appear to be the JB.

On Sep 14, 2015, at 10:53 PM, jsbain notifications@github.com wrote:

Out of curiosity, what in the logs made you think the device was Jb'd? Are the paths different in some way?

I wonder if this problem is jailbreak, or with IOS version? What version were the old JB'd devices running?

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-140262410.

jsbain commented 9 years ago

It could also be the 8.1.3. I want to say I recently had issues with pythonista that were fixed by a more recent iOS version.

ifuchs commented 9 years ago

That is certainly a possibility that occurred to me as well. However, now that I have gone to 8.4.1 there is no going back and 8.4.1 has no JB.

On Sep 15, 2015, at 11:44 AM, jsbain notifications@github.com wrote:

It could also be the 8.1.3. I want to say I recently had issues with pythonista that were fixed by a more recent iOS version.

— Reply to this email directly or view it on GitHub https://github.com/ywangd/stash/issues/136#issuecomment-140437057.

ifuchs commented 9 years ago

@jsbain Thank you. I checked out that link and the suggested fixes. Nothing applicable to my situation (it's for ios 7 and I am running ios 8.1.3) and I don't have any of those apps installed. If the objc mods make it to the app store, I'll probably unJB (or buy a new faster iPad).