Android Question I input two set data from two SQL files. Each has 3 Array. The 2nd data set will cover the 1st one

AndyChang

Member
Licensed User
Dear Sir

I write a test program to input two set of data from two SQLite files. Each has 3 Array.

I find very strange conditions:

1. In the first run, some error message will appear like

“java.lang.RuntimeException: Object should first be initialized (Bitmap).”

But if I clear LOG and execute second run, everything just find. It is clear and no error msg.

2. When I operate the emulator, I find that two different set of data become the same. The second input data set will cover the first input data set.

3. If I execute first file input alone and show the data it is correct. Then I input the second one and show, It is correct. But if I combine them together, the former data set will be covered by the second data set.

4. The attached is the whole program and two png files to show error msg and screen output (Two different data set become the same)


Please help me to find out what's wrong with my testing. Thank you.


Andy
 

Attachments

  • screen.png
    screen.png
    49.8 KB · Views: 191
  • error msg.png
    error msg.png
    88.9 KB · Views: 183
  • test.zip
    294.7 KB · Views: 175

AndyChang

Member
Licensed User
Dear Erel,
In the last letter, the zip file was established by using File-Export method.
I do it again and name as test1.zip. Hope this time you could open it.
Hope to get your help. Thanks a lot.
Andy
 

Attachments

  • test1.zip
    294.7 KB · Views: 171
  • test1.zip
    294.7 KB · Views: 167
Upvote 0

AndyChang

Member
Licensed User
Dear Erel
After Doing some Array operation tests, I found that the problem is a matter of Assign by VALUE or by REFERENCE.
I will try to find out the correct array operation for my prog.
Thanks
Andy
 
Upvote 0
Top