VServer and launchd

Charles Yeomans charles at declareSub.com
Tue Nov 14 17:02:28 CST 2006


On Nov 13, 2006, at 7:01 PM, Ruslan Zasukhin wrote:

> On 11/14/06 1:20 AM, "Charles Yeomans" <charles at declareSub.com> wrote:
>
>> How lazy of me; I should have searched every example looking for any
>> that might have been updated :) API_way/Records_AddDeleteUpdate.rb
>> does indeed contain some sample code.
>
> Simpler.
>
> EACH example contains that ExampleTools module. EACH.
>
>> But it raises more questions
>> than answers.
>>
>>
>> I need to create a VConnection object.
>> Must I call its Open method before creating a new VDatabase object?
>
> as I remember its optional.
>
> You must call Vconnection.Open() only if you use Vserver class.
> See example Common/Vserver...

I just tried this.  The following code crashes.

   dim connection as new VConnection(Prefs.ServerAddress,  
Prefs.UserName, Prefs.UserPassword)
   dim newDB as VDatabase = new VDatabase(connection)

But this code works.

   dim connection as new VConnection(Prefs.ServerAddress,  
Prefs.UserName, Prefs.UserPassword)
   connection.Open
   dim newDB as VDatabase = new VDatabase(connection)


>
>
>> Once I have created a VDatabase object, do I need to keep a reference
>> to the VConnection object as long as the database is connected?
>
> no
>
>> Must I call VDatabase.Close before calling VConnection.Close?
>
> No, if you have not call Open() explicitly


But it appears I must.


It didn't take long, though, before I encountered error 0x60508,  
ERR_STREAM_EOF, after which it looks like VServer crashed while  
reading a VCursor.  The exception is raised from VBlob.ReadRawData.

Thread 1 Crashed:
0   <<00000000>> 	0xffff07c7 __memcpy + 39 (cpu_capabilities.h:228)
1   libvserver_fat_release.dylib 	0x0064341f  
fbl::PacketRcv::get_BinaryParam(void*, unsigned long) + 51
2   libvserver_fat_release.dylib 	0x005fd2a7  
fbl::VSRV_Gen_FldBlob::I_FldBlob_ReadData_charptr_ulong_handler 
(fbl::I_PacketRcv&, fbl::I_PacketSnd&) + 63
3   libvserver_fat_release.dylib 	0x005fe16d  
fbl::VSRV_Gen_FldBlob::handle_command(fbl::I_PacketRcv&,  
fbl::I_PacketSnd&) + 429
4   libvserver_fat_release.dylib 	0x0063ec76  
VSRV_VText::handle_command(fbl::I_PacketRcv&, fbl::I_PacketSnd&) + 36
5   libvserver_fat_release.dylib 	0x00623630  
VSRV_Client_Handler::handle_input(int) + 682
6   libvserver_fat_release.dylib 	0x0066144b  
ACE_TP_Reactor::dispatch_socket_event(ACE_EH_Dispatch_Info&) + 91
7   libvserver_fat_release.dylib 	0x00662033  
ACE_TP_Reactor::handle_socket_events(int&, ACE_TP_Token_Guard&) + 167
8   libvserver_fat_release.dylib 	0x006621fa  
ACE_TP_Reactor::dispatch_i(ACE_Time_Value*, ACE_TP_Token_Guard&) + 140
9   libvserver_fat_release.dylib 	0x0066227e  
ACE_TP_Reactor::handle_events(ACE_Time_Value*) + 120
10  libvserver_fat_release.dylib 	0x0065fac2  
ACE_Reactor::run_reactor_event_loop(int (*)(ACE_Reactor*)) + 42
11  libvserver_fat_release.dylib 	0x0068aa9e V_Thread_Pool::svc() + 102
12  libvserver_fat_release.dylib 	0x00660920 ACE_Task_Base::svc_run 
(void*) + 58
13  libvserver_fat_release.dylib 	0x0066be57  
ACE_Thread_Adapter::invoke() + 97
14  libSystem.B.dylib            	0x90023d87 _pthread_body + 84

Charles Yeomans





More information about the Valentina mailing list