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

header files are flickers on VSCode window #9850

Closed
zafersn opened this issue Sep 5, 2022 · 7 comments
Closed

header files are flickers on VSCode window #9850

zafersn opened this issue Sep 5, 2022 · 7 comments
Assignees
Labels
Feature: Themes more info needed The issue report is not actionable in its current state

Comments

@zafersn
Copy link

zafersn commented Sep 5, 2022

Environment

  • OS and Version:
  • VS Code Version:
    image
    Version: 1.71.0 (user setup)
    Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
    Date: 2022-09-01T07:36:10.600Z
    Electron: 19.0.12
    Chromium: 102.0.5005.167
    Node.js: 16.14.2
    V8: 10.2.154.15-electron.0
    OS: Windows_NT x64 10.0.22000
    Sandboxed: No
  • C/C++: v1.12.4
  • C/C++ Extension Version: v1.3.0

image

  • Other extensions you installed (and if the issue persists after disabling them):
  • If using SSH remote, specify OS of remote machine:
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

here is my issue: when I open the header file. the header file is flicker.

ezgif-4-74814b6326

Bug Summary and Steps to Reproduce

Bug Summary:

The header file is flicker. please have a look at gif files I shared with you

Steps to reproduce:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

No response

Code sample and Logs

/**
  ******************************************************************************
  * Copyright (c) 2016 Intel Corporation.
  *
  * SPDX-License-Identifier: Apache-2.0
  * @file    bsl.h
  * @author  Zafer
  * @version V1.0.0
  * @date    Sep 05, 2022
  * @brief   
  * @verbatim
  * @file Header where utility code can be found for PCAL9539A IO EXPANDER GPIO drivers
  *		V1.0.0 : 	First version of library.
  *		<describe this file>
  * @endverbatim
  * ===========================================================================
  *                       ##### How to use this file #####
  * ===========================================================================
  *	@attention
  *
  *	@todo
  *
  *
  *
  * ===========================================================================
  *                       ##### Change Activity #####
  * ===========================================================================
  * mm/dd/yy   author   description
  * --------  -------   -----------
  * 05/09/22   Zafer   Initial coding
  *
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef NETFEASA_DRIVERS_PCAL9539A_GPIO_UTILS_H_
#define NETFEASA_DRIVERS_PCAL9539A_GPIO_UTILS_H_

/* Includes ------------------------------------------------------------------*/

/* END Of Includes ------------------------------------------------------------------*/

/* Exported macro ------------------------------------------------------------*/

/* Register definitions */
#define REG_INPUT_PORT0			        0x00
#define REG_INPUT_PORT1			        0x01
#define REG_OUTPUT_PORT0		        0x02
#define REG_OUTPUT_PORT1		        0x03
#define REG_POL_INV_PORT0		        0x04
#define REG_POL_INV_PORT1		        0x05
#define REG_CONF_PORT0			        0x06
#define REG_CONG_PORT1			        0x07
#define REG_OUT_DRV_STRENGTH_PORT0_L	0x40
#define REG_OUT_DRV_STRENGTH_PORT0_H	0x41
#define REG_OUT_DRV_STRENGTH_PORT1_L	0x42
#define REG_OUT_DRV_STRENGTH_PORT1_H	0x43
#define REG_INPUT_LATCH_PORT0		    0x44
#define REG_INPUT_LATCH_PORT1		    0x45
#define REG_PUD_EN_PORT0		        0x46
#define REG_PUD_EN_PORT1		        0x47
#define REG_PUD_SEL_PORT0		        0x48
#define REG_PUD_SEL_PORT1		        0x49
#define REG_INT_MASK_PORT0		        0x4A
#define REG_INT_MASK_PORT1		        0x4B
#define REG_INT_STATUS_PORT0		    0x4C
#define REG_INT_STATUS_PORT1		    0x4D
#define REG_OUTPUT_PORT_CONF		    0x4F



/* Driver flags */
#define PCA_HAS_PUD			            BIT(0)
#define PCA_HAS_INTERRUPT		        BIT(1)


#define GPIO_PCAL9539A_DEVICE_INSTANCE(inst)				\
static const struct gpio_pcal9539a_config gpio_pcal9539a_##inst##_cfg = {	\
	.common = {							\
		.port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(inst),	\
	},								\
	.bus = I2C_DT_SPEC_INST_GET(inst),				\
	.capabilities =							\
		(DT_INST_PROP(inst, has_pud) ?			\
			PCA_HAS_PUD : 0) |				\
		IF_ENABLED(CONFIG_GPIO_PCAL9539A_INTERRUPT, (		\
		(DT_INST_NODE_HAS_PROP(inst, interrupt_gpios) ?		\
			PCA_HAS_INTERRUPT : 0) |			\
		))							\
		0,							\
	IF_ENABLED(CONFIG_GPIO_PCAL9539A_INTERRUPT,			\
	(.int_gpio = GPIO_DT_SPEC_INST_GET_OR(inst, interrupt_gpios, {}),)) \
};									\
									\
