Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Crash VB6 IDE when close app
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crash VB6 IDE when close app

 Post Reply Post Reply
Author
Message
Stribor View Drop Down
Newbie
Newbie


Joined: 11 August 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stribor Quote  Post ReplyReply Direct Link To This Post Topic: Crash VB6 IDE when close app
    Posted: 11 August 2006 at 2:55pm
Hello!!
 
When I add DockingPane and CommandBars control in a MDIForm and run it and then close the MDI, VB6 IDE crash.
 
Help!!!! 
 
I have WinXP, VB6 (SP6), Xtreme Suite 10.1.
 
 
Back to Top
Stribor View Drop Down
Newbie
Newbie


Joined: 11 August 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stribor Quote  Post ReplyReply Direct Link To This Post Posted: 14 August 2006 at 8:35am
Solution:
 
Private Sub MDIForm_Load()
DockingPane1.SetCommandBars Me.CommandBars
End Sub
 

Back to Top
JSram View Drop Down
Groupie
Groupie


Joined: 22 October 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote JSram Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2006 at 11:24am
I had a similar problem, but not same solution as I don't have any commandbars in this case.

using 10.3.1 in a SDI app open a second form with a PaneManager, changing the state of Pane (from pinned to colapsed in this case), closing the form, causing VB6 IDE to crash when the Main form and app closes and other open forms are unloaded.

In this case it's the form loaded by the Pane that causes the crash when unloaded. However, doing the same procedure but not changing the pane state avoids the crash.

The solution (it appears) is to use LoadState and SaveState, although I can't find anything saying this is mandatory, although it appears to be.

Back to Top
JSram View Drop Down
Groupie
Groupie


Joined: 22 October 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote JSram Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2006 at 11:36am
I made my conclusion too early, it crashes anyhow! But ONLY if I change state of my pane. I only have one so it's a pretty simple scenario. Have to investigate more...
Back to Top
JSram View Drop Down
Groupie
Groupie


Joined: 22 October 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote JSram Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2006 at 12:01pm
I think I have an idea of why it crashes, not sure of solution though. In my second form, loaded by the Main form, were I want the Pane to appear I have a PictureBox control spanning the whole form area. I couldn't get the Pane to show on top of the PictureBox, it always show up behind it, so I dropped the PageManager on the PictureBox and attached as such:

Private Sub PaneMan_AttachPane(ByVal Item As XtremeDockingPane.IPane)
If panChartControl Is Nothing Then
    Set panChartControl = New frmChartCtrl
End If
Item.handle = panChartControl.hWnd
End Sub

While this works as expected loading things, Panemanager or VB6 doesn't seem to know how to handle it properly when unloading.

I am not sure what is best way to solve this, I need the Pane to Expand on top of the PictureBox, also I want the form loaded by the Pane to stay loaded even when form hosting the pane unloads, to avoid loading it again as the pane hosting form loads again.
Back to Top
JSram View Drop Down
Groupie
Groupie


Joined: 22 October 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote JSram Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2006 at 12:44pm
More light... the crash only and always appear to happen if the pane have had focus (being clicked on) and I then click the container background (the PictureBox in this case). The stange thing is though, it's not when closing the host form the crash happens but when the apps main start form closes. I even tried with destroy the pane when host form closes to no differance.

I am pretty sure now though that this must be a bug. I think I did it wrong to start with when when I have dropped the control on the PictureBox, but I couldn't get it to expand on top of it. However, I then forn the .AttachToWindow property, dropped it back on form and attached it to the pic window, and it worked as expected... except for the crash which still happens when clicking on the PictureBox background before I close the form.

Anyone for Codejock seing this?
Back to Top
Leather99 View Drop Down
Newbie
Newbie


Joined: 07 November 2006
Location: United Kingdom
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leather99 Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2006 at 8:23am
Hi Jsram,
 
We use the codejock controls in our application and we have had loads of problems with the IDE bombing out. It only started to happen when we included Codejock and has never really been resolved. We use the docking pane and command bars. The way we get around it at the moment is to always close the application (rather than hitting stop in the IDE). This seems to avoid the problem most of the time, although it does still crash fairly frequently. Sorry I can't be of more help - just thought I would let you know you are not alone.
 
Incidentally in our case this is not a problem with the resulting exe - thats closes fine.
 
Cheers
 
D
Back to Top
sesmar View Drop Down
Newbie
Newbie


Joined: 08 November 2006
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote sesmar Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2006 at 7:33am
I am also using these controls in a project for the company I work for and we are having the same problem.  The controls work fine in the resulting EXE; however, we are experiencing this same complications within the VB6 IDE as has been explained here.

From my experience it only seems to cause a problem if you activate the Docking Pane after the program has loaded.  For example, when the app loads up the Docking Pane form is docked and hidden, if I activate the form and cause it to slid out then I go and stop the code using the IDE it will cause the IDE to crash.  Now if I do the samething as before but this time instead of stopping the code actually exit the app through the interface it will close without a problem.

While this is a not a problem when deploying the application it can cause a considerable amount of downtime to our developers when we are trying to troubleshoot an issue in the code.  We purchased this control suite primarily for the Docking Panes and they are the only control that is giving us a problem so far.
Back to Top
Leather99 View Drop Down
Newbie
Newbie


Joined: 07 November 2006
Location: United Kingdom
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leather99 Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2006 at 7:45am

Hi Semsar,

Nice to here we are not the only ones. This is a pretty major issue, and has lead to reduced productivity, becase edit and continue is effectively out of bounds for us now. If we use it we very often lose the changes when the IDE crashes.
 
Any response from CodeJock on this???
 
Cheers,
 
D
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2006 at 8:25am
Hi,
 
Need more deatails because nobody from Codejock can't reproduce it. What code you have? Where you set breakpoint? May be you can attach some small project with steps how reproduce the problem.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JSram View Drop Down
Groupie
Groupie


Joined: 22 October 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote JSram Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2006 at 8:44am
I solved this by simply putting my control(s) on a picture box, located on same form as the Pane, and then attach the picture box. This was a better solution anyway as it increased the performance and simplified some other things. So currently I don't have any pane with form attached.

I concluded though that the problem might had to do with a 3rd party control I use in the pane, from ExOntrol (www.exontrol.com). I will probably add more tabs to my pane later and will test further then if the presence of this control makes a difference or not.

/Joakim
Back to Top
sebm View Drop Down
Newbie
Newbie


Joined: 13 April 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote sebm Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 3:53am
hi,

I am using Codejock Controls 10.1 an  i have the same problem - here my
solution (dont know, if its really the problem):
i put on my form a textbox behind all controls (visible!) - and in the form_unload
event, i set at first the focus to the textbox: the IDE dont crash anymore.

In my opinion, the error occurs in (big) projects, in which a form is attached to a
pane, and the pane owns the focus when the program closed - the crash
always followed after the form_unload events.....

ive tried to reproduced this error in a small project, but theres all ok.... 

cya sebastian (sry for my bad english ;)
Back to Top
jhai_salvador View Drop Down
Newbie
Newbie
Avatar

Joined: 06 March 2011
Location: Philippines
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jhai_salvador Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2012 at 7:39am
Has this issue been resolve? I also have this kind of problem using v13 and v15.

IDE crash after Unload Event.


Back to Top
jhai_salvador View Drop Down
Newbie
Newbie
Avatar

Joined: 06 March 2011
Location: Philippines
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jhai_salvador Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2012 at 10:45pm
This is my step in creating docking panes.

1. DockingPane1.SetCommandBars CommandBars1
2. Load SkinFrameWork
3. CommandBars1.LoadDesignerBars App.Path & "\Bin\main.xcb"
4. Add Statusbar Pane
5. Create DockingPane, Attach Pane will be from another form handle.

Well, IDE Crashes only occur when I close the running app. (Not Stop from IDE).

Now what are your steps to prevent this kind of error?..
Back to Top
jhai_salvador View Drop Down
Newbie
Newbie
Avatar

Joined: 06 March 2011
Location: Philippines
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jhai_salvador Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2012 at 11:24pm
Okay, I Solved my problem.

In unload event of the main form.

   SkinFramework1.RemoveAllWindows 'Destroy the loaded skin first
   DockingPane1.DestroyAll

   For Each frm In Forms
      Unload frm
   Next

Back to Top
cbickel View Drop Down
Newbie
Newbie


Joined: 31 January 2006
Location: Austria
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote cbickel Quote  Post ReplyReply Direct Link To This Post Posted: 24 February 2012 at 2:50pm
There is another solution:
 
In the Event Docking_Action(...)
check, if any Pane was unloaded:
like this...
    If Action = PaneActionClosed Then
      If Pane.Id = 1 Then
        Unload fMenuTree
        Set fMenuTree = Nothing
      ElseIf Pane.Id = 2 Then
        Unload fAKT
        Set fAKT = Nothing
      End If
    End If
This prevents VB-IDE from crashing when finishing the program.
And even if the project is not stopped it saves a lot of memory.
 
Christian Bickel
Consolidate
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.