Java Update problems anyone?

lip

Active Member
Licensed User
Longtime User
I have a project with about 6000 lines of code now and I have found the B4A development pratform to be very robust. Last night, from nowhere, without making any changes to the main code, things started to go wrong:-

- Bits of code from within the FirstTime loop in the main activity appeared NOT to run (about 1 in ten times the application is loaded).

- Files in the File.DirInternal directory that I have just written cannot then be opened again - having worked perfectly for several weeks. (I have fixed this by changing it to File.DirExternalRoot - but why?).

- Process Globals in the main activity are initialized in main.Activity_Create but then occasionally give null_pointers when referenced from other activities.

I have been compiling to two devices: An Asus Transformer and a Galaxy Tab. Both have worked consistently well for several weeks, now both are consistently playing up as above so the issue is not in the device.

All I could think had changed was a Java Update that had popped up on my Laptop in the last couple of days.

I also have B4A in my Desktop so I have copied the code to that and run again. No problems this time! Everything works fine on both devices. So the problem is in my Laptop.

Has anyone else had a similar problem? Shall I remove B4A (and/or Java) from my laptop and resinstall?
 

lip

Active Member
Licensed User
Longtime User
Not Java

I am sure you are right as one of the errors has happened again on a device with software uploaded from my desktop this time. It can't be a device issue as both devices (Asus and Samsung) started doing the same thing at the same time. It must be in my code - or related to a library:-

The changes I made just before the errors started were in a different activity to the ones that have started playing up. However, I introduced the ABExtended Drawing library. Two possibilities:-

- Could I have used, somewhere, a variable name that it used by Extended Drawings causing some kind of conflict?

OR

- I have used the Grayscale filter code to take the color out of bitmaps. My Grayscale sub returns a grayscale bitmap but I need to call it from three different activities so a have written the Grayscale sub in a seperate code module called 'subs'. I used this code module for various subs that are used throuout the project. I Dim ExDraw as ABExtDrawing in the Process Globals of the 'subs' module, otherwise it won't compile. Could this be causing the problem when I call the procedure from other activities? It is generally called from within a sub Btn_Click with myNewBitmap = subs.Grayscale(myOldBitmap)
 
Upvote 0
Top