Subject:
|
NQC and BricxCC problem
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sun, 5 May 2002 14:06:13 GMT
|
Viewed:
|
4063 times
|
| |
| |
Dave (or anyone else who might have an idea),
I'm trying to figure out a problem that a user reported regarding BricxCC
and its interaction with NQC. (I've only tested it against the latest
release of both BricxCC and NQC.) When attempting to compile a program
containing a #pragma init statement and the target is set to RCX2 on some
machines (not on my machine at home running W2K Pro but on my machine at
work - a Dell - running W2K Pro) it dies at the CreateProcess call that
launches NQC with an unhandled exception error.
If I run NQC in a DOS box it appears to function normally. But if the user
has a #pragma init statement that names a function which takes parameters
(which is, I believe, a programming error) the compiler outputs an odd error
message:
# Error: wrong number of parameters
File "<cmdline>" ; line 1
# 2
#
#----------------------------------------------------------
# 1 error during compilation
And in this case, on some machines, I get that unhandled exception error
when I step over the CreateProcess call in BricxCC where it launches NQC.
Normally the error messages all show the name of the file NQC was attempting
to compile, such as "c:\test.nqc" or something like that.
Here's a sample program that crashes NQC if I launch it via BricxCC (and
I've now managed to get it to crash on my development PC at home):
#pragma init Testing
task main()
{
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;
}
void Testing(int x, int a)
{
int z = 2;
int p = 1;
}
If I remove the "int f = 0;" line it does not crash. If I comment out the
#pragma it doesn't crash. If I replace the "(int x, int a)" with "()" it
doesn't crash.
Any ideas?
Thanks,
John Hansen
http://members.aol.com/~johnbinder/bricxcc.htm
|
|
Message has 1 Reply: | | Re: NQC and BricxCC problem
|
| John, The crash is because NQC is trying to print out an error message but doesn't have legitimate information about the lexical location (file, line number, etc) of where the error occurred. The error itself is from the "#pragma init" line - (...) (23 years ago, 5-May-02, to lugnet.robotics.rcx.nqc)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|