ListView works erratically

Does anyone knows why the ListView is not working properly since more than ten hours ago? Projects that compiled without a problem, they have been not working anymore, it seems all the trouble arises when an element of a ListView is selected, in which case the application stops execution of the code. Is there a page where mit ewarns about that they update their compiler or whatever that might lead to malfunctioning of a code?

ListViews do have problems since the latest release in nb187. Try this server: ai2-test.appinventor.mit.edu.

it does not work there too. After many hours I understood what mit's application can not hadle. In case there are more than one ListViews, objects actually, used/created and more than one have been assigned values to their elements, that is the ListViews are not set their elements to an empty list all of them except one, then after an element of any ListView (that of course has values assigned to its elements) is selected, no matter or not if the rest are enabled or not, visible or not then the application will stop execution and that will happen erratically. This crash occcurs only when an element is selected, otherwise the whole thing works OK with ListsViews enabled, visible and holding values for their elements, at least I tested up to 10 elements for each. As I had already in my project more than 5000 blocks, I could not quit its completion. My solution was to modify various blocks and alter the structure of the program so I use in every Screen only one Listview, that is enabled/visible and above all with elements not assigned to an empty list,
Anyway, I tried to find any information in their documentation about it, but I did not spend enough time and I have found not any related information.
In any case, my experience so far is that their whole project is good enough for childrens to make applications, applications that are simple with not many blocks. There are many other 'bugs' that I have encountered so far that I had to circumvent them, where instantiated objects could not work as expected and there was no documentation about it at all. In a complex situation, this programming environment seems not be good enough, First and last time I will use it for that complex project.
Thanks for your answer.

Try posting your project here so we can take a look.

it's actually 6459 blocks so far, so it makes no sense posting it....anyway there are no syntax or logic errors in the blocks, it worked fine in all respects except when an element of the ListViews was selected by touching it on the screen, then erattically would more other elements of another one Listview would be also selected or upon selecting the element the application would stop....What I found out by trying to track the error is that the app inventor could not hadle the Selection property properly in a case of the existence of many ListViews, either in the case there was a handler for AfterPicking or not...so in order to correct it I had to restrict he project to only two ListViews and only one would be not an an empty of element list, that is one every time is empty....In order to be able to view the elements of all other deleted ListViews I just compined two or more list elements to one, as it was practically, to one new introduced in the block code list, and every time I need to view them on the device screen I load a list to an empty ListView and then after viewing it, I empty the ListView and load it with another list that holds other elements. With that way I may select any ListView element, as many times, Keeping the other one ListView empty. Of cource, in that way I loose the convnience to see all data in all Lists simoultaneoysly, practically with compining the elements of more than one relevant data lists, I may see all data in no more than three succesive viewing processes.
The problem is definitely in the software of the mit, the software that translates the pictorial blocks to real code and/or in their compilation software. Simply, it can not hadle the Selection property in a correct way, when many ListViews exist and are loaded with elements, they are not empty. I dont know if they have any warning about it in their documentation, and for sure I know that the problem appears with more than three ListViews, I did not try to see what happens when there are only two ListViews, at the present I keep only one load with elements, while the other one is not loaded, it is empty. I dont know if the size of the application affects or not the 'appearance of their bug', because somewhere in their documentaion, for example, I read that the app inventor may handle correctly Screens up to a certain number.It could be the same in this case too.
Anyway, I have to complete the project and I am about completing it, otherwise I would abandon making that long app using app inventor, as a matter of fact without a proper debugger and many not well documented defficiencies (bugs) it is more time consuming to use app inventor instead of a standard language and development environment.

Post a test aia that only targets these aspects / issues (so only with ListViews and maybe labels).

From the nb188 bug fix release notes at ai2-test.appinventor.mit.edu:

  • Fix ListView filter functionality to handle backspacing/clearing
  • Clean up code issues in ListView and implement some unit tests
  • Fix issue where the last ListView in a screen would receive the events from every ListView

Have you tried testing on the nb188 server?

Still a bit broken (for me) I put a comment on the release notes.

1 Like

Di you try using AI2Offline?

yes, it failed there too. But, I have just updated the MIT companion app on the phone device and there is no problem anymore. I have just tried the server you pointed, and it works there too, after the update. Now, even if there are more than one ListViews on Screen, selecting an element, accidentally, there is no usage of any ListView.AfterPicking, in one of those ListViews there is no problem. Last update was in the middle of September.
The problem is that I made some changes in the project blocks in order to circumvent the 'bug' and then added so many other blocks, that I can not go back to the earlier copy of my project.My solution was to keep only one ListView and combine all elements of same index of the Lists in one only element of a new List, and use that list to fill the only one ListView.
Thanks for your help.

well, in few words. The last update in my testing device of the MIT Companion was in september. I have just updated it and now the version of my project that had problem in execution, works OK without any changes in it. I have though modified some blocks to circumvent the problem and continued development,so now I have to go on with my new project version, which anyway is executed well after the update of The MIT Companion too.
Thanks for your help.

I built the project, installed in the testing device and it was not working there , it had exacttly the same problem.
Anyway, in few words. The last update in my testing device of the MIT Companion was in september. I have just updated it and now the version of my project that had problem in execution, works OK without any changes in it. I have though modified some blocks to circumvent the problem while using the just updated MIT Application and continued development, so now I have to go on with my new project version, which anyway is executed well after the update of the MIT Companion too.
Thanks for concern to help me out.

1 Like

Thank you for offering to help. There was no error in the project. I have just updated the MIT Companion and that version of my project that had the problem works OK without any modification in its blocks. As a matter of fact, I do not know if the solution was to update the MIT Companion (last update in September, or at least new installement of it), or the 'bug' has been fixed in MIT's software since I posted. In any case my then modified projects runs OK after the update too, but there was much frustration.

1 Like

That is the reason because I appreciate the work of the mantainer(s) of AI2Offline. I archive each version of it I use so that I am always able to build the projects I developed with the original version. This helps a lot in situations as yours. In general terms I am not a big fan of online compilers and development system, not because they do not work, indeed they solve all installation problems and they are ready to use. But... they can not guarantee to be available for several years and that will be downward compatible forever.

Yes I do that as well. However, this only helps if the offline version always provides versions that use the same packageName as AI2 (online). But unfortunately this is no longer the case.

I agree with you, there is a debate about that. They build the same sources cutting some limits as the maximum length of uploadable files (that is a good thing); but the last 2 versions do not follow the AI2 number convention and that may become a problem.

Perhaps build you own offline version of AI2

1 Like

Yes, it is an option

Siempre los estoy leyendo, y es bueno saber que les es de utilidad la versión offline.
Bien en próximas actualizaciones me daré el tiempo de publicar ambas versiones:
"appinventor.ai_"
"com."

Saludos

4 Likes

welcome @Ramiro!
keep up the good work!
Taifun

1 Like