amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 9 forks source link

`rake crashlog` does not open the most recent crash report #99

Open andrewhavens opened 6 years ago

andrewhavens commented 6 years ago

Both rake crashlog (simulator) and rake crashlog:device often do not open the latest crash report. In the case of rake crashlog:device it logs the file path of the reports that it could pull from the device, so I can at least manually open the file, but in the case of the simulator, it does not log the path, so it's not clear how to open the latest crash report. I'm not sure if this has anything to do with the Ruby changes to sorting files in a directory, but this issue makes rake crashlog difficult/useless.

amirrajan commented 6 years ago

Might be related to: https://github.com/amirrajan/rubymotion-applied/issues/17

torben commented 5 years ago

@andrewhavens I did notice, that sometimes I have to wait until the black screen (after the crash) in the iOS simulator is gone and the home screen appears again. Then I'm able to run rake crashlog with the last crash report. This helps me 100% of the times, but I don't know why this happens in the first place.

andrewhavens commented 5 years ago

@torben After I originally reported this error (not opening the latest crash report, but rather some older crash report), I learned that the cause was due to a change in how directory "glob" listings are sorted. I assume the behavior was to sort the files in the directory and pick the last one, but the problem is probably in not sorting correctly.