News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Release 16.01 for Mac

Started by dkulp, January 30, 2016, 01:27:17 AM

Previous topic - Next topic

ollydbg

Quote from: Easior Lars on February 14, 2016, 12:24:04 PM
Quote from: oBFusCATed on February 14, 2016, 11:49:37 AM
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) Select

Process 62378 stopped
* 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)
    frame #0: 0x0000000101f9025d libcodeblocks.dylib`Window::Destroy(this=0x0000000110f2ed90) + 61 at PlatWX.cpp:764
   761 {
   762     if (wid) {
   763         Show(false);
-> 764         GETWIN(wid)->Destroy();
   765     }
   766     wid = 0;
   767 }
(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.

Easior Lars

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) Select

Index: src/sdk/globals.cpp
===================================================================
--- src/sdk/globals.cpp (revision 10805)
+++ src/sdk/globals.cpp (working copy)
@@ -58,7 +58,7 @@
#ifndef __WXMAC__
const wxString DEFAULT_CONSOLE_TERM  = _T("xterm -T $TITLE -e");
#else
-const wxString DEFAULT_CONSOLE_TERM  = _T("osascript -e 'tell app \"Terminal\"' -e 'activate' -e 'do script \"$SCRIPT\"' -e 'end tell'");
+const wxString DEFAULT_CONSOLE_TERM  = _T("osascript -e 'tell app \"Terminal\"' -e 'activate' -e 'do script quoted form of \"$SCRIPT\"' -e 'end tell'");
#endif
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:[url="http://easior.i11r.com"]http://easior.i11r.com[/url]

oBFusCATed

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!]

guoqingaa

#33
Quote from: dkulp on January 30, 2016, 01:27:17 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) Select

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


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.