[VAPP] crash on ask for 'db names'

Kurt Klamp K.Klamp at t-online.de
Fri Jul 25 20:06:47 CDT 2003


Hi Ruslan,
that's very mysterious. Each day when i start my comp, id do a test run
with this command (if the 'bug' is still there). Always the same
behaviour -> Vapp crash


Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:
> 
> Hi Kurt,
> 
> It is strange, but I DO NOT get crashes.
> I have try on both RELEASE version and DEBUG version.
> With CodeWarrior and without codeWarrior debugger.
> 
> 1) When I uncomment that lines which must crash me,
> I simply get error dialog with some 17xx code and words that app cannot
> convert something to something. This is in the ERROR handler at the end of
> script.

What i get to see in event log window is :
        ...
        display dialog "error:Valentina PPC got an error: AppleEvent
timed out.
        Number:-1712" buttons {"OK"} default button 1
        --> AppleEvent timed out.
        ...
after waiting til end of time out. And the Finder tells me that Vapp was
quit because of Error 15. 

> 2) I also have try 1.9.7 RELEASE on your script, it produce 100% the same
> result.
> 
> 3) I don't know how this works for you, but for me the last line here fails
> 
> > on Create()
> > try
> > tell application "Valentina PPC"
> > 
> > --name of databases -- 2. FOR TEST UNCOMMENT THIS LINE  in second run !!
> > 
> > activate
> > 
> > set dbfile to choose file name with prompt "New database file" default name
> > "testdb"
> > set theDB to make new database with data file dbfile
>                                         ^^^^^^^^^^^^^^^^
> 
> I see in the log something as
> 
>       make new database with data file (file "path")
>                                  ^^^^^^^^^^^^^^^ 2 times path.

the property dbpath is a string variable with the path to the db. So
what's wrong? Wait , i see ther is a wrong order in code

                set theDB to make new database with data file dbfile
                set dbfile to dbfile as string
must be 
                set dbfile to dbfile as string
                set theDB to make new database with data file dbfile
then its ok

> 
> I do not have never such code in example scripts.
> In examples present
> 
>     set theDB to make new database with data file "dbtest"
>                                                   ^^^^^^^^ just name
> 
> 
> So I wonder how this script works on your computer ???

it does without problem ; NO ERROR ; and db and tables are created
correctly.

> A lots of wonder...

More and more i'm convinced that i've a very special  machine ;=)

> 
> 4) by my source 'name of databases' with no open dbs should produce
> exception. I.e. Some error. And this is what I see on my computer.

But much more better was to return an empty list. This is afaik the
standard behaviour in AS. If i ask for a list (get every elemnt ...) i
get a list even there is no element. 

> 
> 
> 5) with your SQL test, I also get simply error, as  expected.

Can there be done anything else to clarify the mystery?

I suggest to change the return value to list even if there are no
elements. And if this does not workds either, then there is still the
workaround first to ask for the number of dbs and after that asking for
the names.

This is surely not the most important thing. But would be nice if its
ok.

More important is the sql thing. See more next mail.



Best,
Kurt


More information about the Valentina mailing list