question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.InvalidOperationException: Attempt to write to a read-only page

See original GitHub issue

This is a big issue I encounter once in a while using BrightstarDB.

When doing some

context.DeleteObject(myobject);
context.SaveChanges();

I will be able to call it dozens and dozens of times, but at some point (often when I delete 5 to 10 objects in a row) this error will came up :

System.InvalidOperationException: Attempt to write to a read-only page à BrightstarDB.Rdf.NTriplesParser.Parse(TextReader reader, ITripleSink sink, String defaultGraphUri) à BrightstarDB.Server.GuardedUpdateTransaction.Run() BrightstarDB Error: 400 : Error Processing Transaction System.InvalidOperationException: Attempt to write to a read-only page à BrightstarDB.Rdf.NTriplesParser.Parse(TextReader reader, ITripleSink sink, String defaultGraphUri) à BrightstarDB.Server.GuardedUpdateTransaction.Run() à BrightstarDB.Server.StoreWorker.ProcessJobs(Object state) Exception thrown: ‘BrightstarDB.Client.BrightstarClientException’ in BrightstarDB.dll

Passed this point, any entity from the type of the entity i want to delete will turn undeletable, every attempt ending with the same error message. Yet i’m still able to create, modifiy, delete other types of entities, this one turn into a dead end. The only two solutions then are :

  • To wipe out the entire database and restart from scratch.
  • (After doing step 1 ) To edit the model of the object and add a Property DeletionRecquired, and hide from user every entity with this property set to true (and obviously edit whole program to handle this case)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cmiszturcommented, Feb 10, 2018

… but I must also mention that I have added consolidation to my rewrite store on application startup. So that definitely did happen.

1reaction
osc117commented, May 17, 2017

Okay I finally reproduced the bug ! https://drive.google.com/open?id=0B98ZSzSdzS7UM3ZmUml6OW93aXM

You just have to run this for a few minutes, then stop it, comment out the method DataCreationRoutine() and you should have the error about Readonly Page when clicking on the “Delete All Classical Datas” button

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempted to read or write protected memory. This is often ...
AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Read more >
Creating and Throwing Exceptions
Learn about creating and throwing exceptions. Exceptions are used to indicate that an error has occurred while running a program.
Read more >
Web Services: Object is read-only - Help
InvalidOperationException : Object is read-only”. It is all the same with the three services. A search in the internet gives me a page...
Read more >
Plagued with "attempt to write read-only database" on ...
I am plagued with “attempt to write read-only database” errors. If I try to delete/recreate a database, it runs for hours, days, ...
Read more >
System.InvalidOperationException: An error occurred when ...
System.InvalidOperationException: An error occurred when trying to create a controller of type 'AVG.Web.Controllers.Pages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found