Announcement

Collapse
No announcement yet.

RE: [meu] Bug In Miva Engine or just Scripting Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RE: [meu] Bug In Miva Engine or just Scripting Error



    I believe Darren's post went misunderstood or misinterpreted. There are
    certainly many bugs in diverse versions of Miva Empresa, that can cause the
    engine to crash, but Darren is not a newbie that he wouldn't know that.
    Darren reported himself some of them that passed through this list. He would
    be easily able to work around the bugs. Darren's point was that in Miva
    Script there is no way to programmatically cause the engine to crash through
    bad or too resource intensive coding. If it happens, it is Empresa who
    failed, not the script.

    Certainly, Miva Script can be written poorly, insecure, inefficient, slow,
    resource-hungry, but that's still not a reason for the Empresa to crash.
    Unlike at other languages, Miva Script _syntax_ does not let any possibility
    to crash the engine deliberately, whatever you try to write. Other languages
    can be crushed for example through improper use of pointers, (like Darren
    mentioned), or direct memory, IRQ or BIOS operations in many other
    languages), but there is nothing like that that could not be handled by
    Empresa.

    So yes, you can crash Empresa, but only through hitting an Empresa bug. If
    Empresa does not handle exceptions like low memory cleanly, it is certainly
    not a fault of the concerned Miva Script. Sure, it is better to write
    applications using as few resources as possible, but if they need more, the
    engine must either response with an error, or process them. If it crashes,
    it is an Empresa bug, not a Miva Script bug.

    Not to blame solely Miva Empresa, the fault may be also in layers below it
    (Web server, C libraries, OS, BIOS). Especially if the problem happens
    exclusively on certain platforms, there is some chance the bug is not in
    Empresa but rather elsewhere. Honestly told, I would rather expect the
    problem at the specific Empresa build in such case, though :)

    Ivo Truxa

    | http://miva.truxoft.com
    | Advanced Miva Merchant modules







    -----Original Message-----
    From: Scott McC

    It is possible (or at least was) to crash the engine using
    just MivaScript. I haven't run across anything lately that
    would crash it, but I'm sure bugs are still out there.

    One example I came across (and mind you this was 2-3 years
    ago so I forgot all the fine details) was in <MvDO>. It has
    to deal with trying to <MvDO> a function in the file you're
    running. So if you were running main.mv and tried to:
    <MvDO FILE="main.mv" NAME="l.date"
    VALUE="{showdate(s.time_t)}">
    it would cause a crash. There were other factors involved
    but that was the crux.

    Another dealt with nested functions where one was a
    built-in and one was user defined. So something like:
    <MvEVAL EXPR="{ gettoken(get_username(users.d.name), " ",
    1) }"> Once again, I think there was one other factor
    involved but it escapes me.

    These were offical "Scott Bugs". Stuff that only I could
    have found due to odd programming habits and dumb luck.

    So yes, it is/was possible to crash the engine using
    nothing but correctly written MivaScript. Now it's just a
    matter of tracking down what your scripts are doing and
    reducing it down to reach the one line of code that's
    causing headaches.

    /ScottMc

    --- Ben Walsh <[email protected]> wrote:

    > Darren,
    >
    > I assume you're using uncompiled? I had some issues with
    > the engine crashing
    > because of my code; however I don't remember exactly what
    > caused it (I think
    > it might have been a loop or something, don't know). I'll
    > see if I can find
    > any example.
    >
    > I've been using the VM ever since it came out, so I don't
    > use uncompiled any
    > more. Haven't had those problems since the old empresa
    > days.
    >
    > But I know that bad code CAN cause the engine to crash
    > (of course it doesn't
    > mean that is the problem).
    >
    > HTH,
    >
    > Ben
    >
    > -----Original Message-----
    > From: [email protected]
    > [mailto:[email protected]] On Behalf
    > Of Darren
    > Sent: Thursday, January 20, 2005 11:52 AM
    > To: [email protected]; [email protected];
    > [email protected]
    > Subject: [meu] Bug In Miva Engine or just Scripting Error
    >
    > I'm getting sick and tired of having my scripts being
    > blamed for crashes in
    > the Miva Empresa for Windows engine.
    >
    > Can ANYONE show me any MivaScript that when coded
    > improperly should cause
    > the engine to crash? Obviously, there must be SOMETHING
    > that I'm doing in
    > my MivaScript that regularly can cause the Miva Engine to
    > crash (at least
    > the Windows version), and is documented somewhere as
    > being something NOT to
    > do.....but I cannot find anything listed anywhere.
    >
    > I know in C/C++ you have pointers....lots of room to do
    > things wrong and
    > crash, but I just cannot find any such language
    > constructs in MivaScript.
    > But, since Miva Support and Development Staff continually
    > "pass-the-buck" by
    > blaming me, I thought I would finally solicit information
    > from other
    > MivaScripts users...because obviously I'm missing
    > something here.
    >
    > Thanks for your time.
    >
    > Darren Ehlers
    > OpenUI Developer Consortium
    > <A HREF ="http://www.openui.org/ ">http://www.openui.org/ </A>
    >
    >
    >
    >
Working...
X