View Issue Details

IDProjectCategoryView StatusLast Update
0008472ADK-Xojo-V4RBAPI-waypublic2019-02-28 06:47
ReporterGrant Singleton Assigned ToIvan Smahin  
Status resolvedResolutionfixed 
PlatformINTELOSWindowsOS Version7
Product Version9.0.x 
Target Version9.0.xFixed in Version9.0.x 
Summary0008472: Xojo Plugin Stack Overflow Exception
DescriptionWindows Service Application. Under 8.7.2 all works fine. In 9.0.x after a number of transactions, the app crashes with a 'Stack Overflow Exception' on the DoEvents() command inside my main event loop.
Steps To ReproduceCreate a Xojo Windows Service application with an infinite loop in the run event. Connect to a database before the infinite loop. When in the infinite loop attempt to update records via the api-way. After a number of transactions, the app should crash with a 'Stack Overflow Exception'.
Additional InformationUnable to send source project due to complex interconnectivity and confidentiality of my data source.

Please also update the product version here in Mantis. Unable to choose 9.0.x.
TagsNo tags attached.


Ivan Smahin

Ivan Smahin

2019-02-26 12:25

manager   ~0010671

Can not reproduce it. Just works.

// Run event.

// This is the program//s main execution point

// Note that on Windows, exiting the Run event
// does NOT terminate a service application. The
// service won//t terminate until the Stop event
// occurs. So to be consistent, let//s just call
// quit with our exit code

Valentina.Init( 8*1024*1024, "", "", "" )

dim f as folderitem
dim mDataBase as VDatabase

f = GetFolderItem("db.vdb")
mDataBase = new VDatabase( 1 )
mDataBase.Create( f, 4, 32 * 1024 )

dim tblPerson as VTable
dim fld_short as VShort
dim res as integer

tblPerson = mDatabase.CreateTable( "Person" )
fld_short = tblPerson.CreateShortField( "fld_short" )

tblPerson.Field( "fld_Short" ).value = 1
res = tblPerson.AddRecord()

Dim x As Integer
x = 1
Do Until x = 0
tblPerson.Field( "fld_Short" ).value = 2

Grant Singleton

Grant Singleton

2019-02-27 13:22

reporter   ~0010672

Last edited: 2019-02-27 13:27

Could you try it with a remote database like mine instead of an in memory db?
Something has changed with VDB release 9.0.x because my code works without error in 8.7.2.
Something about a server protocol change? My 8.7.2 client cannot connect to a 9.0.x server. Maybe something there? I had to downgrade my server to 8.7.2 for my 8.7.2 clients to be able to connect.

Also, you don't have a 'DoEvents' statement in that code. Try it with that first!!

I'm using sockets & timers so I must call it so events fire.

Could you please check again.

Many thanks!!

Ivan Smahin

Ivan Smahin

2019-02-28 06:09

manager   ~0010673

It is not "in-memory" but "local disk-based" db.

>> server protocol change
Yes, any v.9.x product requires v.9.x vServer and vice versa (see release notes).
Ivan Smahin

Ivan Smahin

2019-02-28 06:47

manager   ~0010674

Still unable to reproduce, but I guess I know the reason.

New Valentina.YieldMode property. Default state is "true".
If true then we do YieldRunner inside most of V4RB calls for better UI
(no beach balls and "app not responding" state) within long Valentina calls.
You may set it to false in some circumstances like this one.

But note, that most probably, it is not Valentina issue but Xojo's one or yours. Probably you call some deprecated or unacceptable methods like "additional" event loop...

Anyway, "Valentina.YieldMode = false" just after ValentinaInit call should help.
(It will be available in next hotfix build.)

Issue History

Date Modified Username Field Change
2019-02-26 02:44 Grant Singleton New Issue
2019-02-26 12:25 Ivan Smahin Note Added: 0010671
2019-02-27 13:22 Grant Singleton Note Added: 0010672
2019-02-27 13:24 Grant Singleton Note Edited: 0010672
2019-02-27 13:25 Grant Singleton Note Edited: 0010672
2019-02-27 13:26 Grant Singleton Note Edited: 0010672
2019-02-27 13:27 Grant Singleton Note Edited: 0010672
2019-02-28 06:05 Ivan Smahin Product Version => 9.0.x
2019-02-28 06:05 Ivan Smahin Target Version => 9.0.x
2019-02-28 06:09 Ivan Smahin Note Added: 0010673
2019-02-28 06:47 Ivan Smahin Note Added: 0010674
2019-02-28 06:47 Ivan Smahin Status new => resolved
2019-02-28 06:47 Ivan Smahin Fixed in Version => 9.0.x
2019-02-28 06:47 Ivan Smahin Resolution open => fixed
2019-02-28 06:47 Ivan Smahin Assigned To => Ivan Smahin