static struct gpio_pcal9539a_drv_data gpio_pcal9539a_##inst##_drvdata = {	\
	.reg_cache.input = 0x0,						\
	.reg_cache.output = 0xFFFF,					\
	.reg_cache.dir = 0xFFFF,					\
	.reg_cache.pud_en = 0x0,					\
	.reg_cache.pud_sel = 0xFFFF,					\
	IF_ENABLED(CONFIG_GPIO_PCAL9539A_INTERRUPT, (			\
	.interrupt_active = false,					\
	))								\
};									\
									\
DEVICE_DT_INST_DEFINE(inst,						\
	gpio_pcal9539a_init,						\
	NULL,								\
	&gpio_pcal9539a_##inst##_drvdata,					\
	&gpio_pcal9539a_##inst##_cfg,					\
	POST_KERNEL, CONFIG_GPIO_PCAL9539A_INIT_PRIORITY,			\
	&gpio_pcal9539a_drv_api_funcs);

DT_INST_FOREACH_STATUS_OKAY(GPIO_PCAL9539A_DEVICE_INSTANCE)

/* END Of Exported macro ------------------------------------------------------------*/

/* Exported types ------------------------------------------------------------*/


/** Configuration data */
struct gpio_pcal9539a_config {
	/* gpio_driver_config needs to be first */
	struct gpio_driver_config common;
	struct i2c_dt_spec bus;
	uint8_t capabilities;
#ifdef CONFIG_GPIO_PCAL9539A_INTERRUPT
	struct gpio_dt_spec int_gpio;
#endif
};

/** Runtime driver data */
struct gpio_pcal9539a_drv_data {
	/* gpio_driver_data needs to be first */
	struct gpio_driver_data common;

	struct {
		uint16_t input;
		uint16_t output;
		uint16_t dir;
		uint16_t pud_en;
		uint16_t pud_sel;
	} reg_cache;

	struct k_sem lock;

#ifdef CONFIG_GPIO_PCAL9539A_INTERRUPT
	/* Self-reference to the driver instance */
	const struct device *instance;

	/* port ISR callback routine address */
	sys_slist_t callbacks;

	/* interrupt triggering pin masks */
	struct {
		uint16_t edge_rising;
		uint16_t edge_falling;
		uint16_t level_high;
		uint16_t level_low;
	} interrupts;

	struct gpio_callback gpio_callback;

	struct k_work interrupt_worker;

	bool interrupt_active;
#endif
};
/* END Of Exported types ------------------------------------------------------------*/

/* Exported constants --------------------------------------------------------*/
/* END Of Exported constants --------------------------------------------------------*/

/* Exported variables --------------------------------------------------------*/

/* END Of Exported variables --------------------------------------------------------*/

/* Exported functions ------------------------------------------------------- */

/* END Of Exported functions ------------------------------------------------------- */

#endif/* NETFEASA_DRIVERS_GPIO_GPIO_UTILS_H_ */
/*** (C) COPYRIGHT  Netfeasa  *****END OF FILE****/

Screenshots

ezgif-4-74814b6326

Additional context

No response

@michelleangela
Copy link
Contributor

@zafersn
This may be a VS Code client bug because it's an issue with what appears to be reloading of the theme colors.

Could you try uninstalling the C++ extension pack and the C++ extension, but only retain the C++ themes and see if it still flickers? Does this only happen with certain theme colors or only for the dark themes?

@michelleangela michelleangela added more info needed The issue report is not actionable in its current state Feature: Themes labels Sep 6, 2022
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Sep 7, 2022

This is a duplicate of #9689 -- we're not sure exactly how to repro it yet, but it seems like removing the duplicate files.associations should fix it. Maybe another setting is required to be set.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Sep 7, 2022

Also, I'm seeing "Connection to server got closed. Server will not be restarted" (i.e. cpptools process crash) but that could be completely unrelated...let us know if you have any more info on that repro.

@zafersn
Copy link
Author

zafersn commented Sep 7, 2022

Hi @michelleangela in some cases I need to use c++ extension and pack. So I believe it is not the solution. but anyway, I disabled those extensions and tested. yes, it worked for me and I didn't see any flickers. But the thing is I have come across an issue like that only in this piece of code, not in any other files. I was wondering why?.

And also, I came across a few times there were no flickers on that header file when I was switching between pages, although all c++ extensions were enabled

@michelleangela
Copy link
Contributor

@zafersn
It could only be happening to that particular file due to some IntelliSense parsing issue. Could you provide the following logs when the flickering happens? The logs will show operations IntelliSense is doing and how it's configured.

@michelleangela michelleangela self-assigned this Sep 8, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

This issue has been closed because it needs more information and has not had recent activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2022
@sean-mcmanus
Copy link
Contributor

The fix is available with 1.14.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.14.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature: Themes more info needed The issue report is not actionable in its current state
Projects
None yet
Development

No branches or pull requests

3 participants