steviegt6 / Stardew64Installer

A handy piece of software that converts a Linux installation of SDV into a working 64bit Windows installation.
MIT License
15 stars 2 forks source link

OpenGL error 1281 or 1282 #32

Open Pathoschild opened 3 years ago

Pathoschild commented 3 years ago

Some users report MonoGameGLException: GL.GetError() returned 1281 or 1282 errors when mods edit textures. This is relatively rare but there's no known fix, so this ticket tracks the known info,

Sample error

[Content Patcher] Unhandled exception applying patch: Trypophobia > EditImage Maps\fall_beach #1.
Microsoft.Xna.Framework.Graphics.MonoGameGLException: GL.GetError() returned 1281
   at Microsoft.Xna.Framework.Graphics.GraphicsExtensions.CheckGLError()
   at Microsoft.Xna.Framework.Graphics.Texture2D.<PlatformSetData>c__AnonStorey1`1.<>m__0()
   at Microsoft.Xna.Framework.Threading.BlockOnUIThread(Action action)
   at Microsoft.Xna.Framework.Graphics.Texture2D.SetData[T](Int32 level, Int32 arraySlice, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
   at StardewModdingAPI.Framework.Content.AssetDataForImage.PatchImage_PatchedBy<Platonymous.PyTK>(Object source, Texture2D sourceArea, Nullable`1 targetArea, Nullable`1 patchMode, PatchMode )
   at ContentPatcher.Framework.Patches.EditImagePatch.Edit[T](IAssetData asset) in C:\source\_Stardew\Mods.Pathoschild\Common\Items\ItemRepository.cs:line 291
   at ContentPatcher.Framework.PatchManager.Edit[T](IAssetData asset) in C:\source\_Stardew\Mods.Pathoschild\ContentPatcher\Framework\Tokens\ValueProviders\ManualValueProvider.cs:line 61

OpenGL error descriptions for 1281 (0x0501) and 1282 (0x0502):

GL_INVALID_VALUE, 0x0501 Given when a value parameter is not a legal value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, where other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.

GL_INVALID_OPERATION, 0x0502 Given when the set of state for a command is not legal for the parameters given to that command. It is also given for commands where combinations of parameters define what the legal parameters are.

Known patterns

Error 1281

Error 1282

This is possibly related to 1281, but not enough reports yet to see patterns.

Known affected users

Error 1281

user log Win SMAPI patcher notes
Fri 2021-08-06
marry481
log 10 3.12.2 1.1.8 Affects Content Patcher. Has PyTK.
Thu 2021-07-29
acearohippo (Saelym) on Discord
A, B 10 3.11.0 1.1.8 Affects Content Patcher, Lunar Disturbances, Walk of Life. Has PyTK.
Mon 2021-06-21
Nari on Discord
n/a ? ? ? Attempted fixes: updated graphics drivers.
Tue 2021-05-04
Zilch on Discord
n/a ? ? ?

Error 1282

user log Win SMAPI patcher notes
Sun 2021-08-08
PurrplingCat on Discord
log 10 3.12.2 1.1.8 Affects NPC Adventures.
Thu 2021-06-17
Wingheart on Discord
n/a ? ? ? Affects SpriteMaster.
steviegt6 commented 3 years ago

It'd be valuable to get information on system hardware, especially given that this remains seemingly consistent for all affected users.