[Solved] My program crashes and I don’t know why

I assume (It would be better if you post the crash log along with your question, so that we can help you better and stop assuming) you are getting a null pointer exception on the following code: i.putExtra(“temper”, temp.getText().toString()); In your code you declared temp, but it is never initialised. You need to initialise temp … Read more

[Solved] App crashing. Why? [closed]

it cannot find the method corresponding to your button maybe u changed the button or delete it and make it again …write from scratch and this time be careful with the button and its method not to have any conflict! ps. maybe your manifest file is missing something …app crashing is sometimes from there too! … Read more

[Solved] Why does my program crash if I don’t give command line arguments to it? [closed]

It crashes because you are accessing argv[1] which would hold a command line argument (other than the program’s name) if there was one. You should check whether argc is greater than 1. Why greater than 1? Because the first command line argument is the name of the program itself. So argc is always greater than … Read more

[Solved] Android app crashes by switching the activity

Replace R.id.tvFeed with Framelayout’s id or default id android.R.id.content. if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(android.R.id.content, new PlaceholderFragment()) .commit(); } and remove the code from the onOptionsItemSelected() method. if (id == R.id.tvFeed) { return true; } solved Android app crashes by switching the activity

[Solved] understanding ‘lldb’ backtace – app crashes when button is pressed

This is your problem: Foundation`-[NSObject(NSKeyValueCoding) setValue:forKey:] because after this, is raised an Exception: CoreFoundation`-[NSException raise] + 12 You are trying to set a value for a key in your object that could not exists or has some other problem. P.S.: Update your answer with some relevant code so I can update my answer with more … Read more

[Solved] “Unfortunately MyApp has stopped” when I Press A Button [duplicate]

You have not casted the image buttons correctly. Use this in onCreate() baslat = (ImageButton)findViewById(R.id.baslatButonu); ayarlar =(ImageButton) findViewById(R.id.ayarlarButonu); And Declare this activity in manifest <activity android:name=”.Ayarlar”> From the logcat **java.lang.RuntimeException: Font asset not found fonts/Bariol_Regular.otf** Add this font file also Bariol_Regular.otf Check this link please How to use custom font in Android Studio 9 solved … Read more

[Solved] My program is crahing, and honestly i am confused (c++)

Not likely to be your crash, but this code is terrible: if (fnameFile.is_open()) { while (fnameFile.eof() == false) { plFname.resize(numFnames); getline(fnameFile,line); numFnames += 1; } fnameFile.close(); } It doesn’t check for end of file correctly, because end of file happens during getline, not before. And the line variable goes nowhere. Try while (getline(fnameFile,line)) plFnames.push_back(line); fnameFile.close(); … Read more

[Solved] What is wrong with this code? App should get the location

The javadoc for onCreate(savedInstanceState) states: savedInstanceState Bundle: If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in onSaveInstanceState(Bundle). Note: Otherwise it is null. You are getting an NPE when you call savedInstanceState.getString, with a message that tells you that savedInstanceState. Solution: modify your … Read more

[Solved] Xcode iPhone app runs and crashes immediately

Your project is too small to even try all debugging tools in the armor. If I were you I would start with these following steps to eliminate the root cause and investigate into the issue. a) Try creating a new sample project with same steps that you did in current project and try running it. … Read more

[Solved] impacting Strings with pointers [closed]

This scanf(“%s”,kar[1000]); should trigger a compiler warning, as you pass a char where a char* is expected. You pass the 1001st element of kar (which is out of kar‘s bounds, BTW). In C array indices start with 0 for the 1st element. To scan into kar, just pass the address of kar‘s 1st element. scanf(“%s”, … Read more

[Solved] Program crashes when a function returns empty

The main problem I see with your code is the reading loop, it has mainly two issues Read: Why is while (!feof(rPtr)) always wrong. You must check the return value of scanf(), and prevent scanf()‘s from overflowing the destination buffer, so the loop condition should be while (fscanf(rPtr, “%14s%lf%lf%lf”, fromDb.name, &fromDb.dArea, &fromDb.dLength, &fromDb.dFormFactor) == 4) … Read more

[Solved] Unrecognized selector sent to instance NSArrayM [closed]

Did you removed UITabBarController also from your .xib file in Interface Builder? Did you removed UITabBarController also from your .xib file in Interface Builder? Check if object – in your case NSDictionary is kind of it’s class and key is not null. For example: – (void)fetchedDataAlerta:(NSData *)responseData { NSError* error; NSLog(@”RESP register %@”, responseData); if(responseData … Read more

[Solved] To peek into kernel by socket failure with levels and kill-9

This more a Server Fault kind of question, but try running psql like this: sudo -u postgres psql When you install PostgreSQL, there’s no user account created for your current user, so you’d have to create one. That can be achieved like this (where masi is the wanted username): sudo -u postgres createuser -sdrPE masi … Read more