4coder»Forums
Oliver Marsh
193 posts / 1 project
Olster1.github.io
Debugging 4coder
Edited by Oliver Marsh on Reason: Initial post
Hi,

I really like 4coder and I've been using it on my mac. However it crashes pretty regularly on my computer.

I would love to help find the bugs. What is the best way to debug 4coder when it crashes to give Allen more info on the cause? The report page doesn't give much info.

Thanks,
Oliver
Mārtiņš Možeiko
2559 posts / 2 projects
Debugging 4coder
Typically on Linux/OSX, if you don't have source, the best way is to send core dump to author. Then he'll be able to load it into debugger and examine call stack / variables / etc...

On macOS this should happen automatically in /cores folder. Make sure it exists and your user has permissions to write to it. If it doesn't happen try this command:
1
ulimit -c unlimited

Oliver Marsh
193 posts / 1 project
Olster1.github.io
Debugging 4coder
Edited by Oliver Marsh on
THanks Martins for the reply,

I change the ulimit to unlimited but nothing appeared in the /cores folder when it crashed. Does the author have to do anything to enable the core dumps?
David Butler
81 posts / 1 project
I love pretty much anything technical, whether it be programming, networking, hacking or electronics.
Debugging 4coder
Edited by David Butler on
excerpt from `man 5 core`:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
     Core dumps are disabled by default under Darwin/Mac OS X.  To re-enable
     core dumps, a privileged user must do one of the following

     * Edit /etc/launchd.conf or $HOME/.launchd.conf and add a line specifying
     the limit limit core unlimited

     * A privileged user can also enable cores with launchctl limit core
     unlimited

     * A privileged user can also enable core files by using ulimit(1) or
     limit(1) depending upon the shell.


In other words, you might want to try `sudo launchctl limit core unlimited` followed by a logout/login. I haven't tested that, so there might be more to it... Also, you could just run 4ed from lldb, it can manually generate a core file as well as dump a stack trace...
Allen Webster
476 posts / 6 projects
Heyo
Debugging 4coder
Thanks everyone for the debugging help. Mac debugging is pretty tough for me still.

@Oliver If you send everything you can to [email protected] that will help me make sure I keep track of this issue and hopefully we can start investigating more from there too.