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

  • Home
  • SEARCH
  • 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 339991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:34:28+00:00 2026-05-12T10:34:28+00:00

I am trying to run blocking_udp_echo_server.cpp from Boost asio example on MacOSX 10.5. But

  • 0

I am trying to run blocking_udp_echo_server.cpp from Boost asio example on MacOSX 10.5.

But it crashes:

From the console:
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/debug/safe_iterator.h:127:
   error: attempt to copy-construct an iterator from a singular iterator.

Objects involved in the operation:
iterator "this" @ 0x0x100420 {
type = N11__gnu_debug14_Safe_iteratorIN10__gnu_norm14_List_iteratorISt4pairIiPN5boost4asio6detail16reactor_op_queueIiE7op_baseEEEEN15__gnu_debug_def4listISB_SaISB_EEEEE
(mutable iterator);
 state = singular;
}
iterator "other" @ 0x0xbfffee64 {
type = N11__gnu_debug14_Safe_iteratorIN10__gnu_norm14_List_iteratorISt4pairIiPN5boost4asio6detail16reactor_op_queueIiE7op_baseEEEEN15__gnu_debug_def4listISB_SaISB_EEEEE
(mutable iterator);
 state = singular;
}
Program received signal:  “SIGABRT”.

From backtrace:

(gdb) bt
#0  0x918c3e42 in __kill ()
#1  0x918c3e34 in kill$UNIX2003 ()
#2  0x9193623a in raise ()
#3  0x91942679 in abort ()
#4  0x940d96f9 in __gnu_debug::_Error_formatter::_M_error ()
#5  0x0000ada6 in
__gnu_debug::_Safe_iterator<__gnu_norm::_List_iterator<std::pair<int,
boost::asio::detail::reactor_op_queue<int>::op_base*> >,
__gnu_debug_def::list<std::pair<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>,
std::allocator<std::pair<int,
boost::asio::detail::reactor_op_queue<int>::op_base*> > >
>::_Safe_iterator (this=0x100420, __x=@0xbfffee64) at
debug/safe_iterator.h:124
#6  0x00010195 in boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type::bucket_type
(this=0x100420) at hash_map.hpp:277
#7  0x0001291d in std::_Construct<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
(__p=0x100420, __value=@0xbfffee64) at stl_construct.h:81
#8  0x00012edd in
std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type*,
__gnu_norm::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type> >
>, unsigned long, boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
(__first={_M_current = 0x100420}, __n=3, __x=@0xbfffee64) at
stl_uninitialized.h:194
#9  0x00012f67 in
std::uninitialized_fill_n<__gnu_cxx::__normal_iterator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type*,
__gnu_norm::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type> >
>, unsigned long, boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
(__first={_M_current = 0x100420}, __n=3, __x=@0xbfffee64) at
stl_uninitialized.h:218
#10 0x00012f8f in
std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type*,
__gnu_norm::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type> >
>, unsigned long, boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
(__first={_M_current = 0x100420}, __n=3, __x=@0xbfffee64) at
stl_uninitialized.h:310
#11 0x000134ba in
__gnu_norm::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
>::_M_fill_insert (this=0x1002f0, __position={_M_current = 0x0},
__n=3, __x=@0xbfffee64) at vector.tcc:365
#12 0x00013760 in
__gnu_norm::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
>::insert (this=0x1002f0, __position={_M_current = 0x0}, __n=3,
__x=@0xbfffee64) at stl_vector.h:658
#13 0x00013807 in
__gnu_norm::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
>::resize (this=0x1002f0, __new_size=3, __x=@0xbfffee64) at
stl_vector.h:427
#14 0x000138c0 in
__gnu_debug_def::vector<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type,
std::allocator<boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type>
>::resize (this=0x1002f0, __sz=3, __c=@0xbfffee64) at debug/vector:169
#15 0x0001400e in boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::rehash
(this=0x1002c4, num_buckets=3) at hash_map.hpp:221
#16 0x0001443b in boost::asio::detail::hash_map<int,
boost::asio::detail::reactor_op_queue<int>::op_base*>::hash_map
(this=0x1002c4) at hash_map.hpp:67
#17 0x000144c4 in
boost::asio::detail::reactor_op_queue<int>::reactor_op_queue
(this=0x1002c0) at reactor_op_queue.hpp:42
#18 0x00014574 in
boost::asio::detail::kqueue_reactor<false>::kqueue_reactor
(this=0x100270, io_service=@0xbffff7a4) at kqueue_reactor.hpp:86
#19 0x00014850 in
boost::asio::detail::service_registry::use_service<boost::asio::detail::kqueue_reactor<false>
> (this=0x100180) at service_registry.hpp:109
#20 0x0001499d in
boost::asio::use_service<boost::asio::detail::kqueue_reactor<false> >
(ios=@0xbffff7a4) at impl/io_service.ipp:195
#21 0x00014abd in
boost::asio::detail::reactive_socket_service<boost::asio::ip::udp,
boost::asio::detail::kqueue_reactor<false> >::reactive_socket_service
(this=0x100250, io_service=@0xbffff7a4) at
reactive_socket_service.hpp:111
#22 0x00014b94 in
boost::asio::detail::service_registry::use_service<boost::asio::detail::reactive_socket_service<boost::asio::ip::udp,
boost::asio::detail::kqueue_reactor<false> > > (this=0x100180) at
service_registry.hpp:109
#23 0x00014ce1 in
boost::asio::use_service<boost::asio::detail::reactive_socket_service<boost::asio::ip::udp,
boost::asio::detail::kqueue_reactor<false> > > (ios=@0xbffff7a4) at
impl/io_service.ipp:195
#24 0x00014d25 in
boost::asio::datagram_socket_service<boost::asio::ip::udp>::datagram_socket_service
(this=0x100230, io_service=@0xbffff7a4) at
datagram_socket_service.hpp:95
#25 0x00014dee in
boost::asio::detail::service_registry::use_service<boost::asio::datagram_socket_service<boost::asio::ip::udp>
> (this=0x100180) at service_registry.hpp:109
#26 0x00014f3b in
boost::asio::use_service<boost::asio::datagram_socket_service<boost::asio::ip::udp>
> (ios=@0xbffff7a4) at impl/io_service.ipp:195
#27 0x00014f61 in
boost::asio::basic_io_object<boost::asio::datagram_socket_service<boost::asio::ip::udp>
>::basic_io_object (this=0xbffff6a4, io_service=@0xbffff7a4) at
basic_io_object.hpp:72
#28 0x00014fd3 in boost::asio::basic_socket<boost::asio::ip::udp,
boost::asio::datagram_socket_service<boost::asio::ip::udp>
>::basic_socket (this=0xbffff6a4, io_service=@0xbffff7a4,
endpoint=@0xbffff6b8) at basic_socket.hpp:108
#29 0x000150b5 in
boost::asio::basic_datagram_socket<boost::asio::ip::udp,
boost::asio::datagram_socket_service<boost::asio::ip::udp>
>::basic_datagram_socket (this=0xbffff6a4, io_service=@0xbffff7a4,
endpoint=@0xbffff6b8) at basic_datagram_socket.hpp:107
#30 0x00002022 in server (io_service=@0xbffff7a4, port=8090) at
/Users/n179911/Documents/ServerXCode/main.cpp:21
#31 0x0000217a in main (argc=2, argv=0xbffff7e8) at
/Users/n179911/Documents/ServerXCode/main.cpp:47
(gdb)

