please note line 152
the arrow marks the current line in the debugger.
the locals pane shows something a little crazy.
hassubs, nosubs are both false.
kind of amusing, and maybe rare so I'm sharing with you.
What do you make of it?
(and what should my next step be? )
kobi
Forums
crazy?
7 posts
• Page 1 of 1
Re: crazy?
Could be a bug in the Mono debugger. What does "trace nosubs" show as the value?
- nerdzero
- Posts: 286
- Location: Chicago, IL
Re: crazy?
it states:
trace: hassubs=false
- nosubs=false
- at GardenController.cobra:153
- in GardenController<of>.vc_check
- subclass GardenController`1
When I compiled monodevelop, I compiled mono from a git source, though I assume that such a fundamental logic error would show itself previously.
I guess I have to accept that reality is not logical hehe this episode is kind of strange to me.
trace: hassubs=false
- nosubs=false
- at GardenController.cobra:153
- in GardenController<of>.vc_check
- subclass GardenController`1
When I compiled monodevelop, I compiled mono from a git source, though I assume that such a fundamental logic error would show itself previously.
I guess I have to accept that reality is not logical hehe this episode is kind of strange to me.
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
Truth, Compassion, Forbearance is Good.
- kobi7
- Posts: 82
- Location: Israel
Re: crazy?
how shall we ever get to the bottom of it?
care to test the code? I can send you the source if you promise not to peek. hehe just kidding
joined debug session?
leave your email address, or send an email to me: kobi2187@gmail.com
I can zip it all, and put somewhere.
care to test the code? I can send you the source if you promise not to peek. hehe just kidding
joined debug session?
leave your email address, or send an email to me: kobi2187@gmail.com
I can zip it all, and put somewhere.
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
Truth, Compassion, Forbearance is Good.
- kobi7
- Posts: 82
- Location: Israel
a short update
nerdzero dexterously found the problem, and a bug report was filed #359
it had to do with nilable values that were not nil, regarded as true, no matter what the value inside actually is (which in this case was 'false')
came about when using dynamic? (or Object? I'm not sure) from an external library. (I just forgot to state the result type of a boolean getter)
any truth value that if accepts is probably susceptible here.
it had to do with nilable values that were not nil, regarded as true, no matter what the value inside actually is (which in this case was 'false')
came about when using dynamic? (or Object? I'm not sure) from an external library. (I just forgot to state the result type of a boolean getter)
any truth value that if accepts is probably susceptible here.
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
Truth, Compassion, Forbearance is Good.
- kobi7
- Posts: 82
- Location: Israel
Re: crazy?
It comes down to assuming the action on a short cut notation conditional test ( for a nilable Object or nilable Dynamic type from a library)
and/or not explicitly typing your getters .
( not helped by the doc/wiki being silent on that exact case).
If either the test was explicitly expanded, the item correctly cast or the getter was explicitly typed you would have been fine
If its declared (explicitly or implicitly ) as nilable (Object/Dynamic) and not cast to the underlying type for an implicit truth test.
You can often see some light from problems such as these by looking at the generated C# code ( -kif option to compiler keeps the intermediate files around after compilation x.cobra -> x.cobra.cs) .
Alternatively and perhaps easier the ct_trace statement tells the compiler to emit some info about a variable as it goes through the various compiler stages, working out what it is, what interim type, final type, etc..
The output may be a little unintelligible to understand at first pass. (ctTrace)
and/or not explicitly typing your getters .
( not helped by the doc/wiki being silent on that exact case).
If either the test was explicitly expanded, the item correctly cast or the getter was explicitly typed you would have been fine
any truth value that if accepts is probably susceptible here.
If its declared (explicitly or implicitly ) as nilable (Object/Dynamic) and not cast to the underlying type for an implicit truth test.
You can often see some light from problems such as these by looking at the generated C# code ( -kif option to compiler keeps the intermediate files around after compilation x.cobra -> x.cobra.cs) .
Alternatively and perhaps easier the ct_trace statement tells the compiler to emit some info about a variable as it goes through the various compiler stages, working out what it is, what interim type, final type, etc..
ct_trace hassubs
The output may be a little unintelligible to understand at first pass. (ctTrace)
- hopscc
- Posts: 632
- Location: New Plymouth, Taranaki, New Zealand
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 27 guests