View Issue Details

IDProjectCategoryView StatusLast Update
0005645ADK-V4REVAPIpublic2012-03-07 07:29
ReporterbjdevlinAssigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version4.9 
Target VersionFixed in Version4.9 
Summary0005645: binding with an array of values crashes revolution
DescriptionLivecode/Revolution 4.6.3
OS X 10.6.8
V4REV 4.8

Those are the versions I was working with when I experienced the crashing. However, I downloaded V4REV 4.9.1 and Livecode 5.0 to see if something had changed between V4REV 4.8 and now to address this crash at the interface of the two programs. So, reporting this against 4.9 so that you know it is a bug in your currently shipping version.

Valentina causes Livecode to crash on SQL insert statements using variable binding with a Livecode array. I'm not sure where this defect was introduced (I presume it is to do with changes to the Livecode externals API or the multi-dimensional array structure).

I was using Trevor DeVore's SqlYoga library when the crash first happened, which means that this defect in Valentina has repercussions for the most common ways in which Livecode users will be accessing Valentina databases (I think that SqlYoga only uses bound parameters).

To verify that this problem was extraneous to my coding and extraneous to Sql Yoga, I used the Paradigma-provided example stack: " V4REV_4/Examples/SQL_way/Bind/Bind.vdb".

This Bind.vdb example crashes as soon as one clicks on any of its buttons to make calls to the database.

Excerpts from crash logs from Valentina & Livecode supplied below as "Additional Information"
Additional Information
Here are the contents of the Valentina log just prior to the crash.
==================================================
VDatabase_Create...
    PARAM: dbRef = "418959008"
    PARAM: inStrPath = "/Users/username/Paradigma Software/V4REV_4/Examples/SQL_way/Bind/Bind.vdb"
    PARAM: inEnumMode = "kDscDatBlbInd"
    PARAM: inSegmentSize = "32768"
    PARAM: inEnumOs = "kOsDefault"
    PARAM: Location = "/Users/superbd/Paradigma Software/V4REV_4/Examples/SQL_way/Bind/Bind.vdb"
return

VDatabase_SqlExecute...
    PARAM: dbRef = "418959008"
    PARAM: inStrCommand = "CREATE TABLE T1( fld_string String(40), fld_long Long, fld_float Float )"
return res = 0

VDatabase_SqlExecute...
    PARAM: dbRef = "418959008"
    PARAM: inStrCommand = "insert into T1 ( fld_string, fld_long, fld_float ) values( :1, :2, :3 )"

[end of valentina log at crash point]





Here is the start of the Livecode crash log:
=================================

Process: LiveCode [16647]
Path: /Applications/LiveCode 4.6.3.app/Contents/MacOS/LiveCode
Identifier: com.runrev.livecode
Version: 4.6.3.1445 (4.6.3.1445)
Code Type: X86 (Native)
Parent Process: launchd [182]

Date/Time: 2011-12-09 23:33:55.236 +0000
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 com.runrev.livecode 0x00204f86 MCVariableArray::getkeys(char**, unsigned int) + 70
1 com.runrev.livecode 0x000a684c get_array(char const*, char const*, char const*, int*) + 572
2 com.paradigmasoft.v4rev 0x16aac897 GetArray + 78
3 com.paradigmasoft.v4rev 0x16aa9681 GetRevArray(char*, int&, bool*&) + 49
4 com.paradigmasoft.v4rev 0x16a72732 BuildArrayOfBinds(char*, fbl::smart_ptr<fbl::I_Database>) + 40
5 com.paradigmasoft.v4rev 0x16a7393b VDatabase_SqlExecute(char**, int, char**, int*, int*) + 271
6 com.paradigmasoft.v4rev 0x16a99d8a void ExternalWrapper<&(VDatabase_SqlExecute(char**, int, char**, int*, int*))>(char**, int, char**, int*, int*) + 66
7 com.runrev.livecode 0x000a705e MCExternalV0::Handle(MCObject*, Handler_type, MCString const&, MCParameter*, unsigned char) + 446
8 com.runrev.livecode 0x001dd291 MCStack::call_external(Handler_type, MCString const&, MCParameter*, unsigned char) + 113
9 com.runrev.livecode 0x001dd919 MCStack::handle(Handler_type, MCString const&, MCParameter*, MCObject*) + 329
10 com.runrev.livecode 0x001dd8b1 MCStack::handle(Handler_type, MCString const&, MCParameter*, MCObject*) + 225
11 com.runrev.livecode 0x0004454d MCCard::handle(Handler_type, MCString const&, MCParameter*, MCObject*) + 397

[end of Livecode crash log excerpt]
TagsNo tags attached.

Activities

Ruslan Zasukhin

Ruslan Zasukhin

2011-12-15 19:24

administrator   ~0006138

I have read report...

Try the same example against Revolution 3.5 which still on my MAC,
And all works fine ...

No crash ...

I am attaching picture as proof into mantis
Ruslan Zasukhin

Ruslan Zasukhin

2011-12-15 19:25

administrator  

Screen Shot 2011-12-15 at 9.22.35 PM.png (62,368 bytes)
Ruslan Zasukhin

Ruslan Zasukhin

2011-12-16 10:12

administrator   ~0006139

On 12/16/11 1:14 AM, "Bernard Devlin" <bdrunrev@gmail.com> wrote:

Hi Bernard,

I have test our latest SVN/trunc build
Against LivCode 5.0.2 -- Example Bind.

and also again works ... No crashes.
Click by all 9 buttons step by step.


==========
So I wonder now ... Seems to be some mess on your computer.

May be try trash
    /usr/local/lib/vcomponents

Trash
    Documents/My LiveCode folder


Install V4REV 4.9.1

Do not forget the second step of installation -> rev project
    which creates folder
        Documents/My LiveCode


Run Livecode,
Open V4REV/Examples/SQL_way/Bind/bind.rev


It works for me. Using old REV 3.5 and new LiveCode 5.0.2 MAC.

Please check this.
bjdevlin

bjdevlin

2011-12-16 15:27

reporter   ~0006142

After uninstalling and re-installing v4.8 and v.4.9.1, I can definitively say that the problem is only with 4.8. Please feel free to close this bug. All I can assume is that in my initial test using 4.9.1 before submitting this bug report, I had not fully uninstalled v.4.8.

Issue History

Date Modified Username Field Change
2011-12-10 11:29 bjdevlin New Issue
2011-12-15 19:24 Ruslan Zasukhin Note Added: 0006138
2011-12-15 19:25 Ruslan Zasukhin File Added: Screen Shot 2011-12-15 at 9.22.35 PM.png
2011-12-16 10:12 Ruslan Zasukhin Note Added: 0006139
2011-12-16 15:27 bjdevlin Note Added: 0006142
2012-03-07 07:29 Ruslan Zasukhin Status new => closed
2012-03-07 07:29 Ruslan Zasukhin Resolution open => fixed
2012-03-07 07:29 Ruslan Zasukhin Fixed in Version => 4.9