System.AccessViolationException when trying to execute Example1_makeCall

191 views
Skip to first unread message

nik...@gmail.com

unread,
Jul 11, 2008, 10:15:33 AM7/11/08
to SIPek
Hi to all

i'm trying to execute the Example1_makeCall example, i've downloaded
sipekapps-read-only from the svn, i can build correctly the
application, but when i try to execute a call the debut nofity me this
exception:

System.AccessViolationException

regarding the line:

> int sessionId = dll_makeCall(1, textBox1.Text)

Here there is the backtrace, can you help me please?

Thanks

System.AccessViolationException non è stata gestita
Message="Tentativo di lettura o scrittura della memoria protetta.
Spesso questa condizione indica che altre parti della memoria sono
danneggiate."
Source="pjsipDll"
StackTrace:
in pjsua_call_make_call(Int32 , pj_str_t* , UInt32 , Void* ,
pjsua_msg_data* , Int32* )
in dll_makeCall(Int32 accountId, SByte* uri)
in Example1_makeCall.MakeCallForm.dll_makeCall(Int32 accountId,
String uri)
in Example1_makeCall.MakeCallForm.button1_Click(Object sender,
EventArgs e) in C:\Documents and Settings\nik600\Documenti\Visual
Studio 2005\Projects\sipekapps-read-only\Example1_Click2Dial_pjsipDll
\MakeCallForm.cs:riga 33
in System.Windows.Forms.Control.OnClick(EventArgs e)
in System.Windows.Forms.Button.OnClick(EventArgs e)
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m,
MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
in
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
in
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
in
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
in System.Windows.Forms.Application.Run(Form mainForm)
in Example1_makeCall.Program.Main() in C:\Documents and Settings
\nik600\Documenti\Visual Studio 2005\Projects\sipekapps-read-only
\Example1_Click2Dial_pjsipDll\Program.cs:riga 17
in System.AppDomain._nExecuteAssembly(Assembly assembly,
String[] args)
in System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
in
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
in System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()

Sasa Coh

unread,
Jul 14, 2008, 2:45:49 AM7/14/08
to si...@googlegroups.com
Hi!

I suppose you need openssl libraries. But if you don't want to install openssl you can just replace pjsipdll.dll with pjsipdll_notls.dll. I've just added pjsipdll_notls.dll to the repository. Update sources again.

regards,
sasa

nik...@gmail.com

unread,
Jul 14, 2008, 4:38:06 AM7/14/08
to SIPek
I've found the error!

It was a really stupid error! i was having an instance of SJPhone
running, so probably the bind to port 5060 fails!

(But what an error regarding memory access violation??)

Well thanks for your reply...
Message has been deleted

truli...@gmail.com

unread,
Feb 4, 2016, 1:01:36 PM2/4/16
to SIPek

I am using Sipek in Windows Service, I receive same exception i.e. System.AccessViolationException at CallManager.onUserTransfer, CallManager.onUserRelease, CallManager.onUserTransfer etc.


An unhandled exception of type 'System.AccessViolationException' occurred in SipekSdk.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

having stack trace
   at Sipek.Sip.pjsipCallProxy.dll_serviceReq(Int32 callId, Int32 serviceCode, String destUri)
   at Sipek.Sip.pjsipCallProxy.serviceRequest(Int32 code, String dest)
   at Sipek.Common.CallControl.CIncomingState.xferCall(String number)
   at Sipek.Common.CallControl.CCallManager.onUserTransfer(Int32 session, String number)
   at Call_Service.Phone.CallTransfer(String otherDn, Boolean complete) in D:\Call_Service\Call_Service\Call_Service\Phone.cs:line 529
   at Call_Service.Phone.blindtransferCall(String extension) in D:\Call_Service\Call_Service\Call_Service\Phone.cs:line 564
   at Call_Service.Phone.Do() in D:\Call_Service\Call_Service\Call_Service\Phone.cs:line 1901
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()


When I run the same code in Windows Application no issue faced and things run fine in Windows Application. Can you help me in this regard?
Reply all
Reply to author
Forward
0 new messages