Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:16:47+00:00 2026-06-11T19:16:47+00:00

I have following code (now compilable, thanks to @LokiAstari): To compile the following piece

  • 0

I have following code (now compilable, thanks to @LokiAstari):

To compile the following piece of code, the simplest way is to download curlpp , compile it. Then compile the following code with g++-mp-4.4 (installed by macport), linking to curl and curlpp.

It would crash (output: abort trap) if localhost:8080 does not exist.
Change g++-mp-4.4 to g++ which the default one of Xcode 4, it works fine.

#include <string>
#include <sstream>
#include <iostream>

#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>

int main(int, char **)
{
    try
    {
        curlpp::Cleanup myCleanup;

        {
          std::ostringstream os;
          os << curlpp::options::Url("http://localhost:8080/");
        }

    }
    catch( curlpp::RuntimeError &e )
    {
        std::cout << e.what() << std::endl;
    }

    catch( curlpp::LogicError &e )
    {
        std::cout << e.what() << std::endl;
    }

  return 0;
}

Update:

in Easy.cpp:

void 
curlpp::Easy::perform()
{
    mCurl->perform(); // The exception come from here. mCurl is a std::auto_ptr<internal::CurlHandle> mCurl;
}

......

std::ostream & operator<<(std::ostream & stream, const curlpp::Easy & request)
{
  // Quick clone that doesn't copy options, only the curl handle.
  curlpp::Easy r(request.getCurlHandle().clone());
  r.setOpt(new curlpp::options::WriteStream(& stream));
  r.perform(); // The exception come from here.

  return stream;
}

in CurlHandle.cpp:

void CurlHandle::perform()
{
    CURLcode code;

    code = curl_easy_perform(mCurl);
    throwException();
    libcurlRuntimeAssert(mErrorBuffer, code); //if we got an error
}

in Exception.cpp:

void curlpp::libcurlRuntimeAssert(const std::string & reason, CURLcode code)
{
  curlpp::libcurlRuntimeAssert(reason.c_str(), code);
}

void curlpp::libcurlRuntimeAssert(const char * reason, CURLcode code)
{
  if (code != CURLE_OK)
    throw curlpp::LibcurlRuntimeError(reason, code);
}

I traced into the code, throw curlpp::LibcurlRuntimeError(reason, code);, the constructor of LibcurlRuntimeError is fine, then throw, then SIGABRT.

stack trace:

0   __kill      0   0x7fff8213d0b6  
1   abort       0   0x7fff821dd9f6  
2   uw_init_context_1       0   0x101663af2 
3   _Unwind_Resume      0   0x101663f38 
4   operator<<  Easy.cpp    118 0x10009b699 
5   operator<<  Options.cpp 34  0x1000948d8 
6   RoleCreationTest::loadPlayerAsyncTestCase   rolecreationtest.cpp    147 0x10008c714 
7   RoleCreationTest::qt_metacall   moc_rolecreationtest.cpp    87  0x1000acab2 
8   QMetaMethod::invoke     0   0x1012e6667 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:16:48+00:00Added an answer on June 11, 2026 at 7:16 pm

    There are problems with various MacPorts GCC 4.x compilers and exception catching, see for example GCC bug 42159 and MacPorts bug 25042.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have The following code for now. type TByte4 = array[0..3] of Byte; //
Right now I have the following code working: @UiHandler(usernameTextBox) void onUsernameTextBoxKeyPress(KeyPressEvent event) { keyPress(event);
I have the following code in my C# program. DateTime dateForButton = DateTime.Now; dateForButton
I have the following code in vb - tAvailableDate = DateAdd(d, 21, Format(Now, gDATEFORMAT))
I have the following code: SPList list = web.Lists[this.ListName]; SPListItem item = list.Items.Add(); now
Say that I have the following code: ExecutorService executor = Executors.newSingleThreadExecutor(); executor.execute(myRunnable); Now, if
Let's say I have the following Code: <div id=parent> <div id=child></div> </div> Now I
In our code I have the following, for now please ignore the //* bits;
I have following code and now I have type, but I need to have
I have the following code now, and I want to simply add the EXIF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.