Did I go nuts? Plz help!

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Did I go nuts? Plz help!

Post by AxWald » Thu May 15, 2014 4:01 pm

Hi,

seems I have a problem. Have a stack that worked for months. Did a small change (not related to what comes now), and it doesn't work anymore, suddenly.

It may be this is because I tried new version in between, can anybody maybe confirm?
The 6.6 versions didn't really work on my Win7-64, so I switched back to 6.5.2.

In the debugger:

Code: Select all

      set the itemdelimiter to ","           --just to be sure, added it for safety
      put xtractPref(AUTU) into Var1             -- a function, returns "Jane,Joe"
      put puser into Var2                             -- a var, is "Joe"

      if pUser is among the items of Var1 then                  -- let's test now
            return true                                                   -- a known Username
      else return false                                                  -- not known
It always returns false.

Same code in a new stack works:

Code: Select all

   ask "A name plz:"
   if it is among the items of "Joe,Jane" then
      answer "OK"
   else
      answer "Wrong!"
   end if
It returns "true" as long as "Joe" or "Jane" is entered.

Am I getting crazy? Will this be the end of world as we know it? Any ideas?

Kind regards, Axel

Edit: Is it maybe a result of the new UTF support, and how can get I rid of it?

I reinstalled old .exe & stack files. No success.
I fell back to an age old .sqlite. No success.
Does the IDE, when installed, plant some .dlls on a machine (outside program directory)?
That then will be called by even StandAlones (and stacksInUse)?

To be honest, I feel rather [censored].
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Did I go nuts? Plz help!

Post by dunbarx » Thu May 15, 2014 5:42 pm

Hi.

I see the top code snippet is part of a function. I made it into a handler so i could test, explicitly using "Joe" where variable references were originally.

Works fine, as it ought to.

So if this really is version related, please file a report, and include the handler (or stack)

Craig Newman

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Did I go nuts? Plz help!

Post by AxWald » Thu May 15, 2014 6:53 pm

Hi, and thx for reply!

Yup, parts of the code works 1a when copied to a new stack. It's no strange code after all, just a simple string comparsion.

But when used in my project (a standalone with an in-use stack), it borks. Reliably.

1.) I saved both stacks with other names, using LC 6.5.2 again.
2.) I wrote test functions in this stack, like:

Code: Select all

 if MyChar is not "A" then
      answer "Wrong!"
      return false
   else
      answer "True!"
      return true
   end if
and they work like a charm. It's the old code that borks, it seems.

There I get "wrong" by simple string comparisons like:
Is "Joe" in the items of "Joe,Jane"?
(with "," as itemdelim, for sure)

I'll try to copy the stack scripts over to new stacks (there's nothing but stack scripts ...). Hope this will do the job. No, it don't do.

Or you better run and hide. I'll go to bed now, phone canceled, tired as hell, and desperate.

What did LC to me, and what param do I have to change to get it working again?

Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Did I go nuts? Plz help!

Post by AxWald » Thu May 15, 2014 7:31 pm

Additionally,

when I get function results in the form [Value1,Value2] it seems that only the first one is available now.

So I ask for:

get usrhandler(axwald,d1e0cb1a0d3b0f8079a53342215027105e41cca3)

Function usrhandler, when invoked with debugger, shows only "axwald" as argument passed ...

How do I get rid of this madness?

Axel

Edit: All this worked a few days before, before I made the mistake to install 6.6 versions - I only changed a tiny bit of code containing a SQL query ( put "SELECT ... into MyStr") ...
And on the server, where there's a .exe as service with a .livecode in use, it's broken too, no matter what old versions I start. Obviously the IDE installs some dlls that do the chaos. What, where, how to get rid of, please?

With a customer whining aloud every 10 minutes, with a website left without data, with a developer wondering why simple string comparisons don't work anymore in certain circumstances, with web customers bombarding us with error reports, I can only call for help now.

