René's URL Explorer Experiment


Title: Exception thrown when calling a parameterless constructor that has overload with at least one parameter and `params` · Issue #1302 · pythonnet/pythonnet · GitHub

Open Graph Title: Exception thrown when calling a parameterless constructor that has overload with at least one parameter and `params` · Issue #1302 · pythonnet/pythonnet

X Title: Exception thrown when calling a parameterless constructor that has overload with at least one parameter and `params` · Issue #1302 · pythonnet/pythonnet

Description: Environment Pythonnet version: master@c81c3c3db7fcc403d5f4e8298b320240829daab2 Python version: 3.7, 3.9 (both x64) Operating System: Windows Details This is a regression introduced in c81c3c3 . If there is a parameterless constructor (an...

Open Graph Description: Environment Pythonnet version: master@c81c3c3db7fcc403d5f4e8298b320240829daab2 Python version: 3.7, 3.9 (both x64) Operating System: Windows Details This is a regression introduced in c81c3c3 . If ...

X Description: Environment Pythonnet version: master@c81c3c3db7fcc403d5f4e8298b320240829daab2 Python version: 3.7, 3.9 (both x64) Operating System: Windows Details This is a regression introduced in c81c3c3 . If ...

Opengraph URL: https://github.com/pythonnet/pythonnet/issues/1302

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception thrown when calling a parameterless constructor that has overload with at least one parameter and `params`","articleBody":"### Environment\r\n\r\n-   Pythonnet version: master@c81c3c3db7fcc403d5f4e8298b320240829daab2\r\n-   Python version: 3.7, 3.9 (both x64)\r\n-   Operating System: Windows\r\n\r\n### Details\r\nThis is a regression introduced in c81c3c3db7fcc403d5f4e8298b320240829daab2 .\r\n\r\n-   If there is a parameterless constructor (and probably a method too) that has an overload with at least one parameter  `params` parameter, when called from Python, an InvalidIndexError will be raised from Python for .NET.\r\n\r\nCallstack from when called from within Unity\r\n```\r\nSystem.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index\r\n---\r\nat System.Collections.ArrayList.get_Item (System.Int32 index) [0x0001c] in \u003c437ba245d8404784b9fbab9b439ac908\u003e:0 \r\n  at Python.Runtime.MethodBinder.TryConvertArguments (System.Reflection.ParameterInfo[] pi, System.Boolean paramsArray, System.IntPtr args, System.Int32 pyArgCount, System.Collections.Generic.Dictionary`2[TKey,TValue] kwargDict, System.Collections.ArrayList defaultArgList, System.Boolean needsResolution, System.Int32\u0026 outs) [0x0008a] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.MethodBinder.Bind (System.IntPtr inst, System.IntPtr args, System.IntPtr kw, System.Reflection.MethodBase info, System.Reflection.MethodInfo[] methodinfo) [0x0017c] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.MethodBinder.Bind (System.IntPtr inst, System.IntPtr args, System.IntPtr kw, System.Reflection.MethodBase info) [0x00000] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.ConstructorBinder.InvokeRaw (System.IntPtr inst, System.IntPtr args, System.IntPtr kw, System.Reflection.MethodBase info) [0x00074] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.ConstructorBinder.InvokeRaw (System.IntPtr inst, System.IntPtr args, System.IntPtr kw) [0x00000] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.ClassObject.tp_new (System.IntPtr tp, System.IntPtr args, System.IntPtr kw) [0x000b5] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.NativeCall.Call_3 (System.IntPtr fp, System.IntPtr a1, System.IntPtr a2, System.IntPtr a3) [0x00006] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at Python.Runtime.MetaType.tp_call (System.IntPtr tp, System.IntPtr args, System.IntPtr kw) [0x00024] in \u003cd0b807c6e27c43ea84a0e3a3c643e888\u003e:0 \r\n  at (wrapper managed-to-native) Python.Runtime.Runtime.PyRun_String(string,Python.Runtime.RunFlagType,intptr,intptr)\r\n```\r\n\r\nI have a patch to show how to reproduce it (although it crashes pytest)\r\n```\r\ndiff --git a/src/testing/constructortests.cs b/src/testing/constructortests.cs\r\nindex 8800c94..ecc61ce 100644\r\n--- a/src/testing/constructortests.cs\r\n+++ b/src/testing/constructortests.cs\r\n@@ -48,4 +48,22 @@ namespace Python.Test\r\n             value = v;\r\n         }\r\n     }\r\n+\r\n+    public class MultipleConstructorsTest\r\n+    {\r\n+        public string value;\r\n+        public Type[] type;\r\n+\r\n+        public MultipleConstructorsTest()\r\n+        {\r\n+            value = \"\";\r\n+            type = new Type[1] { null };\r\n+        }\r\n+\r\n+        public MultipleConstructorsTest(string s, params Type[] tp)\r\n+        {\r\n+            value = s;\r\n+            type = tp;\r\n+        }\r\n+    }\r\n }\r\ndiff --git a/src/tests/test_constructors.py b/src/tests/test_constructors.py\r\nindex 5e54896..c305377 100644\r\n--- a/src/tests/test_constructors.py\r\n+++ b/src/tests/test_constructors.py\r\n@@ -44,3 +44,12 @@ def test_subclass_constructor():\r\n     instance = Sub()\r\n     ob = SubclassConstructorTest(instance)\r\n     assert isinstance(ob.value, System.Exception)\r\n+\r\n+\r\n+def test_multiple_constructor():\r\n+    from Python.Test import MultipleConstructorsTest\r\n+    import System\r\n+\r\n+    # Test parameterless\r\n+    ob = MultipleConstructorsTest()\r\n+    assert ob.value == \"\"\r\n\r\n```\r\n","author":{"url":"https://github.com/BadSingleton","@type":"Person","name":"BadSingleton"},"datePublished":"2020-12-03T19:39:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1302/pythonnet/issues/1302"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fd3c84b7-75eb-3067-fc29-02932a21de9c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE3C6:19782E:3066FF:3F4A32:69702DDA
html-safe-nonce4497ef83da7eb0572c3d4e185f867b1bafb125dd1df985702074ebb36afdfe21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0M2OjE5NzgyRTozMDY2RkY6M0Y0QTMyOjY5NzAyRERBIiwidmlzaXRvcl9pZCI6IjYwOTY5NTI2NDgyMTg0NTU1MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac03f32a3998b25704ed0138917edd0779d35d94f20e2cc758d549f234a948c755
hovercard-subject-tagissue:756519011
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/1302/issue_layout
twitter:imagehttps://opengraph.githubassets.com/aeaa7815312e1d92c50b75f3325ae3d7778b1b3286365d87155458160ebf973e/pythonnet/pythonnet/issues/1302
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/aeaa7815312e1d92c50b75f3325ae3d7778b1b3286365d87155458160ebf973e/pythonnet/pythonnet/issues/1302
og:image:altEnvironment Pythonnet version: master@c81c3c3db7fcc403d5f4e8298b320240829daab2 Python version: 3.7, 3.9 (both x64) Operating System: Windows Details This is a regression introduced in c81c3c3 . If ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBadSingleton
hostnamegithub.com
expected-hostnamegithub.com
None01fa379f5de85ef8e791d09724e69709ce9eb9595278316e0a921312dc88e0bc
turbo-cache-controlno-preview
go-importgithub.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git
octolytics-dimension-user_id6050430
octolytics-dimension-user_loginpythonnet
octolytics-dimension-repository_id14748123
octolytics-dimension-repository_nwopythonnet/pythonnet
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14748123
octolytics-dimension-repository_network_root_nwopythonnet/pythonnet
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedda91974c069382b0dfa47b2da7e28bd061c8331
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/pythonnet/pythonnet/issues/1302#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fissues%2F1302
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fissues%2F1302
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=pythonnet%2Fpythonnet
Reloadhttps://github.com/pythonnet/pythonnet/issues/1302
Reloadhttps://github.com/pythonnet/pythonnet/issues/1302
Reloadhttps://github.com/pythonnet/pythonnet/issues/1302
pythonnet https://github.com/pythonnet
pythonnethttps://github.com/pythonnet/pythonnet
Notifications https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Fork 770 https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Star 5.4k https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Code https://github.com/pythonnet/pythonnet
Issues 155 https://github.com/pythonnet/pythonnet/issues
Pull requests 18 https://github.com/pythonnet/pythonnet/pulls
Discussions https://github.com/pythonnet/pythonnet/discussions
Actions https://github.com/pythonnet/pythonnet/actions
Projects 0 https://github.com/pythonnet/pythonnet/projects
Wiki https://github.com/pythonnet/pythonnet/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/pythonnet/pythonnet/security
Please reload this pagehttps://github.com/pythonnet/pythonnet/issues/1302
Insights https://github.com/pythonnet/pythonnet/pulse
Code https://github.com/pythonnet/pythonnet
Issues https://github.com/pythonnet/pythonnet/issues
Pull requests https://github.com/pythonnet/pythonnet/pulls
Discussions https://github.com/pythonnet/pythonnet/discussions
Actions https://github.com/pythonnet/pythonnet/actions
Projects https://github.com/pythonnet/pythonnet/projects
Wiki https://github.com/pythonnet/pythonnet/wiki
Security https://github.com/pythonnet/pythonnet/security
Insights https://github.com/pythonnet/pythonnet/pulse
New issuehttps://github.com/login?return_to=https://github.com/pythonnet/pythonnet/issues/1302
New issuehttps://github.com/login?return_to=https://github.com/pythonnet/pythonnet/issues/1302
Exception thrown when calling a parameterless constructor that has overload with at least one parameter and paramshttps://github.com/pythonnet/pythonnet/issues/1302#top
https://github.com/BadSingleton
https://github.com/BadSingleton
BadSingletonhttps://github.com/BadSingleton
on Dec 3, 2020https://github.com/pythonnet/pythonnet/issues/1302#issue-756519011
c81c3c3https://github.com/pythonnet/pythonnet/commit/c81c3c3db7fcc403d5f4e8298b320240829daab2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.