Error when browsing to repository. Also can't push without 500 error.

Carl Berg's Avatar

Carl Berg

11 Jun, 2015 07:30 AM

System.NullReferenceException: Object reference not set to an instance of an object.
   at HgSharp.Core.HgTagManager.RefreshTagsInternal(HgRevset headNodes) in d:\projects\hgsharp\src\HgSharp.Core\HgTagManager.cs:line 147
   at HgSharp.Core.HgTagManager.GetTagsInternal() in d:\projects\hgsharp\src\HgSharp.Core\HgTagManager.cs:line 86
   at HgSharp.Core.HgTagManager.GetTags() in d:\projects\hgsharp\src\HgSharp.Core\HgTagManager.cs:line 41
   at HgSharp.Core.HgRepository.GetTags() in d:\projects\hgsharp\src\HgSharp.Core\HgRepository.cs:line 723
   at HgLab.Models.Modellers.RepositoryModeller.ToRepositoryModel(ISecurityPrincipal securityPrincipal, Repository repository, ProjectModel projectModel, HgRepository hgRepository, Boolean includeClosedBranches, Action`1 t) in d:\projects\hglab\src\HgLab\Models\Modellers\RepositoryModeller.cs:line 75
   at HgLab.Areas.Project.Controllers.RepositoryController.Files(MainlineRepository repository, String changeset, String path) in d:\projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:line 106
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 param
  1. 1 Posted by Carl Berg on 11 Jun, 2015 07:48 AM

    Carl Berg's Avatar

    Here's an attached logfile from hgLab

  2. Support Staff 2 Posted by Anton Gogolev on 11 Jun, 2015 09:13 AM

    Anton Gogolev's Avatar

    Hello, Carl!

    This is most likely due to caches being out of sync. Try deleting
    everything under ".hg\cache" in from the failing repository on your HgLab
    server.

  3. 3 Posted by Carl Berg on 11 Jun, 2015 10:05 AM

    Carl Berg's Avatar

    No luck unfortunately... Same error after deleting everything under cache. I have also upgraded to version 1.8.7, but no change. Same error appears in UI and this is what appears in the log:

    12:01:53.1023 - Error -       cber - HgSharp.Server.HgHttpServer - exceptionSystem.NullReferenceException: Object reference not set to an instance of an object.
       at HgSharp.Core.HgRevlogWriter.WriteRevlogEntries(IEnumerable1 chunks, Func2 linkRevisionProviderCallback, Action1 duplicateEntryHandlerCallback) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogWriter.cs:line 295
       at HgSharp.Core.HgRepository.Commit(IDictionary2 revisions, IEnumerable1 chunks, HgRevlog hgRevlog, Int32& changes) in d:\projects\hgsharp\src\HgSharp.Core\HgRepository.cs:line 649
       at HgSharp.Core.HgRepository.Commit(HgBundle hgBundle) in d:\projects\hgsharp\src\HgSharp.Core\HgRepository.cs:line 625
       at HgSharp.Server.HgHttpServer.ExecuteUnbundle(HgHttpCommandContext context) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 348
       at HgSharp.Server.HgHttpServer.<>c__DisplayClassf.<TextCommand>b__e(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 228
       at HgSharp.Server.HgHttpServer.<>c__DisplayClass5.<WriteCommand>b__4(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 118
       at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 152    at HgSharp.Core.HgRevlogWriter.WriteRevlogEntries(IEnumerable1 chunks, Func2 linkRevisionProviderCallback, Action1 duplicateEntryHandlerCallback) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogWriter.cs:line 295
       at HgSharp.Core.HgRepository.Commit(IDictionary2 revisions, IEnumerable1 chunks, HgRevlog hgRevlog, Int32& changes) in d:\projects\hgsharp\src\HgSharp.Core\HgRepository.cs:line 649
       at HgSharp.Core.HgRepository.Commit(HgBundle hgBundle) in d:\projects\hgsharp\src\HgSharp.Core\HgRepository.cs:line 625
       at HgSharp.Server.HgHttpServer.ExecuteUnbundle(HgHttpCommandContext context) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 348
       at HgSharp.Server.HgHttpServer.<>c__DisplayClassf.<TextCommand>b__e(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 228
       at HgSharp.Server.HgHttpServer.<>c__DisplayClass5.<WriteCommand>b__4(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 118
       at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 152
    
  4. Support Staff 4 Posted by Anton Gogolev on 11 Jun, 2015 11:16 AM

    Anton Gogolev's Avatar

    Carl,

    Can you possibly copy the entire repository from the server to your local
    machine and run "hg verify" on it?

  5. 5 Posted by Carl Berg on 11 Jun, 2015 11:33 AM

    Carl Berg's Avatar

    You're right. It's been corrupted. I will try to clone it from the last working revision and replace it with the cloned one. I guess i have to remove any newer changesets (in PushlogEntry and PushlogEntryItem) in the hglabs database aswell?

  6. Support Staff 6 Posted by Anton Gogolev on 11 Jun, 2015 01:11 PM

    Anton Gogolev's Avatar

    Sorry to hear that.

    If the repository you'll be overwriting the one on the server has any of
    the previous changesets missing, you'll need to clean up the tables you've
    referenced. Otherwise (if you are overwriting with a non-corrupt version of
    the same exact repository with the same exact changesets) you can leave
    things as is.

  7. 7 Posted by Carl Berg on 11 Jun, 2015 01:19 PM

    Carl Berg's Avatar

    I ended up moving my own repository over to the server. Seems to be ok now. Thanks for the help!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

12 Jan, 2023 12:25 PM
10 Jan, 2023 04:49 PM
03 Aug, 2022 01:49 PM
05 Jul, 2022 07:01 PM
28 Mar, 2022 04:42 PM

 

21 Jan, 2022 10:43 AM
20 Jan, 2022 10:45 AM
18 Jan, 2022 10:15 AM
19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM