on 2006 Apr 07 2:27 PM
In regards to the post below: I mistakenly posted this as a reply to another issue that I thought was the same as mine. I know now that it isn't so I'm putting it here as a separate thread. Frank Moebius responded to the problem (in quotes) which I've reproduced at the very end of this post.
What follows immediately below is my response to his question/idea:
I am using .NET, but given that this problem started with the installation of Business One 2005, I'm guessing that it is not a GC issue. I know very little about GC, but my oCompany.Disconnect is on my form closing event handler, so I issued a "gc.collect" (vb) right below the disconnect and through debugging I can see that this procedure runs successfully. The memory error pops up later. I don't know if this proves anything, but I hope it helps. Every program we have is crashing when it is ended!
Thanks Again
Original Message:
"Hi Frank,
I can be more specific about the memory problem (or at least one that sounds exactly like the one reported).
We just upgraded to 2005 and I'm using the new DLL.
I have only a few programs and I went in and changed them to use the new DLL.
Most of them go to sbo-common for the db list & let the user select one.
If they connect to a DB then every thing is fine until they end the program and then I get a message that says "Memory could not be read (it lists this address: 0x0594c340).
If you don't connect to a DB then just end the program, it doesn't blow up.
I've written a new program too and the same thing happens.
Very troublesome for users.
I am issuing ocompany.disconnect before closing (debugged this & it goes past this line of code and the error occurs later)."
Hi,
I have exactly the same problem here. Did you find a solution for the problem, yet?
Thanks,
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We use to had same problem here (SBO 2004). This take us long, but we finally found that a strange issue was causing that. In the SBO server, we had a client installed too. In the SQL Server and SBO Database selection form we use to had "(local)" as the server name. We change this to the server´s name, and everything go OK. Even on the client machine where we use to have the SBO Client.
Our final conclusion was that "(local)" was causing somekind of IP confusion (It was a complex domain), and the AddOns get crashed.
I don´t really know if it is the same problem, but we spent too much time to solve this, and I hope you don´t have to.
Hope helps,
Ibai Peñ
DOH! I am embarrassed because I did get an answer (a work around) from SAP & forgot to pass it on. It has solved my problem and is quite simple.
'oCompany.Disconnect()
System.Runtime.InteropServices.Marshal.ReleaseComObject(oCompany)
oCompany = Nothing
Notice - when terminating your add on, DON't do ocompany.disconnect & DO set ocompany to nothing. I left the ReleaseComObject in there (which I tried before I got the answer) but I don'tknow if it's necessary or even a good idea.
User | Count |
---|---|
105 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.