+1  A: 

Well, as you've probably figured out yourself, some variable is null. Unfortunately, there is no obvious source of the NullPointerException in your code.

Therefore, you should first try to identify what variable is null, and hence causing the exception.

For example, findViewById returns null if it cannot find the view, so you may want to double check your ListView and Spinner are being initialised properly.

Of course, the problem may be with your ArrayAdapters, so you should also check them, but from your question it sounds as if you've already done that.

Once you (and we) know exactly where the NullPointerException is occurring, it will be easier to give more specific advice

chrisbunney
Hi Chris, your input in appreciated, i'm just sitting down again to try and figure it out.What throws me off is that everything runs fine on the simulator, so why would a variable go null when running on the device if it wasn't some sort of the bundled sqlite3 database not being properly moved from the assets folder (and using a pre-existing database, especially one bigger than 1Mb is a complete topic on its own). In any case, I'm just about to work on this tonight, if anyone has some tips on additional debugging features on eclipse that I may be missing that would be appreciated.
dhomes
it's definitely not in the adapters, a Log.e on them provides the proper number of elements (so they are indeed being filled from the database) Log.e("SHAPES SIZE",String.format("%d",shapes.size()));gives: 06-25 21:14:52.701: ERROR/SHAPES SIZE(11447): 1973
dhomes
chris, you were right, my ListView designations:: designations=(ListView)findViewById(R.id.designations); if(designations==null) { Log.e("designation null :: ","null"); } throws an error. I still don't know why it works fine on emulator though
dhomes
You mention your device is running 2.1, but you're targeting 1.6. Are you using the 2.1 emulator to match your device, or are you using the 1.6 emulator to match your target API level?
chrisbunney
chris, I'm using 1.6 on emulator as you mentioned since that is actually my target minSDKversion, but I will test it on a new avd with 2.1 right away. unfortunately, i will be leaving on a short weekend leisure trip and wont be able to work on this again until late sunday at the earliest.
dhomes
nope, works like a charm on an emulator with 2.1 as well :S. feeling a bit frustrated by now, I'm debating on whether or not to go back to objC/iphone development which at least I know fairly well by now. Is there any reason why the compile R.java file wouldn't be moved / compiled with the apk to the device (some sort of permission needed to be set)? Maybe there is something I'm missing on my manifest (just throwing rocks in the air as I'm lost really). btw, appreciate your interest chris.
dhomes
I agree these problems are frustrating. You could try a clean build of the project to clear out any issues with things not being compiled correctly. Also, you may want to try loading the layout and getting the Spinner and ListView at the beginning of the method just in case that has any weird effects. If possible try running on a different device to see if it's just the HTC Legend. Unfortunately I don't know any good reason for this behaviour, and am running out of ideas :\
chrisbunney
same here chris, i will follow on you last tips but if things keep like this i will just go back to code for iphone / ipad at the moment, I have an application about 35% done there that I put on hold just to test android. But the more income i can get in the next few months the better as I'm getting married soon.
dhomes
A: 

Oops! it was my fault all along, somehow I had TWO layouts (one for different resolutions), the one being used on my device did not have the proper ListView and Spinner ID. That alternative layout was collapse into a folder and I just forgot about it (I had paused development of the app for about 2 month until I actually got a device to test on).

the one working fine was installing on the simulator but not on the device and vice-versa, weird as the good one matches the resolution of my device (I'm pretty sure I'm also missing something there but that's not important right now)

Still, thanks Chris for pointing me to looking at the Null return value on findViewById. Being new to android I was lost as to were to begin

Best regards david

dhomes