LB Booster
General >> General Board >> Getting spurious error?? http://lbb.conforums.com/index.cgi?board=general&action=display&num=1441225700 Getting spurious error??
Post by Monkfish on Sep 2nd, 2015, 8:28pm
Well my program was running fine, but now I'm getting an error when my program tries to run another program with the following line:
Code:
run "editor.exe ";DefaultDir$;"\rotas\";file$
It passes a file path as a command line option.
This is producing an error "Invalid Channel at line 0", which I think is being produced by the second program because the first program continues on normally.
I haven't changed anything apart from reinstalling LBB (after upgrading to LB 4.5.0) and recompiling my program. I can't remember if the last version of LBB was V3.0.0, but I am currently using V3.0.1.
This error has come out of the blue. As the code was working fine I can only put it down to the recent recompile with the version of LBB I downloaded. But I am only guessing. Re: Getting spurious error??
Post by Monkfish on Sep 2nd, 2015, 8:42pm
Okay definitely the second program because I just made a new program with just that one code line and got the same error.
It seems to have a problem passing the command line option, because it runs fine without the command line option.
Re: Getting spurious error??
Post by Richard Russell on Sep 2nd, 2015, 9:03pm
This is producing an error "Invalid Channel at line 0", which I think is being produced by the second program.
The way I would diagnose this kind of problem is to run the 'second' (called) program in the debugger - with the command line parameter set 'artificially' to what it normally receives from the 'calling' program - then you should be able to find which statement generates the error.
Quote:
It seems to have a problem passing the command line option
Add a NOTICE CommandLine$ so you can see what is being received.
Richard. Re: Getting spurious error??
Post by Monkfish on Sep 2nd, 2015, 11:01pm
I pinned the problem down to the program trying to CLS and close a graphics windows I hadn't yet opened. What I don't understand is why it had been working.
Is there LBB v3.0.0 I can download from somewhere and check if it was me changing to V3.0.1, or more likely, that I made a typo in my program without noticing.
I think I have a gremlin in my machine, mysteriously changing my code!
Re: Getting spurious error??
Post by Richard Russell on Sep 3rd, 2015, 08:28am
I pinned the problem down to the program trying to CLS and close a graphics windows I hadn't yet opened. What I don't understand is why it had been working.
Yes, the behaviour on writing to a control that has never been opened has changed. In v3.00 doing that could crash LBB whereas v3.01 reports 'Invalid channel' (although, unhelpfully, without a line number).
So you are right in assuming that it's the change to v3.01 that was responsible for the different behaviour, but it alerted you to a potentially serious fault in your program!
Richard.
Re: Getting spurious error??
Post by Monkfish on Sep 3rd, 2015, 2:49pm