Bug reporting (with proper checking of circumstances) will be made later. For now, I need to have it in a working condition again.
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3999
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Did I go nuts? Plz help!

Post by bn » Thu May 15, 2014 8:15 pm

Hi AxWald,

you clearly describe your misery but you don't give enough information to help you.

Why don't you post a simplified sample that contains test data and does not work for you. That way we could see which part is not working and maybe why.
I tried to rebuild code from your examples, but that all works as Craig already pointed out.

Just start with sample data you get from your query, put that into a variable (did you check your data that you get from the query is ok?) and the core of the code how you proceed.

All this in a way that should function but does not, not just snippets of code from somewhere out of context.

Kind regards

Bernd

PS Mind you, if you have a timeline and this is "for money software" you could always ask Runrev for an incident (which will cost you).

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Did I go nuts? Plz help!

Post by dunbarx » Thu May 15, 2014 8:20 pm

In the top snippet, is "AUTU" a variable name? If so, it rightly does not want quotes. Otherwise...

If you step into (not over) the function call, do all the child parameters look OK?

Craig

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Did I go nuts? Plz help!

Post by AxWald » Thu May 15, 2014 9:05 pm

Hi,

problem is:

If I copy out single functions/ commands into new stacks, they work well. As long as I have them in the old "program", they fail with simple string comparisons, and only partially transmitted parameters - even if I do a "save as" before, and use the new versions.

And on my server, even known good old versions now have this - versions, that ran for long time before, and that never was changed!

Thus my question - is there maybe something installed with the IDE that influences StandAlones? Must be something like this - why would a known good version (exe + stack-in-use, that has worked for months) suddenly doesn't work anymore, all of a sudden? Only after I installed a new IDE ...


For sure, I'm ready to post the whole code, it's GPL after all. Maybe I need some more posts to have the permission to post an URL? Anyways, for a working demo I need to clear some more personal data. I'll come back to you.

Thanks a lot for any help!

Edit:

"AUTU" is a parameter for a call to my preferences handler function. It used to work this way for ages ...
And I have checked every single variable double at least, when debugging.
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Did I go nuts? Plz help!

Post by AxWald » Fri May 16, 2014 12:19 pm

Hi all,

Case solved. 2 Problems found:

1.) At a certain, important, but well hidden spot in the code the specification of the path for revOpenDatabase() wasn't adjusted after a change. But this wasn't the main problem - it only prohibited to use a web shop ... Much worse:

2.) My testclient (that I used because I couldn't log in via the web site ...) had sneaked in a Chr(10) after each parameter ... Try to find such in the IDE while debugging! Only after I charToNum'med all and any parameters I found it.

Shame on me! 24h of hunting bugs for such a silly mistake ...
Thanks so much to all that tried to help me!


Maybe, as a thank you, I can describe the software, and what it does actually:

It's a SocketServer, running as a faceless service on a Win2K3 server. Consisting of a standalone, a library stack (that does all of the work), and a .prefs file as well as an sqlite database.

A shop site (its PHP code actually) queries this socket server for user logins, article data (with customer specific prices ...) and such stuff, and sends the orders back to the socket server. Which then creates EMails to accept/ decline these orders, including links to special pages ("Click here to accept this order" ...).
When such an "accept page" is visited, the socket server gets notice, and creates an order in the SQLite database.
Which then is processed using a special Access front-end for further fun ...

Why all this?
Well, for the customer it's important that the data are secure. Different customers have different prices, and there must be no way that they know of the other customers prices! So no prices are displayed on the shop but in mouse-over tool-tips :)
Then, I'm conservative. I don't trust any database that isn't in my local network, protected by any means possible there. Just another little bug in PHP and all the juicy data of my web-MySQL are elsewhere ...

This project is based on the work of JGonz (http://forums.runrev.com/viewtopic.php?f=7&t=18841), and is GPL. As soon as I'm done cleaning up the code I'll post an URL here.

Have fun, all, and a good time!

Axel
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”