norgepaul / TChromeTabs

Comprehensive Delphi implementation of Chrome's tab system
Other
215 stars 78 forks source link

Access violation error when sizing tabs by content #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I stumbled on an access violation error. I can give you the full stack trace if 
you would like but this is the top:

Exception stack
Stack list, generated 6/21/2014 2:55:50 AM
[005A6549] ChromeTabsControls.TChromeTabControl.GetTabWidthByContent$qqrv (Line 
891, "ChromeTabsControls.pas" + 1)
------------------------------------------------------------------------------
Call stack for main thread
Stack list, generated 6/21/2014 2:55:50 AM
[77A60C42]{ntdll.dll   } ZwGetContextThread 

I was able to recreate it in your demo application by setting the tabs to size 
by content and placing two windows with the top of the active one just slightly 
below the top of the inactive one and then attempting to drag up one of the 
tabs. I haven't spent much time trying to diagnose this but I'm looking so if I 
find anything before you respond I'll post back but visually it appears because 
the two tab controls are so close to each other it ends up trying to place the 
tab on both tab docks at the same time. 

Thanks,

Chris

Original issue reported on code.google.com by chriswil...@gmail.com on 21 Jun 2014 at 7:00

GoogleCodeExporter commented 9 years ago
Hi. This is probably not the best solution. It looks like this scenario is 
resulting in the FDragTabControl object to be null in SetTabPositions in 
ChromeTabs but this does seem to correct the problem.

Change line 2897 from this:

DragTabWidth := GetTabWidthByContent(FDragTabControl) + 
FOptions.Display.Tabs.TabOverlap

To this:

if (Assigned(FDragTabControl)) then
DragTabWidth := GetTabWidthByContent(FDragTabControl) + 
FOptions.Display.Tabs.TabOverlap

Original comment by chriswil...@gmail.com on 18 Jul 2014 at 1:20

GoogleCodeExporter commented 9 years ago
Fix applied

Original comment by paul.tho...@easy-ip.net on 3 Sep 2014 at 7:19