segmentation-fault

Segmentation Fault Catch

不问归期 提交于 2019-12-07 08:34:05
问题 I have a python script and it will loop through bunch of maya files and do some stuff. But some time maya get seg fault and my script will stop there. I tried with signal and multiprocess. But both failed import os, optparse, glob, json, signal import maya.standalone import maya.cmds as cmds from multiprocessing import Process, Queue def loadMayaBd(): maya.standalone.initialize(name='python') def sig_handler(signum, frame): print "segfault" def doSome(args, options): signal.signal(signal

QApplication segmentation fault

风格不统一 提交于 2019-12-07 07:56:55
问题 I get a crash when try to create a QApplication object. This is my code: #include <QLabel> #include <QApplication> int main(int argc, char* argv[]) { QApplication app(argc, argv); return app.exec(); } I am using Qt version 4.8.4 and the MinGW compiler. My application crashes when running QCoreApplicationPrivate::processCommandLineArguments method. Can anybody tell how to solve this problem? 回答1: Apparently, this error is caused by binary incompatibility of Qt binaries and your compiler. From

RSpec throws segmentation fault

那年仲夏 提交于 2019-12-07 07:47:49
问题 sometimes my test suite throws a segmentation fault for no reasons. Here is the output: /Users/Test/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.9/lib/active_record/relation/query_methods.rb:268: [BUG] Bus Error ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0] -- Control frame information ----------------------------------------------- c:0209 p:---- s:0839 b:0839 l:000838 d:000838 CFUNC :- c:0208 p:0068 s:0835 b:0833 l:000832 d:000832 METHOD /Users/Test/.rvm/gems/ruby-1.9.3

Using a function to remove duplicates from an array in C++

懵懂的女人 提交于 2019-12-07 07:05:07
问题 I'm writing a program that has a user input integers into an array, calls a function that removes duplicates from that array, and then prints out the modified array. When I run it, it lets me input values into the array, but then gives me a "Segmentation fault" error message when I'm done inputing values. What am I doing wrong? Here is my code: #include <iostream> using namespace std; void rmDup(int array[], int& size) { for (int i = 0; i < size; i++) { for (int j = i + 1; j < size; j++) { if

libVLC function media_player_new() throws Segmentation Fault

て烟熏妆下的殇ゞ 提交于 2019-12-07 06:33:40
问题 media_player_new() throws segmentation fault. import vlc ins=vlc.Instance() player=ins.media_player_new() Here is where it crashes: Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libvlc.dylib 0x000000010059aa78 libvlc_media_player_new + 24 libvlc.dylib is in the place where script is looking: /Applications/VLC.app/Contents/MacOS/lib vlc.py can be found here: git://git.videolan.org/vlc/bindings/python.git Any ideas why or how to debug? 回答1: Launch Python in 32 bit modes by running

pthread_cond_broadcast broken with dlsym?

余生颓废 提交于 2019-12-07 05:48:54
问题 I am trying to interpose calls to pthread_cond_broadcast using LD_PRELOAD mechanism. My interposed pthread_cond_broadcast function just calls the original pthread_cond_broadcast. However, for a very simple pthread code where both pthread_cond_wait and pthread_cond_broadcast get invoked, I either end up with a segfault in glibc (for glibc 2.11.1) or the program hangs (for glibc 2.15). Any clues on that is going on? The interposition code (that gets compiled as a shared library): #define _GNU

Catching segfault with debugger in Python

余生颓废 提交于 2019-12-07 04:40:59
问题 I want to debug a Python program which is often stuck. Basically, my program runs a spyne-server which accepts SOAP requests. My program is multi-threaded and sometimes, the client I use to reach it timeouts. I've tryed severals debuggers such as PUDB, PDB, WINPDB, PYSTUCK but I wasn't able to catch any exception from them, in fact they happen to be stuck too (CTRL+C doesnt work...) The best I've achieved was from GDB with the following command: gdb -ex r --args python myscript.py GDB manages

Ruby 1.9.3-p0 and RSpec causes frequent segmentation faults

余生颓废 提交于 2019-12-07 03:28:51
问题 Is it just me, or has Ruby 1.9.3 introduced frequent segmentation faults when running RSpec? Since upgrading to 1.9.3, I find startup time is noticeably quicker, however I get segmentation faults when running RSpec around 50% of the time. The output that I am getting from Ruby is at http://pastebin.com/89YmpzaJ and my Gemfile is at http://pastebin.com/L6r73Max Does anyone know what could be causing this? I am seeing this problem on both my CI server and my local development machine. 回答1:

Swig error with Nested enums in C++

[亡魂溺海] 提交于 2019-12-07 02:02:46
I have a class similar to the following. It has a nested enum OptionTag. class MediaPacket { public: struct RtcpAppName { char mName[RTCP_APPNAME_LENGTH]; }; enum OptionTag { RESERVED = 0, PROFILE = 1, LATENCY = 2, PKTLOSS = 3, JITTER = 4, LEGACYMIX = 5, LASTTAG = 255 }; .... .... list<OptionTag> GetOptions(unsigned int ssrc) const; }; For this I created a swig interface as follows %module mediaopts_packet %include "stdint.i" //Redefining nested structure in swig struct RtcpAppName { char mName[RTCP_APPNAME_LENGTH]; }; %{ #define SWIG_FILE_WITH_INIT #include "../include/mediaopts_packet.h" %}

Is it possible to get a Linux coredump that only contains callstack, threads, and local variables?

邮差的信 提交于 2019-12-07 01:04:33
My company is utilizing the coredump functionality in Linux (CentOS specifically) to track down some hard to find issues. Unfortunately, we have a bunch of small VMs running with limited HD space and the full core dumps are causing issues because of the large amount of space taken up by the heaps. Is it possible to just have Linux dump the callstack, threads and local variables when a segmentation fault occurs? I tried just limiting the dumps to 50 megs, but it doesn't seem like all the desired details are in that first 50 megabytes (ulimit -c 51200). We're okay truncating the heap like that,