Mysterious "barcode" error during compilation

Probably nothing to do with “barcode” per se but here it goes:
(macOS 10.14.6, full MBS plugin suite)

Using Xojo 2024r1.1:

  • I have a large Desktop project, it builds fine
  • I have a console project, it builds fine

Using Xojo 2024r2:

  • large Desktop project, builds fine
  • console project, builds fine
  • repeat Desktop project build, I get this error out of the blue:

My project has no calls to any barcode methods, and the string “barcode” does not even exist in my project. From then on in, neither desktop nor console projects will build because of this error, and even a new blank desktop project gives the same error. So I’m stuck and cannot build anything. Clearing caches, quit-relaunch, rebooting my Mac, trying on a new account, does not fix the issue.

Going back to 2024r1.1, all projects build without issue (even without clearing caches).

And the “Clear caches” function in Prefs>Building does not seem to clear everything, because clearly something persists across launches to throw the same error.

The curious part: if I remove all my MBS plugins, clear caches, relaunch, now I can build my Desktop project with 2024r2 (this forces a re-build of all plugin cached files it seems). I can build my console project as well, but xojo re-prepares all the plugins (takes long with MBS which is why you know it’s occurring) which is curious, why? I thought the plugins were the same for desktop vs console? And i think this is where the problem lies: when i go back to rebuilding my desktop project, now it fails again.

So I think there may be a flaw in the plugin prep phase in 2024r2 that somehow messes things up throwing errors on methods that are not even used in the project. The large prep required when MBS suite is installed may trigger this, but has nothing to do with the MBS plugins themselves because they are all the same for all above steps.

Any one else seen this? This is serious because once this sets in, none of your projects will build. So for now 2024r2 is a non-starter for me.

Are you using the latest MBS? I vaguely remember something about caches and MBS needing update. But it was for 2024r1 if I’m not mistaken, so not sure if something like that is occurring here.

I don’t know much about the Xojo build process, so if you’re not able to try the latest MBS version, as a workaround try removing the plugins you don’t need (like Barcode).

For example, of the 53 plugin files of the “Complete Set”, I only use 20 (and some of those are just for testing various MBS features). When there are fewer plugins to process, the Xojo startup is faster.

Keep in mind some MBS plugins have dependencies, see here

Hopefully @Christian_Schmitz will chime in with a comment.

Note: I’m using Xojo 2024.2 on macOS 14.5 and not having any problems with builds.

yes: MBS-Xojo-Plugins243pr6

but it does not seem like an MBS issue because it hasn’t happened with 2024r1.1, as far as i can tell, and i’m using the same MBS set

this is the first thing i tried thinking it was an MBS plugin issue, with no luck, then Christian pointed out that Xojo has its own built-in barcode class which i think is the one being reported in the error i posted, so nothing to do with BarcodeMBS

IIRC the case I cited had a clash with a dependency (and cached things) and Christian solved something I really don’t remember with a new release.

1 Like

could be a conflict, i have no idea

I remember something along those lines as well, though I can’t remember the details now.

Christian is always on top of things, he’s such an asset to the Xojo community :+1:

2 Likes

Scott emailed me before. The problem seems to be a reference to an item named _Barcode, which is part of the Xojo framework.

I advise to clear all caches:

  • ~/Library/Caches/Xojo
  • /private/var/folders/…/T/Xojo
  • /private/var/folders/…/T/xojo scratch*

You can go to the temporary folder with specialfolders.temporary.open call in Xojo.

3 Likes

So it looks like _Barcode is the internal super class for the Barcode class.
Part of the Xojo framework and you may have a broken cache or installation of Xojo if it can’t find it.

1 Like

Thx Christian. I had an applescript that nuked all realstudio caches but of course xojo is different, i’d hoped that the built-in Clear Caches button would do it all, but evidently not.
I’ll try this and report back.

It should.

I have doubts. Still too many people contact me with cache issues.

Here is a little app that does what Christian recommended above. If there are more locations of other caches let me know and i will add:

https://www.dropbox.com/scl/fi/qpgid3oktn8qq5c885bqg/Clear-Xojo-Caches.xojo_binary_project?rlkey=vthjjgmmbcbycihwqaqhnhky1&st=p1f0m7t1&dl=0

And you may be correct, but still “it should”.

and even more weirdly, the bug only shows with Analyze project (cmd-K), but the build succeeds otherwise

Xojo found one bug in the barcode plugin, and marked it as fixed for a dot release. Not sure if it will fix your problem, but some weird ones it will. Dot releases don’t take too much time. Let’s wait and see.

@Peter_Stys could you please open a new Issue for this?

@Peter_Stys Please, test again with Xojo 2024r2.1 and let us know.

  • I created a Desktop project and a Console project, with this code in the Opening / Run event of the projects:
Var b As New Barcode

Var p As Picture = b.Image("Hello World", 600, 600)

If p = Nil Then

  Break

End If
  • I ran Desktop, then Console, then Desktop again from the IDE: it works
  • I compiled (build) Desktop, then Console, then Desktop again: it works
  • I analyzed Desktop, then Console, then Desktop again: it works

dnload link? i seem to only get 24r2