Quote:
Originally Posted by TWELVE
NullReferenceException at Threading.Thread.wrapper()
To get that far (into the internal wrapper method) version 1.4 has checked that your thread sub exists and has called it so I think the problem is in the B4ppc code that is running as a thread. It looks like it is trying to access something that is not there. If you can't find it then post a version of your project that shows the problem and I'll take a look.
That sounds logically, but the same code compiled under 6.30 did not throw this exception.To verify this again, i compiled a version 2 steps back ( the source is definitely in the 6.30 format), but the error still occurs with this older version which is proven to run fine under 6.30.
From my point of view, this can't be an issue of my code, which ran fine this way under 6.30.It might be, that 6.50 was undergoing some changes which made my code now wrong or invalid somehow.At least something has changed under 6.50 and/or in combination with the threading lib.
By the way, the desktop exe is also crashing at the same point.
I placed someThread.FireThreadEvent at certain points within the thread code, also one at the first line of thread code, but none of these gets actually ever called.So i assume, not one line of the thread code is ever executed.
I call the thread this way:
Sub Timer2_Tick
Thread.New1(B4PObject(1))
If Thread.Start("mythread") Then
PrintX("Thread started") <--- appears in the log, then the program crashes
Else
PrintX("Thread NOT started..!")
End If
End Sub
So the thread is started, but crashes immediatly, before it can execute the thread code itself.There's no evidence at all, that the thread is processing only one line of code.
Quote:
I already regret to have upgraded to 6.50, because instead of working further on my project i'm spending time now on chasing errors and exceptions i did not have before
I don't know why you are having problems, I found the upgrade just worked in general, except where I had to modify some of my libraries to cater for the new module naming scheme.
That might be true on the surface, but i also updated my other ( windows-) compiler and i'm facing a couple of issues there as well.It depends on what features is one using, if somebody is not using threading, he can't have issues related to that...
Quote:
so i cannot roll back to 6.30 now.
Have you been naughty and not kept backup copies of older versions of your project?
Unfortunately it looks like you're right.Most likely i did not realize, that 6.50 would change the source format and - furthermore - would autosave my source to 6.50 format.Nevertheless - that's nothing i can roll back anymore.
You possibly could retrograde with some effort but I wouldn't advise it. The upgrade will be better in the long run as you benefit from bug fixes as well as new features.
That's also my point of view, so i never fear to upgrade to newer versions..;-)
There's no way back, upgrade, fix issues and go on.That is what i'm trying now, even though i don't like that at the moment, because i intended to place some minor bug fixes in my source, which i determined on my vacation recently.
Suggestions still very welcomed....
kind regards,
TWELVE
Edit: i removed all code lines from my thread code, except these:
The behaviour remains unchanged, this leads me to the assumption, the thread code itself cannot be the cause?
Edit2: i removed 6.50 and installed 6.30.Then i compiled a source 2 versions back and it ran like a charm.So my bad bad code appears to run fine under 6.30 and threading lib 1.2 ..?
Edit3: i replaced the threading lib 1.2 with 1.4 and my program still runs fine when compiled under 6.30.So this is definitely an B4P 6.50 issue.I can't see what's happening under the hood, but i would say sorry Andrew for blaming your library...!
Edit4: i'm a bit curious..after deinstalling 6.30, deleting all related files and directories, i reinstalled 6.50 and the error is gone now..??? My program code is running as normal as before on desktop and device...?