This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end| #!/bin/bash | |
| # This script will install a Git pre-push hook that prevents force pushing the master/main branch. | |
| # There are three variants that I have built: | |
| # - pre-push: prevents force-pushing to master/main. | |
| # - pre-push-2: prevents force-pushing to master/main depending on the remote (you need to edit the file!). | |
| # - pre-push-3: prevents any type of pushing to master/main. | |
| # Set the desired version like this before proceeding: | |
| # FILE=pre-push | |
| # Single repo installation: |
| [2013-06-13 20:40:48 +0000] git push -f [email protected]:gravity-production.git FETCH_HEAD:master | |
| Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts. | |
| -----> Deleting 13 files matching .slugignore patterns. | |
| -----> Ruby/Rails app detected | |
| -----> Using Ruby version: ruby-1.9.3 | |
| -----> Installing dependencies using Bundler version 1.3.2 | |
| Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment | |
| find: `spec': No such file or directory | |
| find: `bin': No such file or directory |
This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end| import os, os.path, sys, urllib2, requests | |
| class PyPiError(Exception): | |
| def __init__(self, value): | |
| self.value = value | |
| def __str__(self): | |
| return repr(self.value) | |
| def _chunk_report(bytes_so_far, chunk_size, total_size): | |
| if (total_size != None): |