Paypal payment failure - paypal

for getting IPN post to my website i have changed some settings in my sandbox account.
After when i;m trying to buy in paypal side this error occured each time
Rapids::Exception (N6Rapids5Tools13PimpExceptionE): Pimp RC: 3514
Failure log: Use of pimp_rc (3013), Use of pimp_rc (14816), Use of pimp_rc (9449), Use of pimp_rc (9445), Use of pimp_rc (3198), Use of pimp_rc (3011), Use of pimp_rc (10021), Use of pimp_rc (3199), Use of pimp_rc (3015), Use of pimp_rc (3014), Use of pimp_rc (3200), Use of pimp_rc (3257), Use of pimp_rc (3012), Use of pimp_rc (3141), Use of pimp_rc (3535), Use of pimp_rc (3504), Use of pimp_rc (10022), Use of pimp_rc (6702), Use of pimp_rc (3001), Use of pimp_rc (3120), Use of pimp_rc (3517), Use of pimp_rc (3531), Use of pimp_rc (3201), Use of pimp_rc (3803), Use of pimp_rc (6834), Use of pimp_rc (3807), Use of pimp_rc (3808), Use of pimp_rc (3810), Use of pimp_rc (3812), Use of pimp_rc (3809), Use of pimp_rc (3805), Use of pimp_rc (2002), Use of pimp_rc (3177), Use of pimp_rc (3051), Use of pimp_rc (3510), Use of pimp_rc (4003), Use of pimp_rc (3013), Use of pimp_rc (4011), Use of pimp_rc (3300), Use of pimp_rc (3286), Use of pimp_rc (6681), Use of pimp_rc (14605), Use of pimp_rc (10361), Use of pimp_rc (14353), Use of pimp_rc (14817), Use of pimp_rc (4002), Use of pimp_rc (2001), Use of pimp_rc (4001), Use of pimp_rc (11045), Use of pimp_rc (3593), Use of pimp_rc (4071), Use of pimp_rc (3514), Use of pimp_rc (4022), Use of pimp_rc (4003), Use of pimp_rc (4003), Use of pimp_rc (4003), Use of pimp_rc (4011), Use of pimp_rc (4011), (rcf # virtual int Merchant::PimpAutoSellerBLIImpl::seller_generate_transaction_token(ullong, PimpTransID&):406) , Use of pimp_rc (3514) Backtrace: Rapids::Tools::PimpException::PimpException() Rapids::BusinessBlocks::HostedPayments::get_synch_ipn_url(PayPalCommonWebAppContext const&, unsigned long long, String const&, String const&, String&, PimpTransaction const&, MiscUbiquityContainer&, TransactionUbiquityContainer&, String const&, unsigned long long) Rapids::BusinessBlocks::HostedPayments::get_synch_ipn_url(PayPalCommonWebAppContext const&, PimpXClick&, PimpTransaction const&, MiscUbiquityContainer&, TransactionUbiquityContainer&, unsigned long long) Rapids::Flows::HostedPayments::StateAutoreturnCheck::execute(Rapids::CGIVars const&) Rapids::DecoratedState::execute(Rapids::CGIVars const&) Riprap::RiprapRapidsGenericFlow::handle_execute(Riprap::WebAppContextOrnate const&, Rapids::TransitionRegistry const&, Rapids::State*, String const&, String const&, unsigned long long) Riprap::RiprapRapidsGenericFlow::process_states(Riprap::WebAppContextOrnate const&, Riprap::RiprapRapidsGenericFlow::ProcessStates, Riprap::DispatchInterceptorRegistry const&, Rapids::TransitionEdge const*) Riprap::RiprapRapidsGenericFlow::flow_continue_from_interception(Riprap::WebAppContextOrnate const&, Riprap::WebAppReturn const&, Riprap::DispatchInterceptorRegistry const&) Riprap::call_rapids(Riprap::WebAppContext const&, Riprap::RapidsFlowFactory const&, Riprap::DispatchAction const&, Riprap::WebAppReturn const&, String const&, Riprap::DispatchInterceptorRegistry const&) Riprap::dispatch_loop(Riprap::EPRegistry const&, Riprap::WebAppContext const&, Riprap::DispatchAction&, Riprap::WebAppReturn&, String const&, Riprap::DispatchInterceptorRegistry const&) Riprap::dispatch_wrapper(OutputStream&, Riprap::EPRegistry const&, Riprap::WebAppContext const&, Riprap::WebAppReturn const&, String const&, bool const&, Riprap::DispatchInterceptorRegistry const&) Riprap::entry_point(HTTPInterface&, Riprap::CGIVars&, OutputStream&, String const&, String const&) main
An error has occurred.
why , i have set all settings right as it described in http://help.wildapricot.com/display/DOC/PayPal+account+setup
but pasting PDT token, because i couldn't find the place to past it

I have seen this before and it's the most unhelpful error message in the world. However, it is related to either the merchant account or the buyer account not being verified. Log in to each one separately at http://sandbox.paypal.com/ and click the Verify account. Just follow the steps, it doesn't require any real life information.

Posting this in case anybody else runs into this problem. Both my seller and buyer sandbox accounts were verified and I still got this error.
For me this error was fixed when I did my testing in an Incognito window. I did 10+ test payments without error while before it would always show these errors after 2 or 3 payments.
I assume that this is a sandbox only error, because I have never seen this error on a live account (and probably did close to a hundred payments in the past using a live account).

I got this ridiculous error message when using a fake email address (test#test.com).
Once I used my real email address, which has an account on the real PayPal website, the error disappeared.
After that, doing the following made a new Sandbox account:
Use a real PayPal account email (for the purchaser)
Login with your password - it says "username/password not found"
Do it again
On the third time, there is a Guest User button.
Click it, enter card details and make the payment.
After payment, it asks if you want to create a new account - say yes.
Now the customer account exists on the Sandbox website, and you can login for the next test.

Related

high-availability nodes for streaming data are disconnected

underversion 1.30.7 of dolphindb , the node is disconnected and can be manually activated after the high-availability flow data table is created, what is the reason for the unsuccessful creation of the table?
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./dolphindb -home /root/dolphindb/server/data/P3-NODE1 -logFile/root/dolphindb'.
Program terminated with signal 11 , Segmentation fault.
#0 0x00000000008da027 in RealtimeTable::getKeyColumnIndex(int) const () Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7.x86_64 libgcc-4.8.5-36.el7.x86_64 (gdb) bt
#0 0x00000000008da027 in RealtimeTable::getKeyC olumnIndex(int) const ()
#1 0x00000000007039b3 in RegisterLogEntry::setTable(SmartPointer<Table> const&) ()
#2 0x000000000070853b in StreamingHA::registerDataFile(std::string const&, SmartPointer< StreamingDataFile> const&, bool) ()
#3 0x0000000000711a9c in StreamingHAManagerImpl::registerStreamTable(int, std::string const&, SmartPointer<Table> const&) ()
#4 0x00000000007ae416 in OperatorImp::haStreamTableInternal(Heap*, std::vector< SmartPointer<Constant>, std::allocator<SmartPointer<Constant>> >&) ()
# 5 0x00000000007aedbf in OperatorImp :: haStreamTable(Heap*, std::vector<SmartPointer<Constant>, std::allocator<SmartPointer<Constant>> >&) ()
#6 0x00007fb64c31877e in SystemFunction::call(Heap*, std::vector<SmartPointer <Constant >, std::allocator<SmartPoin ter<Constant>> >&)() from ./libDolphinDB.so
#7 0x00000000006d9a96 in SessionImp::run(SmartPointer<FunctionDef> const&, std::vector<SmartPointer<Constant> , std ::allocator<SmartPointer<Constant>> >&) ()
#8 0x00000000006deeb8 in SessionImp::run(std:: string const&, std::vector<SmartPointer<Constant>, std::allocator<SmartPointer<Constant> >> &) ()
#9 0x00000000005e5415 in APISocketConsole::execute() ()
#10 0x00000000005e1491 in SocketConsole::run() ()
#11 0x000000000062989e in Worker::run() ()
#12 0x00 007fb64be6b6dc in Runnable:: start() () from ./libDolphinDB.so
#13 0x00007fb64be6c8a0 in Thread::startFunc(void*) () from ./libDolphinDB.so
#14 0x00007fb64b1f5dd5 in start_thread () from /lib64/libpthread.so.0
#15 0x00007e ina2 () fro m /lib64/libc.so.6 
In the latest release of DolphinDB (V1.30.18/V2.00.6), the mentioned issues have been fixed. Upgrade your server and have a try.
The following script creates a high-availability stream table “haDevSt“ in the raft group “2“ where cacheLimit is 100000 and keyColumn is “id“.
t1=table(1:0,
["id","source_address","source_port","destination_address","destination_port"],
[STRING,INT,INT,INT,INT] ) haStreamTable(2,t1,"haDevSt",100000,"id")
To drop a high-availability stream table, call dropStreamTable(tableName).
For more information, please check the https://dolphindb.com/help/index.html

Cmake undefined references when using the external library Poco (installed via vcpkg) in Visual Studio Code

I'm currently trying to develop a C++ cross-platform project in VSCode which should include the Poco library which I downloaded using vcpkg. I then followed this tutorial: https://www.codeproject.com/Articles/252566/Learning-Poco-GET-with-HTTP but I cannot resolve the undefined references errors that also the article shows.
Here is my main (httpGet.cpp) (which I copied from the link above):
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/StreamCopier.h>
#include <Poco/Path.h>
#include <Poco/URI.h>
#include <Poco/Exception.h>
#include <iostream>
#include <string>
using namespace Poco::Net;
using namespace Poco;
using namespace std;
int main(int argc, char **argv)
{
if (argc != 2)
{
cout << "Usage: " << argv[0] << " <uri>" << endl;
cout << " fetches the resource identified by <uri> and print it" << endl;
return -1;
}
try
{
// prepare session
URI uri(argv[1]);
HTTPClientSession session(uri.getHost(), uri.getPort());
// prepare path
string path(uri.getPathAndQuery());
if (path.empty()) path = "/";
// send request
HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
session.sendRequest(req);
// get response
HTTPResponse res;
cout << res.getStatus() << " " << res.getReason() << endl;
// print response
istream &is = session.receiveResponse(res);
StreamCopier::copyStream(is, cout);
}
catch (Exception &ex)
{
cerr << ex.displayText() << endl;
return -1;
}
return 0;
}
Here is my CMakeLists.txt:
cmake_minimum_required(VERSION 3.16)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PocoNet_DIR "C:/vcpkg/installed/x64-windows/share/poco")
set(PocoFoundation_DIR "C:/vcpkg/installed/x64-windows/share/poco")
set(VCPKG_TARGET_TRIPLET "x64-windows"
CACHE STRING "")
set(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
project(TryPOCO)
find_package(Poco CONFIG REQUIRED Net)
find_package(PocoNet REQUIRED)
include_directories("C:/vcpkg/installed/x64-windows/include")
link_directories("C:/vcpkg/installed/x64-windows/lib")
add_executable(${PROJECT_NAME} httpGet.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE PocoNet)
And here is the error I get:
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj): In function `main':
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:27: undefined reference to `Poco::URI::URI(char const*)'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:28: undefined reference to `Poco::URI::getPort() const'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:28: undefined reference to `Poco::Net::HTTPClientSession::HTTPClientSession(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:31: undefined reference to `Poco::URI::getPathAndQuery[abi:cxx11]() const'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:35: undefined reference to `Poco::Net::HTTPRequest::HTTPRequest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:36: undefined reference to `Poco::Net::HTTPClientSession::sendRequest(Poco::Net::HTTPRequest&)'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:39: undefined reference to `Poco::Net::HTTPResponse::HTTPResponse()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:43: undefined reference to `Poco::Net::HTTPClientSession::receiveResponse(Poco::Net::HTTPResponse&)'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:44: undefined reference to `Poco::StreamCopier::copyStream(std::istream&, std::ostream&, unsigned long long)'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:39: undefined reference to `Poco::Net::HTTPResponse::~HTTPResponse()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:35: undefined reference to `Poco::Net::HTTPRequest::~HTTPRequest()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:28: undefined reference to `Poco::Net::HTTPClientSession::~HTTPClientSession()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:27: undefined reference to `Poco::URI::~URI()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:39: undefined reference to `Poco::Net::HTTPResponse::~HTTPResponse()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:35: undefined reference to `Poco::Net::HTTPRequest::~HTTPRequest()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:28: undefined reference to `Poco::Net::HTTPClientSession::~HTTPClientSession()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:27: undefined reference to `Poco::URI::~URI()'
[build] C:/TesiMag/ProveVSCode/TryPOCO/httpGet.cpp:48: undefined reference to `Poco::Exception::displayText[abi:cxx11]() const'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj): In function `Poco::Net::Impl::IPv4SocketAddressImpl::host() const':
[build] C:/vcpkg/installed/x64-windows/include/Poco/Net/SocketAddressImpl.h:81: undefined reference to `Poco::Net::IPAddress::IPAddress(void const*, int)'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj): In function `Poco::Net::Impl::IPv6SocketAddressImpl::host() const':
[build] C:/vcpkg/installed/x64-windows/include/Poco/Net/SocketAddressImpl.h:143: undefined reference to `Poco::Net::IPAddress::IPAddress(void const*, int, unsigned int)'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj):httpGet.cpp:(.rdata$_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE[_ZTVN4Poco3Net4Impl21IPv6SocketAddressImplE]+0x50): undefined reference to `Poco::Net::Impl::IPv6SocketAddressImpl::toString[abi:cxx11]() const'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj): In function `Poco::Net::Impl::IPv6SocketAddressImpl::~IPv6SocketAddressImpl()':
[build] C:/vcpkg/installed/x64-windows/include/Poco/Net/SocketAddressImpl.h:118: undefined reference to `Poco::Net::Impl::SocketAddressImpl::~SocketAddressImpl()'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj):httpGet.cpp:(.rdata$_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE[_ZTVN4Poco3Net4Impl21IPv4SocketAddressImplE]+0x50): undefined reference to `Poco::Net::Impl::IPv4SocketAddressImpl::toString[abi:cxx11]() const'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj): In function `Poco::Net::Impl::IPv4SocketAddressImpl::~IPv4SocketAddressImpl()':
[build] C:/vcpkg/installed/x64-windows/include/Poco/Net/SocketAddressImpl.h:56: undefined reference to `Poco::Net::Impl::SocketAddressImpl::~SocketAddressImpl()'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj):httpGet.cpp:(.rdata$.refptr._ZN4Poco3Net11HTTPRequest8HTTP_GETB5cxx11E[.refptr._ZN4Poco3Net11HTTPRequest8HTTP_GETB5cxx11E]+0x0): undefined reference to `Poco::Net::HTTPRequest::HTTP_GET[abi:cxx11]'
[build] CMakeFiles\TryPOCO.dir/objects.a(httpGet.cpp.obj):httpGet.cpp:(.rdata$.refptr._ZN4Poco3Net11HTTPMessage8HTTP_1_1B5cxx11E[.refptr._ZN4Poco3Net11HTTPMessage8HTTP_1_1B5cxx11E]+0x0): undefined reference to `Poco::Net::HTTPMessage::HTTP_1_1[abi:cxx11]'
[build] collect2.exe: error: ld returned 1 exit status
[build] mingw32-make.exe[2]: *** [CMakeFiles\TryPOCO.dir\build.make:86: TryPOCO.exe] Error 1
[build] mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:75: CMakeFiles/TryPOCO.dir/all] Error 2
[build] mingw32-make.exe: *** [Makefile:83: all] Error 2
[build] Compilazione terminata con codice di uscita 2
The compiler I am using is g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0.
I suppose it's a linker error, but I am new to CMake so I don't really know if there are any other libraries that I should add to target_link_libraries or somewhere else in the CMakeLists.txt.
Also I don't know if the CMakeLists.txt is written in a good manner since it's the first time ever I use CMake.
Thank you in advance for your answers.
I think you need a find_library in CMakeLists.txt.
See https://cmake.org/cmake/help/cmake2.6docs.html#command:find_library

jxbrowser on macosx using SWT deadlock

I have finished evaluating jxbrowser integration with Eclipse for Windows and Linux. My last roadblock is Mac. I get a dead lock while instantiating the browser. I am new to cocoa programming, so any pointer will be greatly appreciated.
I took the example project and modify it to work with SWT.
import java.awt.BorderLayout;
import java.awt.Frame;
import org.eclipse.swt.SWT;
import org.eclipse.swt.awt.SWT_AWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
public class JxBrowserApp {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
Composite composite = new Composite(shell, SWT.EMBEDDED | SWT.NO_BACKGROUND);
Frame frame = SWT_AWT.new_Frame(composite);
Browser browser = new Browser(); // deadlock here
BrowserView browserView = new BrowserView(browser);
frame.add(browserView, BorderLayout.CENTER);
frame.setLocationRelativeTo(null);
frame.setFocusable(true);
browser.loadURL("http://www.google.com");
shell.pack();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}
Here is the callstack
JxBrowserApp at localhost:57970
Thread [main] (Suspended)
owns: IPC (id=72)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.parkNanos(Object, long) line: 215
CountDownLatch$Sync(AbstractQueuedSynchronizer).doAcquireSharedNanos(int, long) line: 1037
CountDownLatch$Sync(AbstractQueuedSynchronizer).tryAcquireSharedNanos(int, long) line: 1328
CountDownLatch.await(long, TimeUnit) line: 277
LatchUtil.await(CountDownLatch, RuntimeException, int) line: 25
LatchUtil.await(CountDownLatch, RuntimeException) line: 20
IPC.a(boolean) line: 159
IPC.start() line: 128
Browser.<init>(BrowserType, BrowserContext, Channel) line: 195
Browser.<init>(BrowserType, BrowserContext) line: 172
Browser.<init>(BrowserContext) line: 139
Browser.<init>() line: 125
JxBrowserApp.main(String[]) line: 27
Thread [AWT-EventQueue-0] (Suspended)
CPlatformView.nativeCreateView(int, int, int, int, long) line: not available [native method]
CPlatformView.initialize(LWWindowPeer, CPlatformResponder) line: 61
CViewPlatformEmbeddedFrame.initialize(Window, LWWindowPeer, PlatformWindow) line: 55
LWWindowPeer.<init>(Window, PlatformComponent, PlatformWindow, LWWindowPeer$PeerType) line: 156
LWCToolkit(LWToolkit).createDelegatedPeer(Window, PlatformComponent, PlatformWindow, LWWindowPeer$PeerType) line: 210
LWCToolkit.createEmbeddedFrame(CViewEmbeddedFrame) line: 204
CViewEmbeddedFrame.addNotify() line: 55
SWT_AWT$1.run() line: not available
InvocationEvent.dispatch() line: 311
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 756
EventQueue.access$500(EventQueue, AWTEvent, Object) line: 97
EventQueue$3.run() line: 709
EventQueue$3.run() line: 703
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]
ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 76
EventQueue.dispatchEvent(AWTEvent) line: 726
EventDispatchThread.pumpOneEventForFilters(int) line: 201
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 116
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 105
EventDispatchThread.pumpEvents(int, Conditional) line: 101
EventDispatchThread.pumpEvents(Conditional) line: 93
EventDispatchThread.run() line: 82
Daemon Thread [Timer-0] (Suspended)
waiting for: TaskQueue (id=87)
Object.wait(long) line: not available [native method]
TimerThread.mainLoop() line: 552
TimerThread.run() line: 505
Daemon Thread [IPC Server Thread] (Suspended)
PlainSocketImpl.socketAccept(SocketImpl) line: not available [native method]
SocksSocketImpl(AbstractPlainSocketImpl).accept(SocketImpl) line: 409
ServerSocket.implAccept(Socket) line: 545
ServerSocket.accept() line: 513
Server.start(int) line: 81
e.run() line: 1237
Thread.run() line: 745
Daemon Thread [IPC Process Thread] (Suspended)
CGraphicsDevice.nativeGetScreenInsets(int) line: not available [native method]
CGraphicsDevice.getScreenInsets() line: 128
LWCToolkit.getScreenInsets(GraphicsConfiguration) line: 407
SwingUtilities$SharedOwnerFrame(Window).init(GraphicsConfiguration) line: 506
SwingUtilities$SharedOwnerFrame(Window).<init>() line: 537
SwingUtilities$SharedOwnerFrame(Frame).<init>(String) line: 420
SwingUtilities$SharedOwnerFrame(Frame).<init>() line: 385
SwingUtilities$SharedOwnerFrame.<init>() line: 1758
SwingUtilities.getSharedOwnerFrame() line: 1833
JWindow.<init>(Frame) line: 187
JWindow.<init>() line: 139
InternalChromiumProcess.doStart(List<String>) line: 1078
InternalChromiumProcess(ChromiumProcess).start(int) line: 123
d.run() line: 184
Thread.run() line: 745

mongod crash(terminated with signal 5)

I configured a mongodb's capped collection,with capacity more than 3G,after that mongod crash for many times,but there was nothing wrong in the mongd.log.Howerver linux abrt has core dumped for mongod,messages from coredump are as following:
Program terminated with signal 5, Trace/breakpoint trap. #0 0x00000000010b9951 in v8::internal::OS::DebugBreak() () Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.107.el6.x86_64 libgcc-4.4.7-3.el6.x86_64 libstdc++-4.4.6-4.el6.x86_64 (gdb) where #0 0x00000000010b9951 in v8::internal::OS::DebugBreak() () #1 0x00000000010ba06a in
v8::internal::OS::Abort() () #2 0x0000000000f1c5f3 in API_Fatal(char const*, char const*, ...) () #3 0x0000000000ece607 in ?? () #4 0x0000000000ece916 in
v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) () #5 0x000000000108c891 in v8::internal::Map::UpdateCodeCache(v8::internal::Handle<v8::internal::Map>,
v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::Code>) () #6 0x0000000001149180 in
v8::internal::StubCache::ComputeKeyedLoadOrStoreElement(v8::internal::Handle<v8::internal::Map>, v8::internal::KeyedIC::StubKind, v8::internal::StrictModeFlag) () #7
0x0000000001000bfc in v8::internal::KeyedIC::ComputeMonomorphicStub(v8::internal::Handle<v8::internal::Map>,
v8::internal::KeyedIC::StubKind, v8::internal::StrictModeFlag, v8::internal::Handle<v8::internal::Code>) () #8 0x000000000100779a in
v8::internal::KeyedIC::ComputeStub(v8::internal::Handle<v8::internal::JSObject>, v8::internal::KeyedIC::StubKind, v8::internal::StrictModeFlag,
v8::internal::Handle<v8::internal::Code>) () #9 0x0000000001008551 in v8::internal::KeyedLoadIC::Load(v8::internal::InlineCacheState,
v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, bool) () #10 0x000000000100894d in v8::internal::KeyedLoadIC_Miss(v8::internal::Arguments,
v8::internal::Isolate*) ()
my mongodb is 2.4.1, running in centos 6.3,16G memory and 8cpus.
Anyone can help me? Thanks very much.
The out of memory error mentioned makes me suspect that this could be an occurrence of this bug (V8 memory leaking):
https://jira.mongodb.org/browse/SERVER-9230
Can you upgrade to 2.4.2+ and see if the error still happens for you?

Prevent UIDocumentInteractionController PresentPreview from crashing my App

I'm trying to preview a file with UIDocumentInteractionController. Seems simple enough but randomly the app crashes with a SIGSEGV, and after a few hours trying all kind of hacks I just don't get what's missing.
This code is called from my UIViewController class :
void Initialize ()
{
mInteractionControllerDelegate = new UIDocumentInteractionControllerDelegateClass(this, mFile);
mInteractionController = UIDocumentInteractionController.FromUrl(NSUrl.FromFilename(mFile.Name));
mInteractionController.Delegate = mInteractionControllerDelegate;
}
mInteractionControllerDelegate and mInteractionController are member variables of my view controller class (I tried that, in order to make sure an event wasn't firing on a variable that would have been GCed)
I present the preview on a button click (the part with the MPMoviePlayerViewController is working fine :
void btnShowTouchUpInside (object sender, EventArgs e)
{
if (mFile.Name.EndsWith(".mpeg") || mFile.Name.EndsWith(".avi") || mFile.Name.EndsWith(".mpg"))
{
MPMoviePlayerViewController mp = new MPMoviePlayerViewController(NSUrl.FromString(mFile.VideoURL));
this.PresentMoviePlayerViewController(mp);
}
else
{
InvokeOnMainThread(delegate {
mInteractionController.PresentPreview(true);
});;
}
}
In some cases, the preview will work (small txt files for example : but I'm not sure of the file size => crash correlation). But if I try with some bigger png files for example (500 ko), I see the preview for a few seconds, and then then app crashes with the following stack trace :
Stacktrace:
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) <IL 0x00024, 0xffffffff>
at MonoTouch.Foundation.NSObject/MonoTouch_Disposer.Drain (MonoTouch.Foundation.NSObject) [0x0002a] in /Users/plasma/Source/iphone/monotouch/Foundation/NSObject.cs:305
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00052, 0xffffffff>
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
at DTS.Application.Main (string[]) [0x00000] in /Users/seb/Projects/DTS/DTS/Main.cs:14
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Native stacktrace:
0 DTS 0x000d1965 mono_handle_native_sigsegv + 343
1 DTS 0x0000ffb4 mono_sigsegv_signal_handler + 322
2 libSystem.B.dylib 0x98a9f45b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 ??? 0x0d24837c 0x0 + 220496764
5 ??? 0x077520d6 0x0 + 125116630
6 DTS 0x0000fd6f mono_jit_runtime_invoke + 1332
7 DTS 0x001ee239 mono_runtime_invoke + 137
8 DTS 0x0029e9ab monotouch_trampoline + 2527
9 Foundation 0x0140e94e __NSThreadPerformPerform + 251
10 CoreFoundation 0x00ea08ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
11 CoreFoundation 0x00dfe88b __CFRunLoopDoSources0 + 571
12 CoreFoundation 0x00dfdd86 __CFRunLoopRun + 470
13 CoreFoundation 0x00dfd840 CFRunLoopRunSpecific + 208
14 CoreFoundation 0x00dfd761 CFRunLoopRunInMode + 97
15 GraphicsServices 0x0404c1c4 GSEventRunModal + 217
16 GraphicsServices 0x0404c289 GSEventRun + 115
17 UIKit 0x01ce0c93 UIApplicationMain + 1160
18 ??? 0x09d540a3 0x0 + 164970659
19 ??? 0x09d53e74 0x0 + 164970100
20 ??? 0x09d53474 0x0 + 164967540
21 ??? 0x09d532cc 0x0 + 164967116
22 ??? 0x09d5341e 0x0 + 164967454
23 DTS 0x0000fd6f mono_jit_runtime_invoke + 1332
24 DTS 0x001ee239 mono_runtime_invoke + 137
25 DTS 0x001f0920 mono_runtime_exec_main + 669
26 DTS 0x001efd0a mono_runtime_run_main + 843
27 DTS 0x000a3c62 mono_jit_exec + 200
28 DTS 0x002a25eb main + 3838
29 DTS 0x000030c9 _start + 208
30 DTS 0x00002ff8 start + 40
Debug info from gdb:
/tmp/mono-gdb-commands.VWK7bK:1: Error in sourced command file:
unable to debug self
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Final clue : this is the code for the UIDocumentInteractionControllerDelegateClass (created from other questions on SO) :
public class UIDocumentInteractionControllerDelegateClass : UIDocumentInteractionControllerDelegate
{
private UIViewController mViewController;
private DTSVirtualFile mFile;
public UIDocumentInteractionControllerDelegateClass(UIViewController viewController, DTSVirtualFile file)
{
mViewController = viewController;
mFile = file;
}
public override UIViewController ViewControllerForPreview (UIDocumentInteractionController controller)
{
return mViewController;
}
public override UIView ViewForPreview (UIDocumentInteractionController controller)
{
return mViewController.View;
}
public override RectangleF RectangleForPreview (UIDocumentInteractionController controller)
{
return mViewController.View.Frame;
}
public override void DidEndPreview (UIDocumentInteractionController controller)
{
mFile.DeleteCopy();
}
public override void DidDismissOptionsMenu (UIDocumentInteractionController controller)
{
// TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute
}
public override void WillBeginPreview (UIDocumentInteractionController controller)
{
Console.WriteLine("WillBeginPreview");
}
public override void WillBeginSendingToApplication (UIDocumentInteractionController controller)
{
// TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute
}
public override void WillPresentOpenInMenu (UIDocumentInteractionController controller)
{
// TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute
}
public override void WillPresentOptionsMenu (UIDocumentInteractionController controller)
{
// TODO: Implement - see: http://go-mono.com/docs/index.aspx?link=T%3aMonoTouch.Foundation.ModelAttribute
}
}
When I debug I can step over PresentPreview fine, but it then crashes right afterwards. If I comment the PresentPreview line, no crash.
Any pointers, solutions ?
There's an ABI bug that affects MonoTouch when methods returns structs (not classes), like a RectangleF and leads to similar crashes. Device builds (using a different ABO) are not affected by this issue.
A workaround is to avoid overriding methods that returns structure such as:
public override RectangleF RectangleForPreview (UIDocumentInteractionController controller)