Using "go card" on Linux standalone with -ui

Ben Rubinstein benr_mc at
Wed Sep 21 10:34:07 EDT 2011

On 21/09/2011 05:47, Mark Wieder wrote:
> Ben-
> Tuesday, September 20, 2011, 11:49:09 AM, you wrote:
>> I have one last (for now) issue, which is not a show stopper but which it
>> would be nice to fix.  Whenever the stack goes to a card, I get
>> *** ASSERTION FAILURE: MCStack::openrect() - window == NULL
>> Richard (I think) mentioned in a previous post that he hides the stack - I'm
>> doing this.  I need to go to particular cards, to avoid masses of rewriting of
>> this app which more normally runs with a GUI, as the scripts reference
>> controls and properties on different cards.  And it all seems to work; it's
>> just this annoying assertion failure making it look bad.
>> Have other people encountered this?  Does anyone know of a workaround?
> With all due respect, I don't think you're supposed to work around it.
> The reason assertions exist is to pop up those notices when something
> is amiss. There's an assert statement in the code to catch the case
> where openrect finds a NULL window handle. The fact that you're seeing
> it means that something failed in the code and you got to someplace
> you shouldn't have been able to get to.
> OK - having said that, since you're launching this from a commandline,
> you might try piping the output to a file or to dev/nul
> app -ui arg1 arg2 arg3>
> app -ui arg1 arg2 arg3>  /dev/nul
> but filing a bug on this with the QCC would be useful as well.

Hi Mark,

Thanks for replying.  I agree with you about not working around an assert - if 
it's my code.

I evidently should have been clearer about what I meant by a workaround.

- Clearly there is an operation which reveals a bug in the LC code.

- The assertion is useful in revealing that bug, but that's not useful to me 
because I have no ability to fix the code (except, as you note, indirectly by 
reporting it in QCC).

- If I knew what the operation was (ie, if anyone else has pinned down an 
operation in LC which causes this assertion to be thrown) then I might be able 
to avoid using that operation.

- I might also be able to post a more useful report in QCC.

If I have world and time enough, I could go through the process of elimination 
to find out which of the operations that I'm doing on 
closecard/preopencard/opencard, or which of the controls on the cards, is the 
issue.  But unfortunately, not least because the test cycle I have to go 
through is painfully slow (reminding me why we use LiveCode in the first 
place!) I can't imagine when I'm going to get to that*.  So if anyone had 
already been through this, but for whatever reason not posted something in the 
QCC, and was therefore in a position to throw me a hint.... that would be helpful.


*In fact, since posting this yesterday I've found a more serious problem that 
completely prevents the app working - but only when compiled with LC 4.6.4, 
not Rev 3.5.  I don't even have the time to investigate this, instead we're 
having to go with the 3.5 version, and I've left a bunch of comments to note 
how far I got in diagnosis, for some mythical future date when I can spare the 
time... or more likely, for my granddaughter to work with!

More information about the Use-livecode mailing list