Different between Debug and Release in VS2017

This forum is meant for questions and discussions about the X# language and tools
Frank Müßner
Posts: 280
Joined: Sat Dec 12, 2015 2:22 pm
Location: Germany

Different between Debug and Release in VS2017

Post by Frank Müßner »

Hi Chris, Hi Wolfgang,

I have found it!! :-)

See Picture
xs1.gif
xs1.gif (9.57 KiB) Viewed 225 times

SqlDB is True !!

but

Do While ! SqlDB:Eof
Server:=SqlDB:FIELDGET(#pgserverip) -> there the crash
ENDDO

will called.
And then this Error. That is only in Release Version is coincidence, because coincidence. I can reproduce this with Debug Version.

Strange. And Intellisense is not more active, again.

Frank
User avatar
Chris
Posts: 4936
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Different between Debug and Release in VS2017

Post by Chris »

Hi Frank,

So what happens when you step over this line, an error message with the exact exception information should pop up.

Btw, there is a possibility that the highlighted in yellow color line of code is not really executed, in some cases the debugger shows one line below or above the actual line (this is in our todo list to fix). Please change the code like this:

Do While ! SqlDB:Eof
local dummy as int
dummy := 1
dummy += dummy
? dummy
Server:=SqlDB:FIELDGET(#pgserverip) -> there the crash
ENDDO

and step over the code again, does it stop again in the fieldget() line, even when SqlDB:Eof == true?

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Frank Müßner
Posts: 280
Joined: Sat Dec 12, 2015 2:22 pm
Location: Germany

Different between Debug and Release in VS2017

Post by Frank Müßner »

Hi Chris,

the Error after this Call is:
error1.png
error1.png (72.41 KiB) Viewed 225 times

See the different values in Debugger:
error2.png
error2.png (102.31 KiB) Viewed 225 times

Solution is to call SqlDB:gotop() after the Select. I don´t know if this is only with SqlSelect.


Frank
Post Reply