1

I have this non usual error popping up whenever i open my project (not all projects):

error creating form index out of range(25). Must be >= 0 and < 25.

I was working with the project before this error totally fine, i really don't know what causes this.

The project is for android device, and it's totally weird for me, because this never happened before this day. This happens when i open my project, it doesn't even let me see the main form, just the units and header files.

My code was working fine.

Jack
  • 43
  • 4
  • I suspect you're using RAD Studio, right? – πάντα ῥεῖ Aug 25 '19 at 11:11
  • yes, I am but, I cannot figure out where the problem is. – Jack Aug 25 '19 at 12:12
  • Have you tried to clean your project? – relayman357 Aug 25 '19 at 17:51
  • This could be an error with a component failing to load properly - perhaps a change in the code that implements the component so that the data stored in the DFM file is causing the problem. If this is the case identofy the components that are on the forms which will not open and see if you can idenitfy any custom components that could be causing a problem. – Rob Lambden Aug 25 '19 at 20:14
  • @relayman357, I tried to clean my project, unfortunately same error each time i open my project – Jack Aug 26 '19 at 06:36
  • @RobLambden, I didn't use any Custom Components in my project, but lately, i added **TImageList** to my form in order to add some images to my **TSpeedButton**, then i started to see the error, i commented the implementation and still same error – Jack Aug 26 '19 at 06:41
  • 1
    @Jack, if the problem is with the form loading, the chances are it's data in the DFM file that is used to initialize the properties you have set in the IDE. The DFM is a text file, make a copy of it and then try removing things you may suspect are a problem - if it's to do with the ImageList then perhaps try removing all references to ImageIndex. – Rob Lambden Aug 26 '19 at 07:14
  • Looks like the Problem was with **TImageList**, I opened FMX file in notepad and removed all references of **Images** and **ImageIndex** of all components attached to **TImageList** and solved the problem. If i may ask why this is happening? – Jack Aug 26 '19 at 10:21
  • @Jack which version of C++Builder are you using? Embarcadero has been making changes to `TImageList` in recent versions for High DPI support, maybe they broken something? There is no way to know for sure without a [mcve] and more details about your setup. – Remy Lebeau Aug 28 '19 at 16:59
  • @RemyLebeau, I'm using C++ Builder 10.1 Berlin, About this error, it started to pop out when i added **TImageList** Component to my form, but problem solved when i deleted all it's references. – Jack Aug 29 '19 at 10:41

0 Answers0