Search Results

Search found 926 results on 38 pages for 'crashing'.

Page 11/38 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why is this attempt at a binary search crashing?

    - by Ian Campbell
    I am fairly new to the concept of a binary search, and am trying to write a program that does this in Java for personal practice. I understand the concept of this well, but my code is not working. There is a run-time exception happening in my code that just caused Eclipse, and then my computer, to crash... there are no compile-time errors here though. Here is what I have so far: public class BinarySearch { // instance variables int[] arr; int iterations; // constructor public BinarySearch(int[] arr) { this.arr = arr; iterations = 0; } // instance method public int findTarget(int targ, int[] sorted) { int firstIndex = 1; int lastIndex = sorted.length; int middleIndex = (firstIndex + lastIndex) / 2; int result = sorted[middleIndex - 1]; while(result != targ) { if(result > targ) { firstIndex = middleIndex + 1; middleIndex = (firstIndex + lastIndex) / 2; result = sorted[middleIndex - 1]; iterations++; } else { lastIndex = middleIndex + 1; middleIndex = (firstIndex + lastIndex) / 2; result = sorted[middleIndex - 1]; iterations++; } } return result; } // main method public static void main(String[] args) { int[] sortedArr = new int[] { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29 }; BinarySearch obj = new BinarySearch(sortedArr); int target = sortedArr[8]; int result = obj.findTarget(target, sortedArr); System.out.println("The original target was -- " + target + ".\n" + "The result found was -- " + result + ".\n" + "This took " + obj.iterations + " iterations to find."); } // end of main method } // end of class BinarySearch

    Read the article

  • How can I fix my program from crashing in C++?

    - by Rachel
    I'm very new to programming and I am trying to write a program that adds and subtracts polynomials. My program sometimes works, but most of the time, it randomly crashes and I have no idea why. It's very buggy and has other problems I'm trying to fix, but I am unable to really get any further coding done since it crashes. I'm completely new here but any help would be greatly appreciated. Here's the code: #include <iostream> #include <cstdlib> using namespace std; int getChoice(void); class Polynomial10 { private: double* coef; int degreePoly; public: Polynomial10(int max); //Constructor for a new Polynomial10 int getDegree(){return degreePoly;}; void print(); //Print the polynomial in standard form void read(); //Read a polynomial from the user void add(const Polynomial10& pol); //Add a polynomial void multc(double factor); //Multiply the poly by scalar void subtract(const Polynomial10& pol); //Subtract polynom }; void Polynomial10::read() { cout << "Enter degree of a polynom between 1 and 10 : "; cin >> degreePoly; cout << "Enter space separated coefficients starting from highest degree" << endl; for (int i = 0; i <= degreePoly; i++) { cin >> coef[i]; } } void Polynomial10::print() { for(int i=0;i<=degreePoly;i++) { if(coef[i] == 0) { cout << ""; } else if(i>=0) { if(coef[i] > 0 && i!=0) { cout<<"+"; } if((coef[i] != 1 && coef[i] != -1) || i == degreePoly) { cout << coef[i]; } if((coef[i] != 1 && coef[i] != -1) && i!=degreePoly ) { cout << "*"; } if (i != degreePoly && coef[i] == -1) { cout << "-"; } if(i != degreePoly) { cout << "x"; } if ((degreePoly - i) != 1 && i != degreePoly) { cout << "^"; cout << degreePoly-i; } } } } void Polynomial10::add(const Polynomial10& pol) { for(int i = 0; i<degreePoly; i++) { int degree = degreePoly; coef[degreePoly-i] += pol.coef[degreePoly-(i+1)]; } } void Polynomial10::subtract(const Polynomial10& pol) { for(int i = 0; i<degreePoly; i++) { coef[degreePoly-i] -= pol.coef[degreePoly-(i+1)]; } } void Polynomial10::multc(double factor) { //int degreePoly=0; //double coef[degreePoly]; cout << "Enter the scalar multiplier : "; cin >> factor; for(int i = 0; i<degreePoly; i++) { coef[i] *= factor; } }; Polynomial10::Polynomial10(int max) { degreePoly=max; coef = new double[degreePoly]; for(int i; i<degreePoly; i++) { coef[i] = 0; } } int main() { int choice; Polynomial10 p1(1),p2(1); cout << endl << "CGS 2421: The Polynomial10 Class" << endl << endl << endl; cout << "0. Quit\n" << "1. Enter polynomial\n" << "2. Print polynomial\n" << "3. Add another polynomial\n" << "4. Subtract another polynomial\n" << "5. Multiply by scalar\n\n"; int choiceFirst = getChoice(); if (choiceFirst != 1) { cout << "Enter a Polynomial first!"; } if (choiceFirst == 1) {choiceFirst = choice;} while(choice != 0) { switch(choice) { case 0: return 0; case 1: p1.read(); break; case 2: p1.print(); break; case 3: p2.read(); p1.add(p2); cout << "Updated Polynomial: "; p1.print(); break; case 4: p2.read(); p1.subtract(p2); cout << "Updated Polynomial: "; p1.print(); break; case 5: p1.multc(10); cout << "Updated Polynomial: "; p1.print(); break; } choice = getChoice(); } return 0; } int getChoice(void) { int c; cout << "\nEnter your choice : "; cin >> c; return c; }

    Read the article

  • Trying to calculate large numbers in Python with gmpy. Python keeps crashing?

    - by Ryan Peschel
    I was recommended to use gmpy to assist with calculating large numbers efficiently. Before I was just using python and my script ran for a day or two and then ran out of memory (not sure how that happened because my program's memory usage should basically be constant throughout.. maybe a memory leak?) Anyways, I keep getting this weird error after running my program for a couple seconds: mp_allocate< 545275904->545275904 > Fatal Python error: mp_allocate failure This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Also, python crashes and Windows 7 gives me the generic python.exe has stopped working dialog. This wasn't happening with using standard python integers. Now that I switch to gmpy I am getting this error just seconds in to running my script. I thought gmpy was specialized in dealing with large number arithmetic? For reference, here is a sample program that produces the error: import gmpy2 p = gmpy2.xmpz(3000000000) s = gmpy2.xmpz(2) M = s**p for x in range(p): s = (s * s) % M I have 10 gigs of RAM and without gmpy this script ran for days without running out of memory (still not sure how that happened considering s never really gets larger.. Anyone have any ideas? EDIT: Forgot to mention I am using Python 3.2

    Read the article

  • How can I test potentially browser crashing javascript without having to restart my browser?

    - by yaya3
    I've been having a crack at some of the problems over at http://projecteuler.net/ with JavaScript. I've been using a simple html page and running my code in script tags so I can log my results in the browsers' console. When experimenting with loops I sometimes cause the browser to crash. Is there a better environment for me to do this kind of development in, or anything I can do to allow me to carry on testing in the browser?

    Read the article

  • Why might my Xcode be crashing (or at least displaying an error on launch)?

    - by dsobol
    I am getting an error thrown when I launch my Xcode 3.2 all of a sudden: Uncaught Exception: * -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0] I can click through the error and Xcode seems to launch properly. I removed and reinstalled Xcode to no avail, and yet cannot find a config or perference that might be the culprit. I am running on 10.6.3 fwiw.... Has anyone else run into this problkem? TIA! Regards, Steve O'Sullivan

    Read the article

  • Qt application crashing immediately without debugging info. How do I track down the problem?

    - by jjacksonRIAB
    I run an Qt app I've built: ./App Segmentation fault I run it with strace: strace ./App execve("./App", ["./App"], [/* 27 vars */]) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Process 868 detached Again, no useful info. I run it with gdb: (gdb) run Starting program: /root/test/App Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 Program received signal SIGSEGV, Segmentation fault. 0x00000001 in ?? () Again, nothing. I run it with valgrind: ==948== Process terminating with default action of signal 11 (SIGSEGV) ==948== Bad permissions for mapped region at address 0x0 ==948== at 0x1: (within /root/test/App) Even if I put in debugging symbols, it doesn't give any more useful info. ldd shows all libraries being linked properly. Is there any other way I can find out what's wrong? I can't even do standard printf, cout, etc debugging. The executable doesn't even seem to start running at all. I rebuilt with symbols, and tried the suggestion below (gdb) break main Breakpoint 1 at 0x45470 (gdb) run Starting program: /root/test/App Breakpoint 1 at 0x80045470 Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0xffffe000 Program received signal SIGSEGV, Segmentation fault. 0x00000001 in ?? () I checked for static initializers and I don't seem to have any. Yep, I tried printf, cout, etc. It doesn't even make it into the main routine, so I'm looking for problems with static initializers in link libraries, adding them in one-by-one. I'm not getting any stack traces either.

    Read the article

  • Facebook android app keeps crashing even though there are no errors in my code. Why?

    - by user1554479
    If you import the facebook SDK library, the code works (ignore the deprecated methods for now lol) and there are no errors or warnings. However, when I run my facebook app on my Android 2.2 or 4.2 emulator, the app crashes either upon opening or after the log on screen. Why? Is it because I'm not implementing Async Task? If so, how does that work? Here's my code: package com.sara.facebookappl; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Bundle; import android.os.StrictMode; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.facebook.android.DialogError; import com.facebook.android.Facebook; import com.facebook.android.Facebook.DialogListener; import com.facebook.android.FacebookError; import com.facebook.android.Util; public class MainActivity extends Activity implements OnClickListener, DialogListener { Facebook fb; ImageView button; SharedPreferences sp; TextView welcome; Button post; @SuppressWarnings("deprecation") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); post=(Button)findViewById(R.id.button1); String APP_ID = getString(R.string.APP_ID); fb= new Facebook(APP_ID); sp =getPreferences(MODE_PRIVATE); String access_token=sp.getString("access_token", null); long expires=sp.getLong("access_expires", 0); if (access_token !=null) { fb.setAccessToken(access_token); } if(expires !=0) { fb.setAccessExpires(expires); } button=(ImageView)findViewById(R.id.login); button.setOnClickListener((OnClickListener) this); updateButtonImage(); } @SuppressWarnings("deprecation") private void updateButtonImage() { // TODO Auto-generated method stub post.setVisibility(Button.VISIBLE); button.setImageResource(R.drawable.com_facebook_loginbutton_blue); //logout button if (fb.isSessionValid()) { button.setImageResource(R.drawable.com_facebook_loginbutton_blue); // ^logout button JSONObject obj=null; URL img_url =null; try { String jsonUser= fb.request("me"); obj = Util.parseJson(jsonUser); String id=obj.optString("id"); String name = obj.optString("name"); welcome.setText("Welcome, " + name); }catch(FacebookError e) { e.printStackTrace(); }catch (JSONException e) { e.printStackTrace(); }catch (MalformedURLException e) { e.printStackTrace(); }catch (IOException e) { e.printStackTrace(); } }else { post.setVisibility(Button.VISIBLE); button.setImageResource(R.drawable.com_facebook_loginbutton_blue); } } @SuppressWarnings("deprecation") public void buttonClicks(View v) { switch (v.getId()) { case R.id.button1: //post Bundle params= new Bundle(); params.putString("name", "User X"); params.putString("caption", "Rating"); params.putString("description", "User X Rated"); params.putString("link", "http://..."); fb.dialog(MainActivity.this, "feed", params, new Facebook.DialogListener() { @Override public void onFacebookError(FacebookError e) { // TODO Auto-generated method stub } @Override public void onError(DialogError e) { // TODO Auto-generated method stub } @Override public void onComplete(Bundle values) { // TODO Auto-generated method stub } @Override public void onCancel() { // TODO Auto-generated method stub } }); break; } } @SuppressWarnings("deprecation") public void onClick(View v) { if(fb.isSessionValid()) { try { fb.logout(getApplicationContext()); updateButtonImage(); //button will close our our session }catch(MalformedURLException e) { e.printStackTrace(); } catch(IOException e) { e.printStackTrace(); } }else{ //login into facebook fb.authorize(MainActivity.this, new String[] {"email"}, new Facebook.DialogListener() { @Override public void onFacebookError(FacebookError e) { // TODO Auto-generated method stub Toast.makeText(MainActivity.this, "fbError", Toast.LENGTH_SHORT).show(); } @Override public void onError(DialogError e) { // TODO Auto-generated method stub Toast.makeText(MainActivity.this, "onError", Toast.LENGTH_SHORT).show(); } @Override public void onComplete(Bundle values) { // TODO Auto-generated method stub Editor editor=sp.edit(); editor.putString("access_token", fb.getAccessToken()); editor.putLong("access_expires", fb.getAccessExpires()); editor.commit(); updateButtonImage(); } @Override public void onCancel() { // TODO Auto-generated method stub Toast.makeText(MainActivity.this, "onCancel", Toast.LENGTH_SHORT).show(); } }); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main, menu); return true; } @SuppressWarnings("deprecation") @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); fb.authorizeCallback(requestCode, resultCode, data); } @Override public void onComplete(Bundle values) { // TODO Auto-generated method stub } @Override public void onFacebookError(FacebookError e) { // TODO Auto-generated method stub } @Override public void onError(DialogError e) { // TODO Auto-generated method stub } @Override public void onCancel() { // TODO Auto-generated method stub } } LogCat Errors: 12-16 04:56:59.070: E/AndroidRuntime(822): FATAL EXCEPTION: main 12-16 04:56:59.070: E/AndroidRuntime(822): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sara.facebookappl/com.sara.facebookappl.MainActivity}: android.os.NetworkOnMainThreadException 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.ActivityThread.access$600(ActivityThread.java:141) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.os.Handler.dispatchMessage(Handler.java:99) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.os.Looper.loop(Looper.java:137) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.ActivityThread.main(ActivityThread.java:5039) 12-16 04:56:59.070: E/AndroidRuntime(822): at java.lang.reflect.Method.invokeNative(Native Method) 12-16 04:56:59.070: E/AndroidRuntime(822): at java.lang.reflect.Method.invoke(Method.java:511) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 12-16 04:56:59.070: E/AndroidRuntime(822): at dalvik.system.NativeStart.main(Native Method) 12-16 04:56:59.070: E/AndroidRuntime(822): Caused by: android.os.NetworkOnMainThreadException 12-16 04:56:59.070: E/AndroidRuntime(822): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117) 12-16 04:56:59.070: E/AndroidRuntime(822): at java.net.InetAddress.lookupHostByName(InetAddress.java:385) 12-16 04:56:59.070: E/AndroidRuntime(822): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236) 12-16 04:56:59.070: E/AndroidRuntime(822): at java.net.InetAddress.getAllByName(InetAddress.java:214) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpConnection.(HttpConnection.java:70) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpConnection.(HttpConnection.java:50) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:316) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:461) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:282) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177) 12-16 04:56:59.070: E/AndroidRuntime(822): at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.facebook.android.Util.openUrl(Util.java:219) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.facebook.android.Facebook.requestImpl(Facebook.java:806) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.facebook.android.Facebook.request(Facebook.java:732) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.sara.facebookappl.MainActivity.updateButtonImage(MainActivity.java:83) 12-16 04:56:59.070: E/AndroidRuntime(822): at com.sara.facebookappl.MainActivity.onCreate(MainActivity.java:63) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.Activity.performCreate(Activity.java:5104) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 12-16 04:56:59.070: E/AndroidRuntime(822): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 12-16 04:56:59.070: E/AndroidRuntime(822): ... 11 more 12-16 04:56:59.090: D/dalvikvm(822): GC_CONCURRENT freed 150K, 9% free 2723K/2988K, paused 7ms+58ms, total 239ms

    Read the article

  • What can cause a spontaneous EPIPE error without either end calling close() or crashing?

    - by Hongli
    I have an application that consists of two processes (let's call them A and B), connected to each other through Unix domain sockets. Most of the time it works fine, but some users report the following behavior: A sends a request to B. This works. A now starts reading the reply from B. B sends a reply to A. The corresponding write() call returns an EPIPE error, and as a result B close() the socket. However, A did not close() the socket, nor did it crash. A's read() call returns 0, indicating end-of-file. A thinks that B prematurely closed the connection. Users have also reported variations of this behavior, e.g.: A sends a request to B. This works partially, but before the entire request is sent A's write() call returns EPIPE, and as a result A close() the socket. However B did not close() the socket, nor did it crash. B reads a partial request and then suddenly gets an EOF. The problem is I cannot reproduce this behavior locally at all. I've tried OS X and Linux. The users are on a variety of systems, mostly OS X and Linux. Things that I've already tried and considered: Double close() bugs (close() is called twice on the same file descriptor): probably not as that would result in EBADF errors, but I haven't seen them. Increasing the maximum file descriptor limit. One user reported that this worked for him, the rest reported that it did not. What else can possibly cause behavior like this? I know for certain that neither A nor B close() the socket prematurely, and I know for certain that neither of them have crashed because both A and B were able to report the error. It is as if the kernel suddenly decided to pull the plug from the socket for some reason.

    Read the article

  • File.Copy with opened stream not crashing. Know why?

    - by Carlo
    I have this code, I open a stream (without closing or disposing it), then I copy the file used by the stream, I thought I should get a "Process can't access file somefile.xml because it's being used by another process" exception, but I don't. Any idea why? Thanks! The code: StreamWriter writer = new StreamWriter("C:\\somefile.xml"); writer.Write(string.Empty); // I thought this should crash since a stream is using "C:\somefile.xml" File.Copy("C:\\somefile.xml", "C:\\copy of somefile.xml", true);

    Read the article

  • help('modules') crashing? Not sure how to fix..

    - by Chris
    I was trying to install a module for opencv and added an opencv.pth file to the folder beyond my sites.py file. I have since deleted it and no change. When I try to run help('modules'), I get the following error: Please wait a moment while I gather a list of all available modules... /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted/words/im/init.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future. warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.") /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py:110: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible. import(name) Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py", line 348, in call return pydoc.help(*args, **kwds) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1644, in call self.help(request) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1681, in help elif request == 'modules': self.listmodules() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1802, in listmodules ModuleScanner().run(callback) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", line 1853, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py", line 110, in walk_packages import(name) File "/BinaryCache/wxWidgets/wxWidgets-11~262/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wxaddons/init.py", line 180, in import_hook File "/Library/Python/2.5/site-packages/ctypes_opencv/init.py", line 19, in from ctypes_opencv.cv import * File "/BinaryCache/wxWidgets/wxWidgets-11~262/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wxaddons/init.py", line 180, in import_hook File "/Library/Python/2.5/site-packages/ctypes_opencv/cv.py", line 2567, in ('desc', CvMat_r, 1), # CvMat* desc File "/Library/Python/2.5/site-packages/ctypes_opencv/cxcore.py", line 114, in cfunc return CFUNCTYPE(result, *atypes)((name, dll), tuple(aflags)) AttributeError: dlsym(0x2674d10, cvCreateFeatureTree): symbol not found What gives?!

    Read the article

  • C++ Beginner - Simple block of code crashing, reason unknown.

    - by Francisco P.
    Hello everyone, Here's a block of code I'm having trouble with. string Game::tradeRandomPieces(Player & player) { string hand = player.getHand(); string piecesRemoved; size_t index; for (size_t numberOfPiecesToTrade = rand() % hand.size() + 1; numberOfPiecesToTrade != 0; --numberOfPiecesToTrade) { index = rand() % hand.size(); piecesRemoved += hand[index]; hand.erase(index,1); } player.removePiecesFromHand(piecesRemoved); player.fillHand(_deck); return piecesRemoved; } I believe the code is pretty self explanatory. fillhand and removepiecesfromhand are working fine, so that's not it. I really can't get what's wrong with this :( Thanks for your time

    Read the article

  • After upgrading to 12.04 lts server, the mouse is intermittently working

    - by Jason
    After this upgrade, I've had a problem with the mouse intermittently working and programs crashing (like zentyal crashing and the error reporting application crashing) I also had an error on the screen that said: "Could not grab your mouse. A malisious client may be eavesdropping on your session or you may have just clicked a menu or some application just decided to get focus. Try again." What's going on with this system? Did I really get malware that quickly? This system has been boxed up since 2011. I only did the upgrade today... In regards to the mouse I can move it around, but when I click on something, it doesn't work.

    Read the article

  • What does the crash mean? And why is my Ubuntu Blackbox is crashing how can i check deeply?

    - by YumYumYum
    My system was running for a while amount of 6 hour. Two times i loss remote access and it was not functioning anymore IP is gone etc etc. 3 time showing crash but i have no idea what and why. How to know what went wrong? $ last sun pts/0 d51a429c9.access Mon Mar 19 13:44 still logged in sun tty7 :0 Mon Mar 19 12:17 still logged in reboot system boot 2.6.38-8-generic Mon Mar 19 12:17 - 13:49 (01:31) sun pts/0 d51a429c9.access Mon Mar 19 10:05 - crash (02:12) sun tty7 :0 Mon Mar 19 10:00 - crash (02:16) reboot system boot 2.6.38-8-generic Mon Mar 19 10:00 - 13:49 (03:48) sun pts/0 d51a429c9.access Mon Mar 19 09:24 - down (00:35) sun tty7 :0 Mon Mar 19 09:20 - down (00:39) reboot system boot 2.6.38-8-generic Mon Mar 19 09:20 - 10:00 (00:39) sun pts/2 d51a429c9.access Sun Mar 18 18:04 - down (01:14) sun pts/1 d51a429c9.access Sun Mar 18 17:43 - down (01:35) sun pts/0 d51a429c9.access Sun Mar 18 15:07 - 18:47 (03:40) sun pts/1 d51a429c9.access Sun Mar 18 12:58 - 17:42 (04:43) sun pts/0 d51a429c9.access Sun Mar 18 10:21 - 15:06 (04:44) sun tty7 :0 Sun Mar 18 08:56 - down (10:22) reboot system boot 2.6.38-8-generic Sun Mar 18 08:56 - 19:19 (10:22) sun tty7 :0 Sat Mar 17 18:03 - down (14:51) reboot system boot 2.6.38-8-generic Sat Mar 17 18:03 - 08:55 (14:51) sun tty7 :0 Sat Mar 17 15:00 - down (01:38) reboot system boot 2.6.38-8-generic Sat Mar 17 15:00 - 16:39 (01:38) sun pts/0 d51a4297d.access Sat Mar 17 10:45 - 14:32 (03:46) sun tty7 :0 Fri Mar 16 18:46 - crash (20:14) reboot system boot 2.6.38-8-generic Fri Mar 16 18:46 - 16:39 (21:53) $ sensors acpitz-virtual-0 Adapter: Virtual device temp1: +27.8°C (crit = +100.0°C) temp2: +29.8°C (crit = +100.0°C)

    Read the article

  • Google Chrome (not chromium) is crashing XFCE on startup. Where can I find some detailed logs of the issue?

    - by MALON
    I'm using xubuntu 12.10 and every time I open Chrome, the desktop enviro crashes then automatically restarts, prompting me to log in again. This is the latest x86 .deb downloaded from Chrome's website. I've tried both installing the .deb using the software package manager and using sudo dpkg -i, same issue for both, except that the package manager puts out an alert that says "This package is of bad quality", but doing a quick google search reveals that particular message is a bug in Chrome and it's safe to ignore.

    Read the article

  • What is the correct install process to setup Node.js with Windows Azure Emulator

    - by PazoozaTest Pazman
    This question is related to this question: Node.js running under IIS Express Keeps Crashing to which I need help with reinstalling and getting node.js up and running in windows emulator working. Hello I am reinstalling my machine: Toshiha Laptop 2 GB Ram 32 bit processor What is the correct procedure from start to finish to get node.js development working, so far nothing has worked and the emulator (IIS Express) worker processor keeps crashing. No matter how many instances they all end up crashing. Up until two weeks ago my node development was working fine, but I had to do a reinstall, and since then I haven't been doing any node.js development on windows emulator because the latest June 2012 Azure SDK for Node.js is buggy. These are the steps I have taken: 1) Reformat HD 2) Insert Windows 7 N SP1 CD 3) Reboot machine into CD installation 4) Follow and wait until Windows 7 installed 5) Run Add/Remove programs + enable IIS + IIS management tools 6) Run Windows Update (installed about 53 updates) 7) Go here http://www.windowsazure.com/en-us/develop/nodejs/ 8) Click Windows Installer June 2012 and install Windows Azure SDK for Node.js - June 2012 9) Run Azure Powershell 10) Navigate to c:\node\testSite\webrole1 11) launch site: start-azureemulator -launch 12) Play around on website (then crash!) Problem signature: Problem Event Name: APPCRASH Application Name: iisexpress.exe Application Version: 8.0.8298.0 Application Timestamp: 4f620349 Fault Module Name: iiscore.dll Fault Module Version: 8.0.8298.0 Fault Module Timestamp: 4f63b65c Exception Code: c0000005 Exception Offset: 00021767 OS Version: 6.1.7601.2.1.0.256.28 Locale ID: 1033 Additional Information 1: f66d Additional Information 2: f66d807b515d6b2dc6f28f66db769a01 Additional Information 3: 7b2f Additional Information 4: 7b2f6797d07ebc2c23f2b227e779722e Am I missing a step in my resintall process? Do I have all the required files to do node.js windows azure emulator development? Why is IIS Express crashing all the time? Can I still do node.js windows azure emulator development without using IIS Express and use my local Windows 7 N (SP1) IIS 7.x that comes shipped?

    Read the article

  • Why onCreate() calling multiple times when i use Thread()?

    - by RajaReddy PolamReddy
    In my app i faced a problem with threads. i am using native code in my app. i try to load library and then calling native functions from the android code. 1. By using Threads() : PjsuaThread pjsuaThread = new PjsuaThread(); pjsuaThread.start(); thread code class PjsuaThread extends Thread { public void run() { if (pjsua_app.initApp() != 0) { // native function calling return; } else { } pjsua_app.startPjsua(ApjsuaActivity.CFG_FNAME); // native function calling finished = true; } When i use code like this, onCreate() function calling multiple times and able to load library and calling some functions properly, after some seconds onCreate calling again because of that it's crashing. 2. Using AsyncTask(): And also i used AsyncTask< for this requirement, it's crashing the application( crashing in lib code ). not able to open any functions class SipTask extends AsyncTask<Void, String, Void> { protected Void doInBackground(Void... args) { if (pjsua_app.initApp() != 0) { return null; } else { } pjsua_app.startPjsua(ApjsuaActivity.CFG_FNAME); finished = true; return null; } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); Log.i(TAG, "On POst "); } } What is annoying is that in most cases it is not the missing library, it's tried to able to load the lib crashing in between. any one know the reason ?

    Read the article

  • How do I recover from upgrading while using bad version of gcc/binutils?

    - by Shawn J. Goff
    I upgraded from 9.04 to 10.10 a couple of days ago, and things are really messed up - X is crashing constantly. Since then, I had an application segfault for no reason, when I was debugging, I found that it was strlen() that was causing the segfault (pointing to libc being the problem)! Upon investigation, I found that it was because I had a bad version of gcc and binutils installed in /usr/bin/local; I removed it, recompiled the application, and it no longer crashes. Now, looking at my logs, I see that X is also crashing due to libc. Backtrace: 0: /usr/bin/X11/X (xorg_backtrace+0x3b) [0x80ef31b] 1: /usr/bin/X11/X (0x8048000+0x5d00d) [0x80a500d] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xb77e240c] 3: /usr/bin/X11/X (0x8048000+0xbb0b6) [0x81030b6] 4: /usr/bin/X11/X (0x8048000+0xbc3ef) [0x81043ef] 5: /usr/bin/X11/X (0x8048000+0x26ee7) [0x806eee7] 6: /usr/bin/X11/X (0x8048000+0x1a5da) [0x80625da] 7: /lib/libc.so.6 (__libc_start_main+0xe7) [0xb750ace7] 8: /usr/bin/X11/X (0x8048000+0x1a1b1) [0x80621b1] Segmentation fault at address 0x32156654 Caught signal 11 (Segmentation fault). Server aborting So, how can I recover from this?

    Read the article

  • How can I restart compiz from tty? (& Related, how can I set up a fallback WM?)

    - by Jon
    So I'm testing Natty, and Compiz keeps crashing on me. I expect this sort of thing from alpha software, of course, but it doesn't always give me the option to restart compiz, and for some reason doesn't have a fallback WM configured. Without a window manager, all my programs are still running, but they're not accepting input from the keyboard, and I can't switch between them. I can, however, press Ctrl+Alt+F1 and get a terminal, and I can killall Xorg to reset everything, but I'd rather just reset compiz if possible. If I try typing compiz --replace there in the tty, it complains "fatal--couldn't open display." Is there a way to have tty1 restart compiz? Like compiz --replace --display=something? Additionally, is there a way to configure a fallback window manager so that there's an easier way to recover from compiz crashing?

    Read the article

  • Call functions in AutoIt DLL using Python ctypes

    - by Josh
    I want to call functions from an AutoIt dll, that I found at C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll using Python. I know I could use win32com.client.Dispatch("AutoItX3.Control") but I can't install the application or register anything in the system. So far, this is where I am: from ctypes import * path = r"C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll" autoit = windll.LoadLibrary(path) Here are the methods that works: autoit.AU3_WinMinimizeAll() # windows were successfully minimized. autoit.AU3_Sleep(1000) # sleeps 1 sec. Here is my problem, python is crashing when I call other methods like this one. I get python.exe has stopped working from windows... autoit.AU3_WinGetHandle('Untitled - Notepad', '') And some other methods are not crashing python but are just not working. This one doesn't close the window and return 0: autoit.AU3_WinClose('Untitled - Notepad', '') And this other one return 1 but the window is still minimized: autoit.AU3_WinActivate('Untitled - Notepad', '') I've tested the examples with with Dispatch("AutoItX3.Control") and everything is working like expected. It seems like methods that should return something other than a string are crashing python. But still, others like WinClose are not even working... Thank you in advance for your help! EDIT: These methods are now working when using unicode strings: autoit.AU3_WinClose(u'Untitled - Notepad', u'') autoit.AU3_WinActivate(u'Untitled - Notepad', u'') And I found the prototype for AU3_WinGetHandle: AU3_API void WINAPI AU3_WinGetHandle(const char szTitle, /[in,defaultvalue("")]*/const char *szText, char *szRetText, int nBufSize); Now I see that I should get the handle from szRetText but I am not sure how... I tried the following without success: from ctypes.wintypes import LPCWSTR, INT, POINTER AU3_WinGetHandle.argtypes = (LPCWSTR, LPCWSTR, POINTER(LPCWSTR), INT) s = c_wchar_p() print AU3_WinGetHandle(u'Untitled - Notepad', u'', byref(s), 100) # prints 1 print s # prints c_wchar_p(u'') Any idea how to retrive the handle from szRetText?

    Read the article

  • NSFetchedResultsController is driving me crazy

    - by user267980
    Hi everyone. i've been building an app since 1 month using NSFetchedResultsController and i was testing the app on the 3.1.2 SDK. The poblem is that i've been using NSFetchedResultsController everywhere in my app and was working on the 3.1.2 version of the SDK, now my client say that i should make it compatible with the 3.0 version and the deadline is almost there. But is crashing everytime i change an object handled by the contoller, the application is crashing with very weird errors. The problem occure when removing the last object in a section and when a change make an object love to another section. I've been using a sample code from "More iPhone 3 Development Tackling iPhone SDK 3" by Dave Mark and Jeff LaMarche. I've also included some changes from link text Here is a sample output of the console when the application is crashing. * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections. The number of sections contained in the table view after the update (1) must be equal to the number of sections contained in the table view before the update (2), plus or minus the number of sections inserted or deleted (2 inserted, 0 deleted).' 2010-03-14 16:23:29.758 Instaproofs[5879:207] Stack: ( 807902715, 7364425, 807986683, 811271572, 815059090, 815007323, 211023, 4363331, 810589786, 807635429, 810579728, 3620573, 3620227, 3614682, 3609719, 27337, 810595174, 807686849, 807683624, 839142449, 839142646, 814752238 ) If i knew that NSFetchedResultsController is so buggy, i would never used it. So basicaly i need the my NSFetchedResultsControllerDelegate to work fine on the 3.0 and above SDKs. It would be life saver if someone help me figure out what i'm doing wrong.

    Read the article

  • Lubuntu Stability Problems

    - by marinara
    I installed Lubuntu 11.10 from scratch a few days ago, now I can't even run aptitude without crashing from the mess it's made of the package system. (yes I added a non-offical repository, because I needed firefox 8) I'm a new user. So I don't know. Did I make a mistake by loading Lubuntu? I really like the LXDE stuff. but so many things seem very buggy. ***edit I think besides the sound problems, all of my other problems are with either LXDE or with openbox. And I think the sound problem is Lubuntu specific also. Problems like windows not popping up, windows not getting painted. Windows flashing in the panel for no reason, Windows losing their title bar occasionally, mousewheel changing desktops when i'm clearly in a window, LXDE panel not responding to clicks, applications not launching from the menu, applications not launching from firefox downloads window, applications crashing when I don't do anything but click on them. Pretty sure all this stuff is openbox or LXDE. This is just too much work to keep Lubuntu running. It's a lemon. (sorry I realize I should be constructive but I'm tired) It's pretty clear that openbox needs some damn bugfixes for compatibility with Oneric. And LXDE isn't that great either. I expect things to launch when I click on them. I think installing the acpid package is what made it clear to me. If 20 seconds after installing the package (from the offical repo), linux has already crashed, then I'm in the wrong damn neighborhood.

    Read the article

  • Computer crashes and won't start, LED indicator blinks slowly

    - by hexacyanide
    I have a MSI K8NGM2-FID motherboard coupled with a AMD Athlon 3700+ and an Antec TPII-550 power supply. The computer crashes at random times in operation, sometimes taking a while to crash, and sometimes crashing right after Windows XP shows the desktop after boot. The CPU temperature is always in the safe range, usually 30-33 degrees Celsius, and swapping the RAM has not done anything, so the crashes aren't cause by the RAM. What could be causing this? If the motherboard were fried, would the computer even boot at all? What causes inconsistent crashing of the computer? After the computer crashes, the LED power indicator blinks about once a second, and the computer does not respond to the power button. This behavior continues until the computer's power supply is completely removed.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >