Author Topic: Release 16.01 for Mac  (Read 14635 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5234
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Release 16.01 for Mac
« Reply #30 on: February 14, 2016, 03:22:55 pm »
Does it happen every time or is it just some random event?

It happened while mouse scrolling in CB editor with some source codes.

Quote from: oBFusCATed
You can try to start cb under lldb/gdb and wait for the crash to happen.
Then inspect the variables.

The line numbers in the crash report are totally wrong (the last character is removed).

Thanks. lldb is used by me  this time to debug and it gives some information as follow:
Code: Bash
  1. Process 62378 stopped
  2. * thread #1: tid = 0x7770f, 0x0000000101f9025d libcodeblocks.dylib`Window::Destroy(this=0x0000000110f2ed90) + 61 at PlatWX.cpp:764, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  3.     frame #0: 0x0000000101f9025d libcodeblocks.dylib`Window::Destroy(this=0x0000000110f2ed90) + 61 at PlatWX.cpp:764
  4.    761  {
  5.    762      if (wid) {
  6.    763          Show(false);
  7. -> 764          GETWIN(wid)->Destroy();
  8.    765      }
  9.    766      wid = 0;
  10.    767  }
  11. (lldb)

Any suggestion?
If I remember correctly, there are similar crashes under Windows system several years ago, and later we fixed it. You need to search the forum to find the discussions. oBFusCATed's explanation is reasonable as I can see.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #31 on: March 11, 2016, 11:08:35 am »
Since a file name may include characters which need to be escaped to be passed to a shell command, the following patch is needed:
Code: Bash
  1. Index: src/sdk/globals.cpp
  2. ===================================================================
  3. --- src/sdk/globals.cpp (revision 10805)
  4. +++ src/sdk/globals.cpp (working copy)
  5. @@ -58,7 +58,7 @@
  6.  #ifndef __WXMAC__
  7.  const wxString DEFAULT_CONSOLE_TERM  = _T("xterm -T $TITLE -e");
  8.  #else
  9. -const wxString DEFAULT_CONSOLE_TERM  = _T("osascript -e 'tell app \"Terminal\"' -e 'activate' -e 'do script \"$SCRIPT\"' -e 'end tell'");
  10. +const wxString DEFAULT_CONSOLE_TERM  = _T("osascript -e 'tell app \"Terminal\"' -e 'activate' -e 'do script quoted form of \"$SCRIPT\"' -e 'end tell'");
  11.  #endif
  12.  const wxString DEFAULT_CONSOLE_SHELL = _T("/bin/sh -c");
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12595
    • Travis build status
Re: Release 16.01 for Mac
« Reply #32 on: March 11, 2016, 11:56:18 pm »
In svn thanks for the contribution.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline guoqingaa

  • Single posting newcomer
  • *
  • Posts: 1
Re: Release 16.01 for Mac
« Reply #33 on: October 08, 2016, 05:23:46 am »

I stuck an experimental OSX build up at:

http://dankulp.com/xlights/CodeBlocks-MAC-16.1.tar.gz

This is using a custom build of wxWidgets 3.0.x  which is the latest code from git + a bunch of fixes that I submitted back to them in a pull request.   It also contains some fixes to Code::Blocks to get it working on MAC, particularly finding plugins with the ".app" as well as some fixes for Retina displays.   Not all those fixes are submitted back yet.

Very minimal testing has been done as I pretty much just use it for wxSmith.

in mac os x 10.12, not create wxSmith project, the error report is:
Code: XML
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <report version="1.0" kind="exception">
  3.   <system description="Mac OS X (Darwin 16.0.0 x86_64)"/>
  4.   <stack>
  5.     <frame level="0" function="wxFatalSignalHandler " offset="00000000"/>
  6.     <frame level="1" function="_sigtramp " offset="00000000"/>
  7.     <frame level="2" function="_sigtramp " offset="00000000"/>
  8.     <frame level="3" function="wxEncodingConverter::Init(wxFontEncoding, wxFontEncoding, int) " offset="00000000"/>
  9.     <frame level="4" function="EncodingDetector::ConvertToWxString(unsigned char const*, unsigned long) " offset="00000000"/>
  10.     <frame level="5" function="EncodingDetector::DetectEncoding(unsigned char const*, unsigned long, bool) " offset="00000000"/>
  11.     <frame level="6" function="EncodingDetector::DetectEncoding(wxString const&amp;, bool) " offset="00000000"/>
  12.     <frame level="7" function="EncodingDetector::EncodingDetector(wxString const&amp;, bool) " offset="00000000"/>
  13.     <frame level="8" function="wxsCoder::FlushFile(wxString const&amp;) " offset="00000000"/>
  14.     <frame level="9" function="wxsCoder::AddCode(wxString const&amp;, wxString const&amp;, wxString const&amp;, wxString const&amp;, bool, bool, bool) " offset="00000000"/>
  15.     <frame level="10" function="wxWidgetsGUI::OnRebuildApplicationCode() " offset="00000000"/>
  16.     <frame level="11" function="(anonymous namespace)::AddWxExtensions(cbProject*, wxString const&amp;, wxString const&amp;, wxString const&amp;, wxString const&amp;) " offset="00000000"/>
  17.     <frame level="12" function="long SqPlus::ReturnSpecialization&lt;void&gt;::Call&lt;cbProject*, wxString const&amp;, wxString const&amp;, wxString const&amp;, wxString const&amp;&gt;(void (*)(cbProject*, wxString const&amp;, wxString const&amp;, wxString const&amp;, wxString const&amp;), SQVM*, long) " offset="00000000"/>
  18.     <frame level="13" function="SqPlus::DirectCallFunction&lt;void (*)(cbProject*, wxString const&amp;, wxString const&amp;, wxString const&amp;, wxString const&amp;)&gt;::Dispatch(SQVM*) " offset="00000000"/>
  19.     <frame level="14" function="SQVM::CallNative(SQNativeClosure*, long, long, SQObjectPtr&amp;, bool&amp;) " offset="00000000"/>
  20.     <frame level="15" function="SQVM::Execute(SQObjectPtr&amp;, long, long, long, SQObjectPtr&amp;, unsigned long, SQVM::ExecutionType) " offset="00000000"/>
  21.     <frame level="16" function="SQVM::Call(SQObjectPtr&amp;, long, long, SQObjectPtr&amp;, unsigned long) " offset="00000000"/>
  22.     <frame level="17" function="sq_call " offset="00000000"/>
  23.     <frame level="18" function="bool SqPlus::SquirrelFunction&lt;bool&gt;::operator()&lt;cbProject*&gt;(cbProject*) " offset="00000000"/>
  24.     <frame level="19" function="Wiz::RunProjectWizard(wxString*) " offset="00000000"/>
  25.     <frame level="20" function="Wiz::Launch(int, wxString*) " offset="00000000"/>
  26.     <frame level="21" function="TemplateManager::New(TemplateOutputType, wxString*) " offset="00000000"/>
  27.     <frame level="22" function="MainFrame::OnFileNewWhat(wxCommandEvent&amp;) " offset="00000000"/>
  28.     <frame level="23" function="MainFrame::OnStartHereLink(wxCommandEvent&amp;) " offset="00000000"/>
  29.     <frame level="24" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*) " offset="00000000"/>
  30.     <frame level="25" function="wxEvtHandler::ProcessEventLocally(wxEvent&amp;) " offset="00000000"/>
  31.     <frame level="26" function="wxEvtHandler::ProcessEvent(wxEvent&amp;) " offset="00000000"/>
  32.     <frame level="27" function="wxEvtHandler::ProcessPendingEvents() " offset="00000000"/>
  33.     <frame level="28" function="wxAppConsoleBase::ProcessPendingEvents() " offset="00000000"/>
  34.     <frame level="29" function="wxCFEventLoop::OSXCommonModeObserverCallBack(__CFRunLoopObserver*, int, void*) " offset="00000000"/>
  35.     <frame level="30" function="__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ " offset="00000000"/>
  36.     <frame level="31" function="__CFRunLoopDoObservers " offset="00000000"/>
  37.     <frame level="32" function="__CFRunLoopRun " offset="00000000"/>
  38.     <frame level="33" function="CFRunLoopRunSpecific " offset="00000000"/>
  39.     <frame level="34" function="RunCurrentEventLoopInMode " offset="00000000"/>
  40.     <frame level="35" function="ReceiveNextEventCommon " offset="00000000"/>
  41.     <frame level="36" function="_BlockUntilNextEventMatchingListInModeWithFilter " offset="00000000"/>
  42.     <frame level="37" function="_DPSNextEvent " offset="00000000"/>
  43.     <frame level="38" function="-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] " offset="00000000"/>
  44.     <frame level="39" function="-[NSApplication run] " offset="00000000"/>
  45.     <frame level="40" function="wxGUIEventLoop::OSXDoRun() " offset="00000000"/>
  46.     <frame level="41" function="wxCFEventLoop::DoRun() " offset="00000000"/>
  47.     <frame level="42" function="wxEventLoopBase::Run() " offset="00000000"/>
  48.     <frame level="43" function="wxAppConsoleBase::MainLoop() " offset="00000000"/>
  49.     <frame level="44" function="wxApp::OnRun() " offset="00000000"/>
  50.     <frame level="45" function="CodeBlocksApp::OnRun() " offset="00000000"/>
  51.     <frame level="46" function="wxEntry(int&amp;, wchar_t**) " offset="00000000"/>
  52.     <frame level="47" function="main " offset="00000000"/>
  53.     <frame level="48" function="start " offset="00000000"/>
  54.   </stack>
  55. </report>
  56.  

help me, In the apple system 10.12 below, can not build the project, in addition, the new project template can support wxWidgets 3.1. Because of the QTKit problem, OSX 10.12 can not normally compile wxWidgets 3.1, can only be compiled under 10.11, and then get the use, CodeBlockes can provide a compiled binary version of the wxWidgets download, CodeBlockes can be a perfect support for OSX 10.12 and 3.x wxWidgets, thank you, from China

Edit: Removed non-english content.
« Last Edit: November 06, 2016, 01:36:03 pm by MortenMacFly »