Author |
Topic: Getting spurious error?? (Read 396 times) |
|
Monkfish
Full Member
member is offline
Gender:
Posts: 104
|
|
Getting spurious error??
« Thread started 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.
|
|
Logged
|
|
|
|
Monkfish
Full Member
member is offline
Gender:
Posts: 104
|
|
Re: Getting spurious error??
« Reply #1 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.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Getting spurious error??
« Reply #2 on: Sep 2nd, 2015, 9:03pm » |
|
on Sep 2nd, 2015, 8:28pm, Monkfish wrote: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.
|
|
|
|
Monkfish
Full Member
member is offline
Gender:
Posts: 104
|
|
Re: Getting spurious error??
« Reply #3 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!
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Getting spurious error??
« Reply #4 on: Sep 3rd, 2015, 08:28am » |
|
on Sep 2nd, 2015, 11:01pm, Monkfish wrote: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.
|
|
Logged
|
|
|
|
Monkfish
Full Member
member is offline
Gender:
Posts: 104
|
|
Re: Getting spurious error??
« Reply #5 on: Sep 3rd, 2015, 2:49pm » |
|
Thanks for telling me. I thought I was going nuts
|
|
Logged
|
|
|
|
|