Any one has any idea?

  • 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-05-12T10:34:29+00:00Added an answer on May 12, 2026 at 10:34 am

    As far as i understand the only guaranteed operation on a singluar value is assigning a nonsigular one. Since i think the lib code is ok i get the impression your problem is more related to the build process:

    I would try the following approach to pinpoint the probem furhter:

    1. Using heavy optimization sometimes leads to problems, in rare cases default optimization might as well. Remove all optimization.

    2. If you build boost with an other compiler as your code that might lead to problems. If you didn’t build it by yourself with the same compiler try it. Might be it even won’t build.

    3. Using the first compiler revision (4.0.0, 3.0.0 etc..) might be a problem as well since those are mostly buggy (at least in case of GNU cc). Try 4.1 or something.

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

Sidebar

Ask A Question

Stats

  • Questions 231k
  • Answers 231k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the following function like this: Image('/path/to/original.image', '1/1', '150*', './thumb.jpg');… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer Check you database schema to see if the field (referenced… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer I figured out the problem - there was a session… May 13, 2026 at 2:13 am

Related Questions

I am trying to create a thread in C++ (Win32) to run a simple
I am trying to create a wrapper on Linux which controls how many concurrent
I was wondering if there was a way to execute very simple tasks on
I am trying to write a simple program to open a socket channel to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.