Page 1 of 1

intersect crash bug in community ed

Posted: Tue Apr 16, 2013 11:23 am
by paulC
Not sure if anyone has noticed or posted on this, but it appears the intersect function is broken in the LiveCode community edition 6.0

A simple collision detection script that works fine in the commercial 5.5.3 version but crashes the whole CE application.

Is there somewhere to check on known bugs and an estimate of when they may be fixed in a subsequent dot release?

Cheers

Paul

Re: intersect crash bug in community ed

Posted: Tue Apr 16, 2013 12:40 pm
by jmburnod
Hi Paul,
I tested intersect() with Lc 6.0.0 RC 7 without mistake in IDE and standalone
Best regards
Jean-Marc

Re: intersect crash bug in community ed

Posted: Tue Apr 16, 2013 1:22 pm
by paulC
Interesting - mind posting the code you tested given the many variations intersect can have?

The code I was using is below and its called from within an updateScreen game loop. Its from the Game Academy tutorial:

Code: Select all

on crash
   
   repeat with x = 1 to 4
      
      if intersect (button "rocket", button ("foreground" & x), "opaque pixels") then
         answer "game over!"
         stopGame
      end if
      
   end repeat
   
end crash
As I said the code works fine in 5.5.3 but crashes the whole program running in 6.0.

Re: intersect crash bug in community ed

Posted: Tue Apr 16, 2013 2:36 pm
by jmburnod
Ok, a loop in a loop

You can try insert a short delay on the repeat loop. Maybe that avoid the mistake

Code: Select all

wait 1 milliseconds with messages
Is there somewhere to check on known bugs
Yes. the script work on 5.5. Here is the url for bugs report:
http://quality.runrev.com/

Best regards
Jean-Marc

Re: intersect crash bug in community ed

Posted: Tue Apr 16, 2013 2:41 pm
by sturgis
Using your code, no crash for me (other than the fact that "opaque pixels" isn't working correctly yet. (it is only doing a bounds check)

Is it possible the problem is in stopgame? Also, when it finds a match it will stop game, but the loop continues for the full 4 iterations so you can have the answer called more than once (if there ismore than just 1 overlap) which would also cause stopgame to call more than once.


Might change it to

Code: Select all

answer "Game over!"
stopgame
exit repeat
Not sure without more code (may post a non-working stack?) why it won't work for you in community. I didn't test it with the game loop, so that throws a few more possibilities in, but the specific piece of code you posted is working for me ok. Are you on windows? I'm on mac, so theres another differential to check.

Re: intersect crash bug in community ed

Posted: Wed Apr 17, 2013 9:20 am
by paulC
OK I uploaded the livecode file to skydrive but it seems I cannot post the url to it?

I also tried adding an exit repeat but it still crashes. Its perplexing that this works fine on my commercial version (trial) but crashes my community edition.

I'm on a PC running Windows 7 64bit if that makes any difference.

Re: intersect crash bug in community ed

Posted: Wed Apr 17, 2013 11:28 am
by jmburnod
Hi Paul,
I believe you can upload file once you posted 10 time
You can send it to "jmburnod" & "@" & "vtxnet" & dot &".ch"

Re: intersect crash bug in community ed

Posted: Wed Apr 17, 2013 1:46 pm
by sturgis
Based on other message threads it does seem the windows side of LC Community is having a few more issues. Since I can't test on windows I'll get outta the way!

Re: intersect crash bug in community ed

Posted: Wed Apr 17, 2013 5:38 pm
by jmburnod
Hi Paul,
I tested you stack and it work with LC 6.0 Rc7.
No intersect probleme
However, i got an error at preOpenCard

Code: Select all

on preOpenCard
   --   set the acceleratedRendering of this card to true
   -- jmb 170413
   set the acceleratedRendering of this stack to true
end preOpenCard
sturgis...
Sorry the zip file of stack is too big for an upload

Best regards
Jean-Marc

Re: intersect crash bug in community ed

Posted: Thu Apr 18, 2013 2:20 am
by paulC
Thanks for doing the testing.

I have a few other windows machines I will install CE on and test to see what happens. I tried commenting out the preOpenCard section to see if that was the problem but it still crashed.

Again thanks for all the help.

Re: intersect crash bug in community ed

Posted: Mon May 20, 2013 8:51 pm
by boodog
Has an answer been found to this yet as I'm getting the same problem and it sort of limits progress through the Game Academy?

Re: intersect crash bug in community ed

Posted: Thu Jun 27, 2013 1:27 pm
by LCNeil
Dear boodog,

Thank you for your request.

There was a known issue with the intersect function in the initial release of the LiveCode Community but this has since been resolved.

The bug report on the issue can be viewed here-

http://quality.runrev.com/show_bug.cgi?id=10828

I would recommend updating to the latest version of LiveCode and this should resolve the issue.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-