Debugging RubyMotion

How to Debug
RubyMotion Apps
The Life and Times of an Object
My App Crashed!
Now what???
Weapon of Choice
gdb
• rake debug=1
• Watch it crash
• Play!
What is an Object?
• Just a struct!
• First value is the isa pointer to the Class
• In gdb, try “x”
• Refer to the Obj-C Runtime Reference
Demo
Advanced Weaponry
MallocStackLoggingNoCompact
• man malloc
• Set environment variables to log the stack
during allocations
• Run in GDB, use malloc_history to view
stacks
Demo
4 Rs of Bug Reporting
• Reproduce
• Report
• Reduce
• Regress
Reproduce It!
• Can you make the bug occur every time?
most of the time? some of the time?
• Check all config files, Rakefile
• Environment and EnvironmentVariables
• Ask a friend
Report It!
• motion support
• All steps to reproduce
• bonus points for small sample apps
• RubyMotionVersion (Have you updated
recently?)
• Crash log (hint: look in Console.app)
Reduce It!
• Eliminate libraries
• Simple scripts are best
• Shrink code as much as possible!
Regress It!
• Did it used to work?
• motion update [--force-version=X]
Demo
Questions?
@manhattanmetric
Joshua Ballanco
https://github.com/jballanc
http://www.burnsidedigital.com
1 of 14

Recommended

Introduction to Qt by
Introduction to QtIntroduction to Qt
Introduction to QtMohammad Shaker
84 views22 slides
RubyMotion: Under the Hood by
RubyMotion: Under the HoodRubyMotion: Under the Hood
RubyMotion: Under the HoodJoshua Ballanco
2K views65 slides
Getting Your Ruby EGOT by
Getting Your Ruby EGOTGetting Your Ruby EGOT
Getting Your Ruby EGOTJoshua Ballanco
821 views66 slides
MacRuby for Fun and Profit by
MacRuby for Fun and ProfitMacRuby for Fun and Profit
MacRuby for Fun and ProfitJoshua Ballanco
1.2K views32 slides
A Tale of Two Rubies by
A Tale of Two RubiesA Tale of Two Rubies
A Tale of Two RubiesJoshua Ballanco
1.1K views51 slides
MacRuby: What is it? and why should you care? by
MacRuby: What is it? and why should you care?MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?Joshua Ballanco
1.3K views30 slides

More Related Content

Similar to Debugging RubyMotion

Introduction of Tools for providing rich user experience in debugger by
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerNaoto Ono
1.5K views76 slides
Unite2013-gavilan-pdf by
Unite2013-gavilan-pdfUnite2013-gavilan-pdf
Unite2013-gavilan-pdfDavid Gavilan
464 views58 slides
The Good, the Bad and the Ugly things to do with android by
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidStanojko Markovik
2.5K views47 slides
Triton and symbolic execution on gdb by
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdbWei-Bo Chen
596 views71 slides
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v... by
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...Clinton Wolfe
140 views87 slides
Your Goat Anti-Fragiled My SnowFlake! Demystifying DevOps Jargon by
Your Goat Anti-Fragiled My SnowFlake! Demystifying DevOps JargonYour Goat Anti-Fragiled My SnowFlake! Demystifying DevOps Jargon
Your Goat Anti-Fragiled My SnowFlake! Demystifying DevOps JargonClinton Wolfe
342 views87 slides

Similar to Debugging RubyMotion(20)

Introduction of Tools for providing rich user experience in debugger by Naoto Ono
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
Naoto Ono1.5K views
The Good, the Bad and the Ugly things to do with android by Stanojko Markovik
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with android
Stanojko Markovik2.5K views
Triton and symbolic execution on gdb by Wei-Bo Chen
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdb
Wei-Bo Chen596 views
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v... by Clinton Wolfe
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Your Goat Anti-Fragiled My Snowflake! Demystifying DevOps Jargon (30 minute v...
Clinton Wolfe140 views
Your Goat Anti-Fragiled My SnowFlake! Demystifying DevOps Jargon by Clinton Wolfe
Your Goat Anti-Fragiled My SnowFlake! Demystifying DevOps JargonYour Goat Anti-Fragiled My SnowFlake! Demystifying DevOps Jargon
Your Goat Anti-Fragiled My SnowFlake! Demystifying DevOps Jargon
Clinton Wolfe342 views
Ruby on Rails : 簡介與入門 by Wen-Tien Chang
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門
Wen-Tien Chang75.3K views
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV) by JiandSon
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
JiandSon1.5K views
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016. by UA Mobile
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
UA Mobile359 views
CocoaConf DC - Automate with Swift - Tony Ingraldi by Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony Ingraldi
Tony Ingraldi1.4K views
Exploring Java Heap Dumps (Oracle Code One 2018) by Ryan Cuprak
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
Ryan Cuprak2K views
Functional Programming in Clojure by Troy Miles
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
Troy Miles623 views
Devoxx%202008%20Tutorial by tutorialsruby
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
tutorialsruby202 views
Devoxx%202008%20Tutorial by tutorialsruby
Devoxx%202008%20TutorialDevoxx%202008%20Tutorial
Devoxx%202008%20Tutorial
tutorialsruby291 views
Dev tools rendering & memory profiling by Open Academy
Dev tools rendering & memory profilingDev tools rendering & memory profiling
Dev tools rendering & memory profiling
Open Academy1.1K views
Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013 by Máté Nádasdi
Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013
Google Chrome DevTools: Rendering & Memory profiling on Open Academy 2013
Máté Nádasdi8.7K views
Tech Headline - JavaScript Performance by Rodrigo Castilho
Tech Headline - JavaScript PerformanceTech Headline - JavaScript Performance
Tech Headline - JavaScript Performance
Rodrigo Castilho909 views

Recently uploaded

Business Analyst Series 2023 - Week 4 Session 7 by
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
110 views31 slides
NTGapps NTG LowCode Platform by
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
287 views30 slides
Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
76 views26 slides
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...ShapeBlue
120 views62 slides
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
50 views69 slides
Future of AR - Facebook Presentation by
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook PresentationRob McCarty
54 views27 slides

Recently uploaded(20)

Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu287 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely76 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue120 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty54 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue52 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue63 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue48 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue191 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue105 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue114 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue59 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash103 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue93 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue138 views

Debugging RubyMotion