Image Problems in Windows on Projects Compiled under Mavericks

Xojo has a serious problem with Windows builds compiled under Mavericks. We have reported this previously, but now that Xojo R3 is out and Mavericks is in production, it’s time to bring this issue to the forefront and demand a solution.

I have this problem on TWO Macs running Mavericks. The second Mac is a brand new 15" MBP Retina.

When building for Windows I either get black boxes or jagged images for any images that are project resources. Images loaded from files, do not have any issue. It’s just those that are resources in the app. This has been reported by others as well in another thread. I was able to make it go away in the past by restarting Xojo. Not any more. I cannot get a good quality image. The canvas is either solid black or I get something that looks like this

I’m rather frustrated by this as I cannot release builds to customers like this. And I need to release a new rev. I am shocked people at Xojo haven’t seen this and fixed it pronto.

Xojo: Please don’t tell me to just load all my images from files. That’s a non-starter.


Major problem guys.

Sorry for all the posts. The forums as all hinky tonight.

Have you tried it on a non-Haswell machine ?
That seems to be crucial too the bug which would lead me to suspect that it is a Mavericks bug

[quote=45687:@Norman Palardy]Have you tried it on a non-Haswell machine ?
That seems to be crucial too the bug which would lead me to suspect that it is a Mavericks bug[/quote]

Yeah. My old MBP from Spring 2010. It was the first one that had the problem. So it’s non a Haswell chipset issue.

Believe me, we’ve tried. At least three of us have tested the sample project that was attached and it came out fine.

I don’t disagree, I just can’t reproduce it in order to fix it.

Any chance you could attach a project that reproduces it for you? Along with the built executable for the project and the system profile of each Mac you see the issue with?

I will attach a project to the bug report in feedback. To be clear:

1.) The jagged image issue I have only seen on my new Haswell (Quad Core i7) MacBook Pro. But admittedly, I have not run Xojo on my older MacBook Pro since getting the new one.
2.) The black images I have seen on my my new Haswell i7 and my old 2010 i7. When the black images appear, quitting Xojo and restarting it eliminates the problem for a while. It eventually comes back.

So there is definitely a problem here with how images are loaded as project resources. I find it hard to believe that this is a CPU based issue, particularly when the problem is not even with he native platform but for Windows and Linux.

As you’ve noticed, there’s two different issues at play here. The one that’s relevant to this thread is not hardware related. I suspect it’s somehow an OS bug with exporting bitmaps via ImageIO (since our code hasn’t changed), but I can’t be sure without reproducing it.

Well, until Norman made the suggestion, I never suspected that CPU type would be part of this problem. While I realize that Xojo’s code hasn’t changed, the way OS X handles images in Mavericks has I believe. So if things are handled differently in Mavericks than I would expect that Xojo’s code might need to change.

If you guys feel it is a bug, have you opened a bug report with Apple?

Without a way to reproduce it or more details than “bitmaps are black”, it wouldn’t really go anywhere.

Will this even work? I’m getting the same problem (from Mavericks to Windows) and all of my images (Toolbar or not) will show up as black squares. Will try loading them from files and/or using Xojo in a Snow Leopard machine.

Update #1: Xojo 2014 won’t run on Snow Leopard so compiling on that machine is out of the question. Will try importing pictures from files.

Update #2: Using the workaround you mentioned, I was able to replace the black squares with icons from files stored next to the app. It’s less elegant than if the issue were fixed but it works because I have an installer. Will update this post again once the final build is working.

Toolbar icon replacement code:

#if TargetWin32 then

dim iconnames(9) as String
iconnames(0) = "docs_16.png"
iconnames(1) = "remov_16.png"
iconnames(3) = "copy_16.png"
iconnames(4) = "paste_16.png"
iconnames(6) = "impt_16.png"
iconnames(7) = "exp_16.png"
iconnames(8) = "ref_16.png"
iconnames(9) = "prefs_16.png"

dim b as ToolButton
dim p as Picture
dim f as FolderItem
for i as Integer = 0 to 9
  if me.Item(i) isa ToolButton and iconnames(i).Len > 0 then
    b = ToolButton(me.Item(i))
    f = GetFolderItem("graphics").Child("icons").Child(iconnames(i))
    if f <> nil and f.Exists then
      p = f.openAsPicture()
      if p <> nil then
        p.Transparent = 1
        b.Icon = p
      end if 
    end if 
  end if 
next // i 


[quote=58729:@Tomas Sancio]Will this even work? I’m getting the same problem (from Mavericks to Windows) and all of my images (Toolbar or not) will show up as black squares. Will try loading them from files and/or using Xojo in a Snow Leopard machine.
Xojo itself does this & that works fine - otherwise the IDE would also show black images

I had the same problem of black images happening to me before. I solved it by generating apps under Windows.

I wanted to see if it still happened with BMP, TIF, GIF, JPEG…

Just built a quick app on Mavericks with all those file types and PNG as well, and images show up just fine on Windows 8.1 !

This is puzzling :frowning:

I still believe the black image problem may not manifest with all file types, and suspect BMP may be better, as it is, after all, native to Windows. Just a thought…

i encounter the same problem with Window build on Xojo2013r4.1 on Mac OSX 10.9.1 but not all the time… sometimes, it happen and sometimes it doesn’t. i need to monitor the free memory and see if that is the problem.

It’s got nothing to do with memory.
Are you running 10.9 on a new rMBP ?
The OS image conversion seems to be broken - quite literally an Apple bug.
Compile your code on Windows (running in a VM or on a real machine) and there will be no issue.

i am running on an iMac Mid 2011. Strange thing is it does happen all the time. when it happen, i simply go back to 3.3 version and it work so it is no big deal.

We are having the same issue …

  • If we compile from MacBookRetina, the images on windows are scrambled

  • If we compile from an Old Mac Pro, also with Mavericks, sometimes the images on windows are black, sometimes not

  • Compiling from windows (real or VM) is not an option, as we compile and distribute a new version every 30 minutes or less (It’s a pain for us compiling from MacPro currently…)

  • Any new status on this issue/bug ?


It’s fixed in the next release, which is currently in alpha stage.


Is it really “fixed”? As I understand it, Xojo is moving from using BMPs as resources to using PNGs. So is the original “bug” which Xojo can’t duplicate (unless that has changed - it took us forever for them to even acknowledge this) fixed or not? You see what’s weird is that on non-Haswell Macs running 10.9, the black images sometimes show up and sometimes they don’t. It’s not all the time. The Haswell issue of messed up images is 100% of the time.

The cause of the black images bug is still unknown, but I believe that switching to PNGs will eliminate the problem. As for the Haswell issue, it’s a known issue in Mavericks and a fix will be rolled out in some future software update.

So, it’s “fixed” in that Xojo users won’t have this problem anymore.