Android Question Is this a IDE bug?

demasi

Active Member
Licensed User
Longtime User
Hello,

I´m using B4A 5.20 licensed user.
A strange behavior occurres sometimes, when I save a project, and then try to open again.
If the code have some kind of error, the code does not load anymore.
I don´t know if this is a bug, or I´m doing something wrong.
It occurs in two different computers, a notebook with Windows 8.1 and my desktop with Windows 7.

This is the message:

upload_2015-9-24_13-26-13.png


My native language is portuguese, so my messages are kind of mixed, in english and portuguese.
Translating, the portuguese part of the message says: "Matrix index was out of bounds", something like this.

this is the code, that I only can open in an external editor, like Notepadd++.

B4X:
Version=5.2
NumberOfModules=0
Build1=Default,
ManifestCode=
IconFile=
NumberOfFiles=0
NumberOfLibraries=1
Library1=core
@EndOfDesignText@
#Region Module Attributes
    #FullScreen: False
    #IncludeTitle: True
    #VersionCode: 1
    #VersionName: 
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

'Activity module
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
    Log(junta(Array As String(1,2,3,4,5)))
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub junta(a()) As String
    Return (a(1))
End Sub

I know that my code have errors, since it´s a test.
But I think that, even with errors, I must be able to read and correct the code.
Thank you for any advice.
 

LucaMs

Expert
Licensed User
Longtime User
Try to recreate the project from scratch, probably the file is corrupted.
(the inside code has no problems, excpet you should declare the type of a() in junta)

Sub junta(a() As String) As String
 
Last edited:
Upvote 0

demasi

Active Member
Licensed User
Longtime User
When I create a new project it works, even if I include the same code.
I think it could be the file corrupted, as you said.
But the strange thing is that the file opens normally in notepad++, and it happened with other files, even in other computer.
It its not a big problem, as I always can read my programs with notepad++ and recover in another project.
But this is very annoying.
This message was only an user feedback.
Thank you for your reply.
 
Upvote 0

demasi

Active Member
Licensed User
Longtime User
Hi Erel,
Translating, the portuguese part of the message says: "Matrix index was out of bounds", something like this.
This occured when I tried to load the project.
I have no more this project. It was a test, so I erased and started again from scratch.
If it happens again I will save and post here as you suggested.
Thank you.
 
Upvote 0
Top