Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Problem to load libcompiler.so plugin on NetBSD 10.1

<< < (2/4) > >>

Beesdeckar:
I debugged compiler.cpp , function member
--- Code: ---Compiler::EvalXMLCondition()
--- End code ---
to see what is passed to wxExecute().
See attached screens from debugger.
First it sets flag by wx version. wx-config  outputs that I have installed 3.0.5.
in compiler.cpp code is comment:

--- Code: ---           #if wxCHECK_VERSION(3, 0, 0)
                // Stop event-loop while wxExecute runs, to avoid a deadlock on startup,
                // that occurs from time to time on wx3
                flags |= wxEXEC_NOEVENTS;
            #else
                flags |= wxEXEC_NODISABLE;
            #endif
            wxLogNull logNo; // do not warn if execution fails
            ret = wxExecute(GetStringFromArray(cmd, wxT(" "), false), cmd, flags);


--- End code ---
I am attaching two screens from debugging and my code is going through first condition. Even It freezes when called wxExecute().
I tried also to comment first condition to force WxEXEC_NODISABLE. Then several threads enters into wait state, but codeblocks also freezes.
Se attached screens.
Any ideas ?

stahta01:
Upgrade to wxWidgets 3.2 or find the fix done in 3.1.2 and back port it.

Tim S.


--- Quote ---3.1.2: (released 2018-12-10)
----------------------------

All:

- Add wxLZMA{Input,Output}Stream classes using external liblzma.
- Make wxList and wxVector iterators conform to input iterator requirements.
- Fix MT-safety problem when reading and writing from wxSocket (jkubalik).
- Fix build issues under HaikuOS (mill-j).
- Fix problem with wx-config installation and use under NetBSD (wiz).
- Avoid spurious errors on thread creation under NetBSD.
- Improve high DPI support in wxAui (Simon Rozman).
- Fix a bug with parsing time zones in wxDateTime::ParseFormat() (evileye).
- Update all 3rd party libraries to their latest versions (Maarten Bent).
--- End quote ---

Beesdeckar:
I built wxWidgets 3.1.2 from sources and the rebuilt codeblocks. Result is the same. I see two threads registering MINGW compiler and another threads waiting. See attached pictures. After it I rebuilt it with wxExecute() parameter flag = wxEXEC_NODISABLE, it does not help.

Is not problem that codeblocks tries to register the same compiler in two different threads instead of finding bug in wxGTK ?

stahta01:
That was not one of the two things I suggested.

Edit: If I had this problem, I would work to duplicate it using an wxWidgets sample and then communicate with either the NetBSD team or wxWidgets team on how to fix it. But, building the newest wxWidgets 3.2.x version or the git master branch would be another way to see if that fixes it. AS I already suggested building wxWidgets 3.2 would be my first thing to try. But, if that failed I would try to build the closest wxWidgets sample likely to have the problem and report it to the wxWidgets team and see what they say. But, the wx sample(s) might all work great. It has been close to a decade since I last built Code::Blocks under an BSD distro; no other ideas to suggest.

Tim S.

Beesdeckar:
Thank you Tim for navigating.

I have codeblocks built from last sources with built of wxWidgets-3.2.5 from sources.

Problem with starting compiler plugin is still here and I found that probably it is crashing of child's forked process after called fork() inside of wxWidgets for some specific reason relating to NetBSD os. fork() is called inside of wxExecute() .
Passed command line from codeblocks into wxExecute() sees ok, it tries to call "gcc -dumpversion". But Maybe on NetBSD is using of fork() problem in multithreaded application.
Or it can be some problem with thread synchronization objects.

I must take back my question about registering compiler in two separate threads when investigated with "info thread" under gdb. Now I am seeing that both threads has the same LWP, so it is probably some gdb's way of outputting forked process.

 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version