segmentation-fault

python ImageTk.PhotoImage - segfault

天涯浪子 提交于 2019-12-03 11:36:58
I am trying to run the following command on a Mac 10.6.8: Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul 27 2011, 14:50:45) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin import Image import ImageTk from Tkinter import Tk window = Tk() i = Image.open("file.jpg") photo = ImageTk.PhotoImage(i) Segmentation fault I've seen others have had a bus error in this situation. Does anyone know of a bug here or a way round it? I couldn't understand whether http://infohost.nmt.edu/tcc/help/pubs/pil/image-tk.html was relevant. Thanks! I'm sorry to say the same thing happens even after upgrading EPD: Python

How to diagnose these PHP-Code-Coverage segmentation and zend_mm_heap corrupted errors

岁酱吖の 提交于 2019-12-03 09:32:19
问题 I have been happily coding away on my Ubuntu machine. It's a beefy machine with plenty of RAM. I was working on 4 new classes, writing and running unit tests as I go. At some point I noticed that, while the unit tests were completing fine, code coverage was not. After the message "Generating code coverage report...etc.." I would get a message saying zend_mm_heap corrupted. I tried a few fixes including: setting output_buffering = On in my php.ini (both apache2 and cli), and removing calls to

Segmentation fault while redirecting sys.stdout to Tkinter.Text widget

£可爱£侵袭症+ 提交于 2019-12-03 09:06:12
I'm in the process of building a GUI-based application with Python/Tkinter that builds on top of the existing Python bdb module. In this application, I want to silence all stdout/stderr from the console and redirect it to my GUI. To accomplish this purpose, I've written a specialized Tkinter.Text object (code at the end of the post). The basic idea is that when something is written to sys.stdout, it shows up as a line in the "Text" with the color black. If something is written to sys.stderr, it shows up as a line in the "Text" with the color red. As soon as something is written, the Text

LibCds: Michael Hashmap and Split Order List

醉酒当歌 提交于 2019-12-03 08:30:07
I am using libcds and they have an implementation of Michael Hash Map and Split order list. Based on the information I gathered from the doc here is how I implemented them: includes: #include <cds/map/michael_hash_map.h> #include <cds/map/split_ordered_list.h> using namespace cds; Code: class TestDs { public: virtual bool containsKey(int key)=0; virtual int get(int key)=0; virtual int put(int key, int value)=0; virtual int remove(int key)=0; virtual int size()=0; virtual const char* name()=0; virtual void print()=0; virtual void shutdown()=0; }; Code: class Michael: public TestDs{ private: cds

Weird SIGSEGV segmentation fault in std::string::assign() method from libstdc++.so.6

≯℡__Kan透↙ 提交于 2019-12-03 08:00:36
问题 My program recently encountered a weird segfault when running. I want to know if somebody had met this error before and how it could be fixed. Here is more info: Basic info: CentOS 5.2, kernal version is 2.6.18 g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50) CPU: Intel x86 family libstdc++.so.6.0.8 My program will start multiple threads to process data. The segfault occurred in one of the threads. Though it's a multi-thread program, the segfault seemed to occur on a local std::string object. I'll

Linux: How to debug a SIGSEGV? How do I trace the error source?

心已入冬 提交于 2019-12-03 07:11:32
My firefox started crashing since today. I haven't changed anything on the system or on firefox config. I use strace -ff -o dumpfile.txt firefox to trace the problem. It's not a big help. I see the segfault, in two of the generated process dumps, but how I can trace them to their cause? After running for 10 seconds and crashing, 22MB of data is generated by strace. This is a snippet of the output, where you can see actual SIGSEGV in the middle.: read(19, "\372", 1) = 1 gettimeofday({1245590019, 542231}, NULL) = 0 read(3, "\6\0[Qmy\26\0\3\1\0\0Y\0\200\2\0\0\0\0\323\3A\0\323\3(\0\20\0\1\0", 4096

easiest way to debug crash in native library, linked by Android app?

断了今生、忘了曾经 提交于 2019-12-03 06:59:06
I have ported and created several low-level C-libraries to Android for my use in my application. I cross-compiled them using the NDK, and then link to them using System.loadLibrary(). After some amount of time, my application crashes, seemingly due to a bug in the library: 07-28 11:31:21.675: INFO/DEBUG(2880): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 07-28 11:31:21.675: INFO/DEBUG(2880): Build fingerprint: 'verizon/voles/sholes/sholes:2.2.2/FRG83G/91102:user/release-keys' 07-28 11:31:21.675: INFO/DEBUG(2880): pid: 2893, tid: 2894 >>> com.gnychis.coexisyst <<< 07-28 11:31

“Unexplainable” core dump

旧城冷巷雨未停 提交于 2019-12-03 06:41:13
问题 I've seen many core dumps in my life, but this one has me stumped. Context: multi-threaded Linux/x86_64 program running on a cluster of AMD Barcelona CPUs the code that crashes is executed a lot running 1000 instances of the program (the exact same optimized binary) under load produces 1-2 crashes per hour the crashes happen on different machines (but the machines themselves are pretty identical) the crashes all look the same (same exact address, same call stack) Here are the details of the

segmentation fault 11 in C++ on Mac

家住魔仙堡 提交于 2019-12-03 06:29:15
When I try to run this int N=10000000; short res[N]; I get segmentation fault 11 when I change to int N=1000000; short res[N]; it works fine You've exceeded your stack space given by the OS. If you need more memory, the easiest way is to allocate it dynamically: int N=1000000; short* res = new short[N]; However, std::vector is preferred in this context, because the above requires you to free the memory by hand. int N = 1000000; std::vector<short> res (N); If you can use C++11, you can possibly save some fraction of time by using unique_ptr array specialization, too: std::unique_ptr<short[]>

segfault during __cxa_allocate_exception in SWIG wrapped library

夙愿已清 提交于 2019-12-03 05:36:52
While developing a SWIG wrapped C++ library for Ruby, we came across an unexplained crash during exception handling inside the C++ code. I'm not sure of the specific circumstances to recreate the issue, but it happened first during a call to std::uncaught_exception , then after a some code changes, moved to __cxa_allocate_exception during exception construction. Neither GDB nor valgrind provided any insight into the cause of the crash. I've found several references to similar problems, including: http://wiki.fifengine.de/Segfault_in_cxa_allocate_exception http://forums.fifengine.de/index.php