Osx Bus Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn what is bus error 10 more about Stack Overflow the company Business Learn more about hiring developers or bus error mac posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Mac Bus Error 10
Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Bus error: 10 on Mac OS X up vote
Bus Error 10 C++
2 down vote favorite #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack http://stackoverflow.com/questions/20492056/bus-error-10-on-mac-os-x Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up bus error 10 in C up vote -1 down vote favorite I am a new beginer in C, I am doing tasks from USACO, this http://stackoverflow.com/questions/29480464/bus-error-10-in-c is the "gift1" task. I would like to think solutions my self, so if you just tell me why I get this bus error 10 instead of gaving me the answer of this task, that will be grateful grateful. I am using OS X System, and gcc(from Xcode) version is Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1 Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.1.0 Thread model: posix Here is my code(still not finished yet): /* LANG: C TASK: gift1 */ #include it works its great but it often crashes on https://forum.openframeworks.cc/t/bus-error-10-segmentation-fault-conversion-from-string-literal-to-char/13282 launch. The most common error is Bus error: 10 but I have also had Segmentation fault: 11 and debug always says "Couldn't set thread priority." http://forum.kingart-games.com/index.php?topic=11525.0 I think it might be something to do with the Conversion from string literal to 'char *' being deprecated. I think there are probably a bus error few examples of this in my code and that could be causing problems. For example is this wrong. It works but maybe its causing memory issues. void testApp::drawNumbers(){char dataStr[20]; // an array of charssprintf(dataStr, "%d %d %d %d %d %d %d %d", tape[7], tape[6], tape[5], tape[4], tape[3], tape[2], tape[1], tape[0]);franklinBook.drawString(dataStr, 105,335);} bus error 10 All my code seemed much more stable on OSX 10.5.8 and now I seem to have more problems. Are there some core changes I should be aware of. The AddOns I am using areofxOscofxXmlSettingsofxBeatTracking Any tips would really be appreciated. Many thanks Simon trentbrooks 2013-09-20 06:26:26 UTC #2 Hey Simon, I would guess it's the buffer size of 20. You are storing 8 ints and 7 spacer chars, if each int is 2 digits long that's 16 + 7 chars total. You could make the buffer bigger, or just use a stringstream instead... stringstream dataStr;dataStr << tape[7] << " " << tape[6] << " " << endl;franklinBook.drawString(dataStr.str(), 105,335); simonblackmore 2013-09-20 21:00:11 UTC #3 Thanks, Trent I am sure this helps. I seem to have a heap of other troubles.I hate upgrading Cheers Simon Home Categories FAQ/Guidelines Terms of Service Privacy Policy Powered by Discourse, best viewed with JavaScript enabled Art Games Forum » The Book of Unwritten Tales (ENG) » Technical Issues / Bugs » [FIXED] OSX: Bus error 10 / crash when launching Book of Unwritten Tales « previous next » Print Pages: [1] Go Down Author Topic: [FIXED] OSX: Bus error 10 / crash when launching Book of Unwritten Tales (Read 2104 times) qbic Newbie Posts: 1 [FIXED] OSX: Bus error 10 / crash when launching Book of Unwritten Tales « on: 2013-05-16 21:55:10 » I recently bought Unwritten Tales on steam and it was running fine on my iMac but crashed at launch on my MacBook. Searching Google returned close to nothing, so I was quite sure, that there's something "wrong" with my setup. To be honest – it's a bug, but easy to fix.Unwritten Tales crashed because I had my user directory on a different volume (I switched the superdrive for a second HDD). All you need to do is symlink your home directory on your new drive to /Users/YourUserName (ln -s /Volumes/VolumeName/YourUserDirectory /Users/YourUsername) and change your home directory back to /Users/YourUserName.Thought I'd post this, in case anyone has the same problem. If you have further questions feel free to ask. Logged Maize Newbie Posts: 7 Re: [FIXED] OSX: Bus error 10 / crash when launching Book of Unwritten Tales « Reply #1 on: 2013-09-08 00:14:25 » Thank you!! I've been trying to get this bug resolved for millenia, with no luck, but this fixed it for me. In fact, just having the symlink in place fixed it. I didn't even need to change my home directory back. Logged Print Pages: [1] Go Up « previous next » KING Art Games Forum » The Book of Unwritten Tales (ENG) » Technical Issues / Bugs » [FIXED] OSX: Bus error 10 / crash when launching Book of Unwritten Tales SMF 2.0.7 | SMF © 2014, Simple Machines XHTML RSS WAP2 Bad Behavior has blocked 5484 access attempts in the last 7 days