Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 11 issues #2391

Open
jfmherokiller opened this issue Oct 14, 2021 · 33 comments
Open

error 11 issues #2391

jfmherokiller opened this issue Oct 14, 2021 · 33 comments

Comments

@jfmherokiller
Copy link

trying to compile the master branch fails with error 11.

I did some research on where it fails and it seems like this commit is where the error starts

1d85e4855 ("Prometheus Additions", 2021-10-03) 1d85e4855e2cf311fa61ad41773073386ad812ad
@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021 via email

@jfmherokiller
Copy link
Author

jfmherokiller commented Oct 14, 2021

well i dug into the 6GB dump i did using procdump.exe -ma -e -w ni.exe

and here is what the compiler seems to crap out on (in the sense of going into an infinate loop of fail)


extracted segment

#ifdef DEBUG; if (suppress_text_substitution) { print "~[if HP of Fang is 3 or HP of Fang is 4]The scent of your alpha wolf is strong and exciting[else]The scarred wolf has an arousing scent[end if].~"; rtrue; }
    #endif; ! DEBUG
    ! [1: ~[if HP of Fang is 3 or HP of Fang is 4]The scent of your alpha wolf is strong and exciting[else]The scarred wolf has an arousing scent[end if].~]

to be more specific it seems atleast based off these function names in the callstack

the sequences of events possibly is "load the code block above" -> "parse inner statement" -> "observe need to allocate more nodes (because of the [if] [else] parts)" -> "attempt to allocate more nodes" -> "fail because it reached some limit"

After More examination it seems to have some limit which can be observed here

specificly that cmp line

I might see if i can patch out the limit

@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021 via email

@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021

Pushed the revised files up, did not compile alas.

@jfmherokiller
Copy link
Author

jfmherokiller commented Oct 14, 2021

its still compiling here but so far it seems to have worked. current memsize of the ni.exe process is 6.49GB
the previous limit seemed to have made it forcibly stop at 6.43GB
also what seems to be taking a long time is phrasebook generation as of the time of this post,

@jfmherokiller
Copy link
Author

Ok compilation completed successfully.
I am attaching the patched version of the ni.exe to this post
ni.zip

@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021 via email

@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021 via email

@jfmherokiller
Copy link
Author

jfmherokiller commented Oct 14, 2021

self patching info: the location you need to patch is at the file offset of 00001203 and you need to change the 3A to C3

this turns the original limit of 14999 to 50071
Original asm

0:  3d 97 3a 00 00          cmp    eax,0x3a97

Patched Asm

5:  3d 97 c3 00 00          cmp    eax,0xc397 

@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021

Hm hm hm, any idea what the name of that variable is?

@jfmherokiller
Copy link
Author

jfmherokiller commented Oct 14, 2021

Hm hm hm, any idea what the name of that variable is?
Well internally it seems to be the number of allocated memory blocks allocated using malloc
here is what ida sees

@jfmherokiller
Copy link
Author

jfmherokiller commented Oct 14, 2021

If you mean in your code I think you more or less reached the upper limit of inform7 at least as far as the developer made it

@jfmherokiller
Copy link
Author

I will try to track down all the needed changes to get it to compile under unpached exe

@Nuku
Copy link
Owner

Nuku commented Oct 14, 2021 via email

@jfmherokiller
Copy link
Author

I am compiling with your patched file.

On Thu, Oct 14, 2021 at 3:34 PM noah the goodra @.***> wrote: I will try to track down all the needed changes to get it to compile under unpached exe — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2391 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGYPSK42FIXTV64G5VEPLTUG5LI3ANCNFSM5GAE64DQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

well if you use my patched file this commit is no longer needed f299a9c

@Nuku
Copy link
Owner

Nuku commented Oct 15, 2021

All fixed. Thank you for your help.

@jfmherokiller
Copy link
Author

btw I saw the godot commits I almost want to guess you plan to use https://www.inklestudios.com/ to get away from the inform7 compiler.

@Nuku
Copy link
Owner

Nuku commented Oct 15, 2021 via email

@jfmherokiller
Copy link
Author

i mostly saw these commits f2d7980 and thought you were going to slowly attempt to convert to godot to get away from inform7

@Nuku
Copy link
Owner

Nuku commented Oct 15, 2021 via email

@jfmherokiller
Copy link
Author

well that ink thing i linked was my attempt at finding a possible replacement for inform7 (it was searched while i tried to find a fix for the 11 error)

@Nuku
Copy link
Owner

Nuku commented Oct 16, 2021

Someone just has to code it. Speaking of, seeing as you hacked this together, may as well ask, are you available as a coder?

@jfmherokiller
Copy link
Author

well it depends on what you are trying todo I am no pro at godot or inform for that matter I am just good well I guess general coding/RE

@Nuku
Copy link
Owner

Nuku commented Oct 16, 2021 via email

@jfmherokiller
Copy link
Author

yes because it sounds fun but for now I wouldnt like todo it

@DavidKinder
Copy link

self patching info: the location you need to patch is at the file offset of 00001203 and you need to change the 3A to C3
this turns the original limit of 14999 to 50071

Yes, the ni compiler keeps track of how many "memory pages" it has allocated (where each memory page is just an arbitrary block of memory, if this gets over 15,000 then ni assumes it has got itself trapped in a loop and dies. For the next Inform 7 6M62 release (at https://github.com/DavidKinder/Windows-Inform7) I will push up this limit.

@Nuku
Copy link
Owner

Nuku commented Nov 13, 2021

self patching info: the location you need to patch is at the file offset of 00001203 and you need to change the 3A to C3
this turns the original limit of 14999 to 50071

Yes, the ni compiler keeps track of how many "memory pages" it has allocated (where each memory page is just an arbitrary block of memory, if this gets over 15,000 then ni assumes it has got itself trapped in a loop and dies. For the next Inform 7 6M62 release (at https://github.com/DavidKinder/Windows-Inform7) I will push up this limit.

Oh, very interesting. Don't suppose this number could become something we can override with an in-code option?

@DavidKinder
Copy link

Oh, very interesting. Don't suppose this number could become something we can override with an in-code option?

Graham is currently working on a rewrite of the compiler, so I'm very reluctant to change the existing 6M62 compiler any more than absolutely necessary. If this issue shows up with the rewritten compiler then adding an option somewhere should be feasible for that, but not for 6M62.

@Nuku
Copy link
Owner

Nuku commented Nov 14, 2021

Fair Enough, thanks!

@DavidKinder
Copy link

A new build of Windows Inform 7 is out at https://github.com/DavidKinder/Windows-Inform7/releases/tag/6m62_w64_b5 which should have the raised compiler limit in it. I have not actually tested that your game compiles, but it should ...

@Nuku
Copy link
Owner

Nuku commented Dec 3, 2021 via email

@ghost
Copy link

ghost commented May 8, 2022

Now that the source code is available, it's possible to compile a patched version of 6M62 for any platform by increasing the MAX_BLOCKS_ALLOWED preprocessor definition from 15000 to something like 60000.

https://github.com/ganelson/inform/blob/master/retrospective/6M62/ni.c

@jfmherokiller
Copy link
Author

while you can increase that its probably best for it to be caclulated at runtime depending on the pc trying to compile the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants