runtime-error

Facebook iOS SDK 3.2.1 - [NSError fberrorShouldNotifyUser]: unrecognized selector sent to instance

…衆ロ難τιáo~ 提交于 2019-12-03 16:46:07
问题 I just upgraded my app from Facebook iOS SDK 3.1 to 3.2.1 and I'm trying to take advantage of the new error handling provided by the new FBError category on NSError. The code is at the bottom. It compiles fine, but when a FB error occurs, I get the following at run time: - [NSError fberrorShouldNotifyUser]: unrecognized selector sent to instance This seems like a linker error, where the category is not getting linked in from the the FacebookSDK static library. I tried adding both the -ObjC

Strange values while initializing array using designated initializers

自古美人都是妖i 提交于 2019-12-03 16:30:07
问题 When I initialize the array below all the output looks ok except for values[3] . For some reason values[3] initialized as values[0]+values[5] is outputting a very large number. My guess is that I am trying to assign values[0]+values[5] before they are properly stored in memory but if someone could explain that would be great. int main (void) { int values[10] = { [0]=197,[2]=-100,[5]=350, [3]=values[0] + values[5], [9]= values[5]/10 }; int index; for (index=0; index<10; index++) printf("values

Jenkins - java.lang.OutOfMemoryError: PermGen space -

。_饼干妹妹 提交于 2019-12-03 15:35:42
Environment: Linux/Windows7, Java 1.6.0.03/37 or 1.7 I downloaded jenkins.war and after the initial setup using the following script/command, I downloaded some plugins(10-15) and tried to restart Jenkins, it worked. Then, I got some more plugins (30-40 in total) and either I chose Install or download+then+install, Jenkins didn't come up. i.e. using startJenkins.sh (Linux only). Note: On Windows7 Jenkins started as a Windows service. #!/bin/bash export JAVA_HOME=/production/jenkinsAKS/java/jdk1.6.0_03 export JENKINS_HOME=/production/jenkinsAKS export PATH=${JAVA_HOME}/bin:${PATH} export JENKINS

Pure Virtual Function call from Base Ctor

╄→гoц情女王★ 提交于 2019-12-03 15:16:54
Consider the following sample code: #include <iostream> using namespace std; class base { public: base() { bar(); //Line1 this->bar(); //Line2 base *bptr = this; bptr->bar(); //Line3 ((base*)(this))->bar(); //Line4 } virtual void bar() = 0; }; class derived: base { public: void bar() { cout << "vfunc in derived class\n"; } }; int main() { derived d; } The above code has pure virtual function bar() in base class which is overriden in the derived class. The pure virtual function bar() has no definition in base class. Now focus on Line1 , Line2 , Line3 and Line4 . I understand : Line1 gives

In java, can one create a fluent extensible class hierarchy with methods that can be invoked in any order?

我与影子孤独终老i 提交于 2019-12-03 14:04:42
问题 Can one create an extensible class hierarchy in java whose methods are fluent and can be invoked in any order? (YES! see answer below), even for existing classes when you don't have access to the source, provided the methods are fluant! I'm retrofitting an existing hierarchy and hope to use a factory or at least a generic constructor and (eventually) immutable builder patterns (JB P.14). The methods that set fields return void - it would be better for them to return a generic T instead - that

Pygame2Exe Errors that I can't fix

谁说我不能喝 提交于 2019-12-03 14:00:49
I made a "Game". I love playing it, and I would like to distribute it to my friends without having to install Python and Pygame on their computers. I did a lot of research on Py2Exe and Pyinstaller. I looked through many tutorials, fixes, errors, but none of them seem to help me. Pyinstaller is useless because it doesn't like fonts in Pygame, and Py2exe wouldn't compile the built in modules, so I found Pygame2exe which is just a premade setup script for use with py2exe that includes pygame and fonts. It supposedly builds fine, but the exe is unusable... I get the error: "Microsoft Visual C++

java.lang.RuntimeException : Could not open input channel pair

我是研究僧i 提交于 2019-12-03 11:13:16
问题 I'm testing my application with three phones (running andorid version : 4.1.2 - 4.0.4 - 2.3.6). They exchange data via Bluetooth without problems until this error appears in the logcat and the phone shutdowns completely and restarts. Before this error appears everything works perfectly. Here is the logcat output on the phone that crashes (the one running version 4.1.2): 05-29 12:11:36.887: E/InputTransport(2947): channel '418655a8 Toast' ~ Could not create socket pair. errno=24 05-29 12:11:36

postgresql - integer out of range

江枫思渺然 提交于 2019-12-03 10:51:52
Not the slightest idea why the hell this is happening.. I've set up a table accordingly: CREATE TABLE raw ( id SERIAL, regtime float NOT NULL, time float NOT NULL, source varchar(15), sourceport INTEGER, destination varchar(15), destport INTEGER, blocked boolean ); ... + index and grants I've successfully used this table for a while now, and all of a sudden the following insert doesn't work any longer.. INSERT INTO raw( time, regtime, blocked, destport, sourceport, source, destination ) VALUES ( 1403184512.2283964, 1403184662.118, False, 2, 3, '192.168.0.1', '192.168.0.2' ); The error is:

What causes “irrefutable pattern failed for pattern” and what does it mean?

落花浮王杯 提交于 2019-12-03 09:36:13
What does irrefutable pattern failed for pattern mean? What cases will cause this runtime error? chrisdb Well, I assume it means what it says - that a pattern doesn't match but there is no alternative. This example: But for the program: g x = let Just y = f x in h y GHC reports: Main: M1.hs:9:11-22: Irrefutable pattern failed for pattern Data.Maybe.Just y Indicating the source of the failure. Comes from http://www.haskell.org/haskellwiki/Debugging The point of the example is that if f x returns Nothing then there is no way GHC can assign a value to y . hammar Consider this example: foo ~(Just

Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) Error

限于喜欢 提交于 2019-12-03 08:54:34
This error occurs during run time, and I'm not sure what's causing it - the code looks correct to me. #include <iostream> #include <string> using namespace std; struct Room { int d_noSeat; bool d_hasProjector; Room() = default; Room(const Room& r); }; class Event { Room* d_room; std::string d_name; public: Event(); Event(const Event& e); ~Event(); void set(Room r, const std::string& name); void print(); }; Event::Event() : d_room(0), d_name("") {}; void Event::print() { std::cout << "Event: " << d_name; if (d_room != 0) { std::cout << " in size " << d_room->d_noSeat; if (d_room->d_hasProjector