Jump to content

Deleting Attribute causes Branch Explorer and Plastic.exe to Crash!


sbrassard

Recommended Posts

Plastic Men,

I recently was experimenting with attributes and created one called "Branch Status" and gave it a value. I created a conditional format rule in the Branch Explorer and it appeared to work as it highlighted the branch with the attribute applied to it.

I just deleted the attribute this morning and had to do a restart. I've been attempting to open Plastic.exe but it keeps crashing on me... I even installed the latest version it it also is crashing.

Here is the debug info:

Codice.CM.Common.CmException was unhandled

Message=The specified attribute realization can't be found.

Source=libplastic

KeyMessage=ATTR_NOT_FOUND

StackTrace:

at np.h()

at System.Threading.ExecutionContext.runTryCode(Object userData)

at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

InnerException:

I also created a Plastic.dmp file so I'm not sure if you can use it or not. Its 300MB so, I can't upload it here.

Suggestions?

Link to comment
Share on other sites

Ok, I'm back up and running...

It looks like something went haywire with the attributes in Plastic. I think there may have been some kind of BranchExplorer.cfg file in the "C:\Users\[username]\AppData\Local\plastic4" folder that was causing it to crash. *shrug*. I deleted this folder, killed the local plasticd service, uninstalled plastic, deleted the Plastic4 installation folder, re-installed Plastic, setup all of my workspaces again, and it seems that it is working.

I think there must be a rogue setting (maybe in these cfg files?) for attributes that are not deleted when the attribute is deleted. I did see the following in that cfg file after I deleted the attribute:

filters.conditional.rule0.branches_query=attribute="Branch Status" and attrvalue="Cancelled"

Just guessing here... Let me know if you guys want the Plastic.dmp file. You'll have let me know where you want me to upload it to.

//Steve

Link to comment
Share on other sites

I can get the error if I make the query for an nonexistent attribute but not the crash.

I'm sure that the crash comes from the parsing of the branch explorer configuration files, do you have a copy of that file?

Link to comment
Share on other sites

It's not that the configuration file is corrupted, the configuration file is perfectly fine. I was going to try to reproduce it but it's much worse than I initially thought. Here's as far as I got.

Have multiple workspaces linked to different repositories (two is probably sufficient).

In only one repository create an attribute named "Testing"

Apply that attribute to only one branch in the repository and give it the value of "True"

In the workspace for that repository, open the branch explorer and add a custom formatting rule using the query 'attribute="Testing" and attrvalue="True"'

Now switch to your other workspace and open up the branch explorer, and the Plastic GUI crashes.

Why this is happening is simple. If you open up your branchexplorer.cfg you will now see additional settings related to this custom formatting rule. For me they were this:

filters.conditional.numrules=1

filters.conditional.rule0.branches_query=attribute='Testing' and attrvalue='True'

filters.conditional.rule0.color=182,50,192

filters.conditional.rule0.type=simple_query

filters.conditional.visible=true

Presumably, the branch explorer looks at these settings for all workspaces, however, as we've just seen, that custom formatting rule isn't valid for all workspaces. You would think that the problem could be solved by having these settings only apply to particular workspaces, but that isn't quite true either. That still wouldn't solve the problem, because that attribute could be removed at any time.

The custom formatting rules need to be set at a workspace level (not a total-client level), but also need to be ignored when they are invalid (due to an attribute gone missing or any other such problem)

The workaround for this that worked for me was to remove the settings from the branchexplorer.cfg file that I listed above. From then on your branch explorer should work perfectly fine.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...