Giter Site home page Giter Site logo

Comments (7)

klemens-morgenstern avatar klemens-morgenstern commented on June 9, 2024

Thanks for the report, I'm really sorry you needed to spent so much time on that.

It also seems very odd, I have an active unit-test for that, so that should (in theory of course) crash. Are you compiling against x86 or x64?

from process.

petke avatar petke commented on June 9, 2024

No, worries. Your library has been very useful to me.

I'm compiling against x86, (although the machines I run on are "Windows Home 10 x64" and "Windows Server 2012 R2 x64")

I just tested just to make sure. The same example program doesn't crash if i build against boost_1_65_1, but it does crash if i build against boost_1_67_0.

The old boost_1_65_1 boost library was compiled on 10/10/2017. I tagged it with version vc141, so I think that means some version of "Visual Studio 2017".

The new boost_1_67_0 library and program that has this problem, is compiled with "Visual Studio community 2017 update version 15.7.2".

Its possibly I screwed something up when i built the new boost library. I could try it again later. In the meantime I will try a workaround (maybe I can do without boost::process::group)

(I also get compile warnings about "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately". Not sure if that matters ...)

from process.

petke avatar petke commented on June 9, 2024

One final details:

The test program that crashes. I did the tests in the debugger. Running from console behaves a bit different:

If you run from console the debug version shows the error popup window about "Run-Time Check Failiure #0. (So it behaves much the same as in the debugger)

However in release mode from console you get no error message, so you cant tell if the program exited by unhanded exception or normally. I ruled the latter out by adding a catch(...) to main and a cout, and now i can see it exits because of unhanded exception. (Maybe this matters for your unit tests)

from process.

klemens-morgenstern avatar klemens-morgenstern commented on June 9, 2024

Can you try to use this header file instead ? https://github.com/boostorg/process/blob/900aab5d6d48f726164f6adfd3ded61294beb166/include/boost/process/detail/windows/job_workaround.hpp

and if that doesn't work replace BOOST_WINAPI_WINAPI_CC with WINAPI ?

from process.

petke avatar petke commented on June 9, 2024

Looks good. That seems to work. Thanks.

I tried https://github.com/boostorg/process/blob/900aab5d6d48f726164f6adfd3ded61294beb166/include/boost/process/detail/windows/job_workaround.hpp

I got a bunch of compiler errors about redefinition.
Example:

1>c:\api\boost_1_67_0_vc1914\boost\process\detail\windows\job_workaround.hpp(117): error C2370: 'boost::process::detail::windows::workaround::BOOST_WINAPI_WINAPI_CC': redefinition; different storage class

I then replaced all the BOOST_WINAPI_WINAPI_CC with WINAP in that same file. the compile errors went away and so did the crash bug.

I tried this on the example program. I'll try it on the main program later (and update this comment with the results).

Edit: I tested the fix with my main program, and it also works now.

from process.

klemens-morgenstern avatar klemens-morgenstern commented on June 9, 2024

Right, that was a major change and somehow broke the build. It works without that on 64-Bit, I'll try to find a solution for 32-Bit until the next release.

from process.

klemens-morgenstern avatar klemens-morgenstern commented on June 9, 2024

Does that work now for you (current master)?

from process.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.