Bug involving drawing horizontal lines on the iMac Corona Simulator

This bug only occurs on the iMac simulator. It does not occur in the Windows version of the simulator or on-device as far as I can tell.

Consider the following code:

rect = display.newRect( 0, 0, display.contentWidth, display.contentHeight )
rect:setFillColor( 0, 0, 0 )

local i = 394
local line = display.newLine( 100, i, 800, i )
line:setColor( 255, 255, 255 )

for i=395,500 do
line = display.newLine( 100, i, 800, i )
line:setColor( 255, 0, 0 )
end

i = 501
line = display.newLine( 100, i, 800, i )
line:setColor( 255, 255, 255 )

Note that the very first horizontal line will not be drawn on the iMac simulator.

I have submitted this bug to the bug database.
-Dennis
[import]uid: 108253 topic_id: 21827 reply_id: 321827[/import]

The first line being the white line? If so, I can see that just fine over here - Mac, Corona 704.

What version are you running? [import]uid: 52491 topic_id: 21827 reply_id: 86796[/import]

oh weird. I am running 2011.703 and I tried it on 2012.745 and got no white line on top.
I am simulating a iPad screen.
I am running an iMac 27 (2560 x 1440) using the latest version (10.7.3) of Mac OS X.
I have run into this bug many times in the last month or two but never on the device or in Windows 7.
So now I’m thinking it’s a Mac display thing or something?
-Dennis

[import]uid: 108253 topic_id: 21827 reply_id: 86879[/import]

Hi Peach,
A thought occurred to me. Since the draw line is a “factory” function does that mean perhaps Corona doesn’t really draw the line itself in the simulator. Does it call XCode or Open GL to make the line draw call?
That could explain the different results you and I are seeing.
Cheers,
-Dennis [import]uid: 108253 topic_id: 21827 reply_id: 86911[/import]

Hey Dennis,

I’m actualy running 703 as well - I say 704 out of habit as that’s the last stable. (703 was, then we added skins back in and switched to 704.)

I’m also running and iMac 27" although am on OSX 10.7.2 because I’m lazy and haven’t updated it yet.

I have to go out for awhile this afternoon, may leave an update going then and see whether or not this issue occurs for me after that.

Currently it’s all good here though, checked on iPad and iPhone simulators.

We will see!

Peach :slight_smile: [import]uid: 52491 topic_id: 21827 reply_id: 86979[/import]

Have just gotten home, now on 10.7.3 and still the line draws just fine for me over here. [import]uid: 52491 topic_id: 21827 reply_id: 87064[/import]

Argh!
Wow. What can I say. It must be something in my iMac environment that is the problem.
The only thing I can think is that perhaps whatever Corona is calling to “draw” those lines in the iMac operating system is causing the problem for me?
Is that XCode? Maybe I need to upgrade that?
I’m mainly a PC guy and am relatively new to the Mac. Do they have any equivalent to DirectX that I need to upgrade or is that inherently part of OS X?
I was just working on a tool where I was using horizontal lines
and about 1/3 of them were missing in the simulator so I changed over to drawRect so the horizontal lines definitely have problems for me.
Well if anyone out there has anything similar to this please let me know. Thanks all,
-Dennis

P.S. Is there any way to send you a image Peach when we have a problem like this? Thanks for your time. :slight_smile:

[import]uid: 108253 topic_id: 21827 reply_id: 87112[/import]

You can send an image, yes - peach[at]anscamobile - although my email lives in a perpetually overflowing state so that isn’t always the best way to get my attention.

Showing the image in a thread is the best way if you want it seen quickly. (If you’re using Puush this is pretty easy.)

In any case, I’m going to bring this up in our next meeting and see if anyone has any insight.

In the meantime, what version of Xcode are you using? It’s good to keep it current. (Not beta current but latest stable current.)

Peach :slight_smile: [import]uid: 52491 topic_id: 21827 reply_id: 87240[/import]

Hi Dennis. I was the one who dealt with your bug case and also found no issues.

Just a little bit of info, the simulator is the simulator. There is one version for mac, there are no specific versions for each mac type (ie macbook, macbook air, iMac, mac mini etc) its one binary.

I tested your case and also couldn’t find an issue. I run the same version of Mac as you and also tested it on my imac (the new 21")

What graphics card does your imac have ? This is definitely not a bug with Corona, it sure sounds like there is something up with your system, at the same time however I would like to help you try to resolve this as i can understand it being frustrating. [import]uid: 84637 topic_id: 21827 reply_id: 87297[/import]

Hi Peach and Danny,
Been doing some research and here is what I found so far.
I am using Xcode 4.2. The current version is 4.3.
The iMac 27 I have is refurbished but uses an i5 3.1 GHz Quad-core Intel CPU. It uses an AMD Radeon HD 6970M with 1GB GDDR5 memory.
Nothing very conclusive on web searches of either problems with AMD graphics or problems with XCode 4.2 at least as relates to my issue.
So it looks like for the the time being at least I will have to live with the issue.
I will be upgrading to XCode 4.3 shortly but I don’t expect that will solve this issue. The iMac itself is upgraded to the latest version of OS X.
Unfortunately not being a Mac person there doesn’t seem to be any quick and easy way to write an OpenGL program to draw a few horizontal lines. On the PC it would be easy for me but for the Mac it’s more work than I have time for now.
I really do appreciate you both taking time to try to help me.
I think for now we will have to relegate this to the weird wonderful world of computers. There always seems to be a few of those issues around.
Thanks again,
-Dennis
[import]uid: 108253 topic_id: 21827 reply_id: 87363[/import]