Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB Program constantly crashing - VB

    Well I've made a skype broadcaster:
    Screenshot by Lightshot
    And it works perfectly, like it sends to a few people but then after sending to like 30-100 people, it just crashes.. is there a reason for that? :/ Is there a way to fix it?

    I know, I'm a noob at VB :cry: my first program.

    The code is:

    End Sub
    Dim iSkype As New SKYPE4COMLib.Skype

    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
    iSkype.Attach()
    Dim msg As String = TextBox7.Text
    For Each u As SKYPE4COMLib.User In iSkype.Friends
    iSkype.SendMessage(u.Handle, msg)
    Next


    I've added skypeCOM thingy as a reference too.. .-.

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,928
    Thanks
    46
    Thanked 203 Times in 202 Posts
    Have you run this in debug mode and caught the exception that crashes it? Need to know what that error is.

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    Super Moderator sage45's Avatar
    Join Date
    May 2002
    Posts
    1,064
    Thanks
    0
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by DOPE View Post
    Well I've made a skype broadcaster:
    Screenshot by Lightshot
    And it works perfectly, like it sends to a few people but then after sending to like 30-100 people, it just crashes.. is there a reason for that? :/ Is there a way to fix it?

    I know, I'm a noob at VB :cry: my first program.

    The code is:

    End Sub
    Dim iSkype As New SKYPE4COMLib.Skype

    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
    iSkype.Attach()
    Dim msg As String = TextBox7.Text
    For Each u As SKYPE4COMLib.User In iSkype.Friends
    iSkype.SendMessage(u.Handle, msg)
    Next


    I've added skypeCOM thingy as a reference too.. .-.
    You can get the exception rather easily without crashing the program by using a try..catch

    Code:
    Dim iSkype As New SKYPE4COMLib.Skype
    
    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
    	Try
    		iSkype.Attach
    		Dim msg As String = TextBox7.Text
    		For Each u As SKYPE4COMLib.User In iSkype.Friends
    			iSkype.SendMessage(u.Handle, msg)
    		Next
    	Catch ex As Exception
    		MessageBox.Show(String.Format("An exception was reported: {0}Exception:  {1}{0}Source:  {2}{0}Message: {3}", Environment.NewLine, ex, ex.Source, ex.Message))
    	End Try
    End Sub
    HTH,

    -saige-
    HTML & CSS Forum Moderator

    "If you don't know what you think you know, then what do you know."
    R.I.P. Derrick Thomas #58
    1/1/1967 - 2/8/2000

  • #4
    New Coder
    Join Date
    Aug 2014
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here are a couple of things to try/consider:

    1) Have you checked the Windows application log to see if you can get a more explicit error message?

    2) Try commenting out as much initialization code as possible to narrow down your problem. To me, it sounds very much like an environmental dependency, but you want to eliminate your code first.

    3) What differences are there between your machine and others? Do you have libraries on your DEV machine that are required for runtime (like the VB runtime)?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •