Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Violation when dragging Tab to other RemoteContainer #34

Open
homer90 opened this issue Oct 16, 2015 · 6 comments
Open

Access Violation when dragging Tab to other RemoteContainer #34

homer90 opened this issue Oct 16, 2015 · 6 comments

Comments

@homer90
Copy link

homer90 commented Oct 16, 2015

When dragging (and dropping) a Tab to an other Container it sometimes happens that the following access violation gets triggered:

accessviolation

I've made a quick video so you can see when this AV occurs:
http://gfycat.com/InferiorEagerItaliangreyhound

It seems like SetControlPosition gets an invalid ChromeTabsControl and therefore crashes?

Best regards,
Homer

@homer90
Copy link
Author

homer90 commented Oct 16, 2015

Workaround:

In function TCustomChromeTabs.InsertDroppedTab: TChromeTab;

If you comment out:
// SetControlPosition(TabControls[FActiveDragTabObject.DropTabIndex],
// FDragTabControl.ControlRect,
// FALSE);

the AV doesn't occur anymore.

@norgepaul
Copy link
Owner

The code you commented out is needed otherwise the tab will resize when dropped. I couldn't repeat the problem, but I've added a check to make sure is FDragTabControl assigned:

  if FDragTabControl <> nil then
  begin
    SetControlPosition(TabControls[FActiveDragTabObject.DropTabIndex],
                       FDragTabControl.ControlRect,
                       FALSE);
  end;

Can you take a look at the new version (committing soon) and see you still get the error. If you do, please send me your demo and I'll take a look.

@homer90
Copy link
Author

homer90 commented Nov 17, 2015

The inital problem is solved now, yay! Thanks!

However if you have 2 tabs in one Container and want to to drag and drop one into another container which has 0 tabs you'll get an "Argument out of bounds exception".
This happens if you release the mouse button while the tab is invisible.

  1. Create ChromeTabs with 2 tabs
  2. Create ChromeTabs with 0 tabs
  3. Move one tab over to the other slowly until the tab gets invisible
  4. Release the mousebutton now while the tab is still invisible

Video for clarification: http://gfycat.com/NippyGraciousHalcyon

@norgepaul
Copy link
Owner

I have recreated the demo as closely as I can using your videos, but cannot repeat the problem, no matter how many times I try. I guess you have some property set that I can't see in the video. Can you please send me a copy of the project you are using?

@homer90
Copy link
Author

homer90 commented Nov 17, 2015

I use the standard ChromeTabs settings. However i forgot to mention they are place on 2 panels.
I've zipped an example:
https://www.dropbox.com/s/8trx795p5ttv2w0/chrometabstest.zip?dl=0

@landrix
Copy link
Collaborator

landrix commented May 31, 2016

Any news on this? The dropbox-link is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants