Internal error : AppId cannot exceed 128 bytes (encode)

68 views
Skip to first unread message

Han K

unread,
Apr 11, 2024, 10:44:22 AMApr 11
to innosetup
I get a strange error

"AppId cannot exceed 128 bytes (encode)"

if I create an installer for a very large file of 186 mbytes. The error occurs when the setup starts to install the large file.  It happens with Inno Setup version 5 and also with the latest Inno Setup 6.  

The problem can be fixed  if I specify the AppId=Myprogram or something similar.

The problem does not occur if the file to install is smaller.

The large file involved can be downloaded from here:


Why is AppId required for this large file?. A bug?


Error.png

Martijn Laan

unread,
Apr 11, 2024, 1:57:06 PMApr 11
to innosetup
See the help file: "The length of AppId with all constants evaluated should never exceed 127 characters."

Also it defaults to AppName as it says. So if you don't set an AppId then your AppName should not exceed 127 characters.

Greetings,
Martijn

Op donderdag 11 april 2024 om 16:44:22 UTC+2 schreef ha...@hnsky.org:

kgmeten

unread,
Apr 11, 2024, 2:11:49 PMApr 11
to innosetup
Yes that is clear but does go wrong.  I never before specified an AppId. This has worked thousend times. The only difference now is that the packed file is huge. Somehow creating a default AppId from this huge file goes wrong. Look to me a bug.

Martijn Laan

unread,
Apr 11, 2024, 2:13:39 PMApr 11
to innosetup
So what did you set your AppName to then? From your screenshot it indeed looks like a very long name with multiple sentences, even including an URL.

Greetings,
Martijn Laan

Op donderdag 11 april 2024 om 20:11:49 UTC+2 schreef kgmeten:

Han K

unread,
Apr 11, 2024, 2:49:43 PMApr 11
to innosetup
Yes your correct. The problem was caused by a too long AppName.

It would be better if in the Inno code something like the following was do for the default AppId:

if default_AppId_required then AppId:=copy(AppName,1,127);

Martijn Laan

unread,
Apr 11, 2024, 2:50:52 PMApr 11
to innosetup
That's not possible because AppName (and AppId) may include constants, as the help file says.

Greetings,
Martijn Laan

Op donderdag 11 april 2024 om 20:49:43 UTC+2 schreef ha...@hnsky.org:

Martijn Laan

unread,
Apr 11, 2024, 2:53:30 PMApr 11
to innosetup
If you did indeed change your AppName then you set AppId to your old AppName otherwise you will break updates for your users and they will get weird things like two uninstallers.

Greetings,
Martijn Laan

Op donderdag 11 april 2024 om 20:49:43 UTC+2 schreef ha...@hnsky.org:
Yes your correct. The problem was caused by a too long AppName.

Han K

unread,
Apr 12, 2024, 3:22:03 AMApr 12
to innosetup

Thanks for the info. I will pay more attention to the AppId.

>>That's not possible because AppName (and AppId) may include constants, as the help file says.

Still I assume the handling can be improved.

1) First the error occurs during runnning the installer. That's too late. Why is this problem not captured/checked during the compiling phase?
2) If the AppName string can be longer then AppId, then the automatic creation of the default AppId function could crop the AppId string to 127 or 128 characters or less to include constants. Why would you abort on an error which can be avoided in the compling phase by a simple crop function? 127 or 128 characters space must be more then enough to create an unique default AppId from an longer AppName and constants involved.

Met vriendelijk groet, Han

Martijn Laan

unread,
Apr 12, 2024, 7:02:14 AMApr 12
to innosetup

Op vrijdag 12 april 2024 om 09:22:03 UTC+2 schreef ha...@hnsky.org:
1) First the error occurs during runnning the installer. That's too late. Why is this problem not captured/checked during the compiling phase?

Again because it may include constants so the value isn't known during the compiling phase.

I suppose it could check if AppId contains constants and if not then do compile time check instead of a run time check but currently it doesn't. Having an AppName longer than 127 chars seems pretty extreme to me (especially when AppId is not set) so perhaps thats why the checking is kept as simple as possible, also avoiding duplicate code.

Greetings,
Martijn

Gavin Lambert

unread,
Apr 14, 2024, 9:53:09 PMApr 14
to innosetup
On Friday, April 12, 2024 at 7:22:03 PM UTC+12 Han K wrote:

2) If the AppName string can be longer then AppId,

I think the main problem is that your AppName was unreasonably large to begin with.  You appear to be including some descriptive text in there, which better belongs in some other location.  The AppName is supposed to just be the application name alone, possibly prefixed by vendor name.

Fixing this after the fact is tricky, given the interaction with AppId.  It's best to get it correct before you release your first version.
Reply all
Reply to author
Forward
0 new messages