Note that there are some explanatory texts on larger screens.

plurals
  1. POboost asio example crashes on mac osx
    primarykey
    data
    text
    <p>I am trying to run blocking_udp_echo_server.cpp from Boost asio example on MacOSX 10.5.</p> <p>But it crashes:</p> <pre><code>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”. </code></pre> <p>From backtrace:</p> <pre><code>(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&lt;__gnu_norm::_List_iterator&lt;std::pair&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt; &gt;, __gnu_debug_def::list&lt;std::pair&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;, std::allocator&lt;std::pair&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt; &gt; &gt; &gt;::_Safe_iterator (this=0x100420, __x=@0xbfffee64) at debug/safe_iterator.h:124 #6 0x00010195 in boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type::bucket_type (this=0x100420) at hash_map.hpp:277 #7 0x0001291d in std::_Construct&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; (__p=0x100420, __value=@0xbfffee64) at stl_construct.h:81 #8 0x00012edd in std::__uninitialized_fill_n_aux&lt;__gnu_cxx::__normal_iterator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type*, __gnu_norm::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt; &gt;, unsigned long, boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; (__first={_M_current = 0x100420}, __n=3, __x=@0xbfffee64) at stl_uninitialized.h:194 #9 0x00012f67 in std::uninitialized_fill_n&lt;__gnu_cxx::__normal_iterator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type*, __gnu_norm::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt; &gt;, unsigned long, boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; (__first={_M_current = 0x100420}, __n=3, __x=@0xbfffee64) at stl_uninitialized.h:218 #10 0x00012f8f in std::__uninitialized_fill_n_a&lt;__gnu_cxx::__normal_iterator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type*, __gnu_norm::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt; &gt;, unsigned long, boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; (__first={_M_current = 0x100420}, __n=3, __x=@0xbfffee64) at stl_uninitialized.h:310 #11 0x000134ba in __gnu_norm::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt;::_M_fill_insert (this=0x1002f0, __position={_M_current = 0x0}, __n=3, __x=@0xbfffee64) at vector.tcc:365 #12 0x00013760 in __gnu_norm::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt;::insert (this=0x1002f0, __position={_M_current = 0x0}, __n=3, __x=@0xbfffee64) at stl_vector.h:658 #13 0x00013807 in __gnu_norm::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt;::resize (this=0x1002f0, __new_size=3, __x=@0xbfffee64) at stl_vector.h:427 #14 0x000138c0 in __gnu_debug_def::vector&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type, std::allocator&lt;boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::bucket_type&gt; &gt;::resize (this=0x1002f0, __sz=3, __c=@0xbfffee64) at debug/vector:169 #15 0x0001400e in boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::rehash (this=0x1002c4, num_buckets=3) at hash_map.hpp:221 #16 0x0001443b in boost::asio::detail::hash_map&lt;int, boost::asio::detail::reactor_op_queue&lt;int&gt;::op_base*&gt;::hash_map (this=0x1002c4) at hash_map.hpp:67 #17 0x000144c4 in boost::asio::detail::reactor_op_queue&lt;int&gt;::reactor_op_queue (this=0x1002c0) at reactor_op_queue.hpp:42 #18 0x00014574 in boost::asio::detail::kqueue_reactor&lt;false&gt;::kqueue_reactor (this=0x100270, io_service=@0xbffff7a4) at kqueue_reactor.hpp:86 #19 0x00014850 in boost::asio::detail::service_registry::use_service&lt;boost::asio::detail::kqueue_reactor&lt;false&gt; &gt; (this=0x100180) at service_registry.hpp:109 #20 0x0001499d in boost::asio::use_service&lt;boost::asio::detail::kqueue_reactor&lt;false&gt; &gt; (ios=@0xbffff7a4) at impl/io_service.ipp:195 #21 0x00014abd in boost::asio::detail::reactive_socket_service&lt;boost::asio::ip::udp, boost::asio::detail::kqueue_reactor&lt;false&gt; &gt;::reactive_socket_service (this=0x100250, io_service=@0xbffff7a4) at reactive_socket_service.hpp:111 #22 0x00014b94 in boost::asio::detail::service_registry::use_service&lt;boost::asio::detail::reactive_socket_service&lt;boost::asio::ip::udp, boost::asio::detail::kqueue_reactor&lt;false&gt; &gt; &gt; (this=0x100180) at service_registry.hpp:109 #23 0x00014ce1 in boost::asio::use_service&lt;boost::asio::detail::reactive_socket_service&lt;boost::asio::ip::udp, boost::asio::detail::kqueue_reactor&lt;false&gt; &gt; &gt; (ios=@0xbffff7a4) at impl/io_service.ipp:195 #24 0x00014d25 in boost::asio::datagram_socket_service&lt;boost::asio::ip::udp&gt;::datagram_socket_service (this=0x100230, io_service=@0xbffff7a4) at datagram_socket_service.hpp:95 #25 0x00014dee in boost::asio::detail::service_registry::use_service&lt;boost::asio::datagram_socket_service&lt;boost::asio::ip::udp&gt; &gt; (this=0x100180) at service_registry.hpp:109 #26 0x00014f3b in boost::asio::use_service&lt;boost::asio::datagram_socket_service&lt;boost::asio::ip::udp&gt; &gt; (ios=@0xbffff7a4) at impl/io_service.ipp:195 #27 0x00014f61 in boost::asio::basic_io_object&lt;boost::asio::datagram_socket_service&lt;boost::asio::ip::udp&gt; &gt;::basic_io_object (this=0xbffff6a4, io_service=@0xbffff7a4) at basic_io_object.hpp:72 #28 0x00014fd3 in boost::asio::basic_socket&lt;boost::asio::ip::udp, boost::asio::datagram_socket_service&lt;boost::asio::ip::udp&gt; &gt;::basic_socket (this=0xbffff6a4, io_service=@0xbffff7a4, endpoint=@0xbffff6b8) at basic_socket.hpp:108 #29 0x000150b5 in boost::asio::basic_datagram_socket&lt;boost::asio::ip::udp, boost::asio::datagram_socket_service&lt;boost::asio::ip::udp&gt; &gt;::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) </code></pre> <p>Any one has any idea?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload