Android Question Compile error without precise indication

DOM85

Active Member
Licensed User
Longtime User
Hello,
I wrote a rather big app.
When i compile it i obtain this message :

Compile (Build: Default)

B4A version: 8.50
Parsing code. Error
The specified argument was not within the range of valid values.
Parameter name: Index



I don't know where to search.
I spent much time to cut and simplify many parts of my program in view to locate the problem, without any result.

If anyone has an idea.
Thank you.
 

Brandsum

Well-Known Member
Licensed User
There might be some error in your code. Without viewing it's very hard to rather impossible to tell what is causing the error. Check your IDE log window (upper part) there you might get some clue. Or check for any functions having index named parameter.
 
Upvote 0

DOM85

Active Member
Licensed User
Longtime User
Thanks. I did all that.
I used all investigating usual methods.
I also removed the 2 code modules of my program with the corresponding modifications in the main, in view to simplify. But B4A added new bugs while claiming again the removed modules, and so on...
It would be too long to list all the verify that i did. I have inspected all the Dims, the library calls, the .bal files, etc.

The B4A V8.50 compiler gives no information. I see no solution.
 
Upvote 0

DOM85

Active Member
Licensed User
Longtime User
Dear Erel,
Yes i upload the project in its simplest version (empty !).

The original project with this compilation error is rather large.
I went further in my research.
I gradually deleted parts of my project, always with the same compilation error. When the project had no more lines of code, the unspecified compilation error still occurred! I had the same result under B4A V8.50 (WIN10) and under B4A V5.80 (WINXP)
I send you this project.

So I built a new application, integrating the code of my initial project by copy / paste. And the compilation has finally succeeded

I spent much time before disturbing the community. If you could find how to avoid this problem.

Thank you for your help.
.
 

Attachments

  • COMPILE_ERROR.zip
    26.8 KB · Views: 134
Upvote 0

Brandsum

Well-Known Member
Licensed User
You are getting this error just because you have deleted all the codes from starter service!!

If you don't want to put your code in the starter service then let it as it is. Don't clean the file.
 
Upvote 0

DOM85

Active Member
Licensed User
Longtime User
Effectively you have found that the problem comes from Starter.bas. Thank you.
But it is not the full explaination of the problem.

To better understand i tried this:
- I renamed it and reloaded my project. The compiler displayed an error (Starter not present), but it accepted to compile the project.
- Then, i renamed it to its original name (Starter.bas) and i reloaded my project. The compiler still accepted to compile !!!
So, the compiler accepts to work even with the same Starter service module unchanged. (I don't know its use, not mine, maybe generated ?).

The problem seems rather to be located in the compiler. Only a clear error message would save time to all of us.

Thank you again.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I renamed it and reloaded my project. The compiler displayed an error (Starter not present), but it accepted to compile the project.
The Starterservice must be named "Starter" to be the entrypoint as described in the StarterService tutorial.

Remember the notes in the Tutorial: https://www.b4x.com/android/forum/threads/starter-service-consistent-single-entry-point.57599/

Notes
  • The Starter service is identified by its name. You can add a new service named Starter to an existing project and it will be the program entry point.
  • This is an optional feature. You can remove the Starter service.
  • You can call StopService(Me) in Service_Start if you don't want the service to keep on running. However this means that the service will not be able to handle events (for example you will not be able to use the asynchronous SQL methods).
  • The starter service should be excluded from compiled libraries. Its #ExcludeFromLibrary attribute is set to True by default.
  • The starter service should never be explicitly started. This means that if you want to start a service at boot then add a different service.
 
Upvote 0
Top