On Monday, 28 March 2016 at 21:01:19 UTC, cy wrote:
I finally found the null pointer. It took a week. I was
assigning "db = db" when I should have been assigning "this.db
= db". Terrible, I know. But...
I invoked db.find_chapter.bindAll(8,4), when db was a null
pointer. There was no null
Am Tue, 29 Mar 2016 06:00:32 +
schrieb cy :
> struct Database {
>string derp;
>Statement prepare(string s) {
> return Statement(1234);
>}
> }
>
> struct Statement {
>int member;
>void bind(int column, int value) {
> import std.stdio;
>
On 03/29/2016 11:57 AM, cy wrote:
> On Tuesday, 29 March 2016 at 06:21:49 UTC, Ali Çehreli wrote:
>> parent.prep.bind is translated to the following by the compiler:
>>
>> "Call bind() for the object at address... let's calculate... Wherever
>> parent is, we should add the offset of prep inside
On Tuesday, 29 March 2016 at 06:21:49 UTC, Ali Çehreli wrote:
parent.prep.bind is translated to the following by the compiler:
"Call bind() for the object at address... let's calculate...
Wherever parent is, we should add the offset of prep inside
that object."
Okay, that's helpful
On 03/28/2016 11:00 PM, cy wrote:
> struct Database {
>string derp;
>Statement prepare(string s) {
> return Statement(1234);
>}
> }
>
> struct Statement {
>int member;
>void bind(int column, int value) {
> import std.stdio;
> writeln("derp",member);
Change
On Monday, 28 March 2016 at 21:24:48 UTC, Adam D. Ruppe wrote:
If it didn't give the error, either you swallowed it or you
didn't actually dereference null.
Okay, so it's not actually supposed to happen. Hopefully it's
something I did wrong...
What is the db library you are using? Did you
On Monday, 28 March 2016 at 21:01:19 UTC, cy wrote:
No exception raised for dereferencing a null.
If it didn't give the error, either you swallowed it or you
didn't actually dereference null.
The latter is a kinda strange happenstance, but if you are
calling a static or final method on an
On Monday, 28 March 2016 at 21:01:19 UTC, cy wrote:
I invoked db.find_chapter.bindAll(8,4), when db was a null
pointer.
No, no, no it's worse than that. What I did was (db.)find_chapter
= (db.)backend.prepare("...") when backend was null, and got no
error. find_chapter was garbage of course,
I finally found the null pointer. It took a week. I was assigning
"db = db" when I should have been assigning "this.db = db".
Terrible, I know. But...
I invoked db.find_chapter.bindAll(8,4), when db was a null
pointer. There was no null pointer error. No exception raised for
dereferencing a