-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Java class pattern error[E0004]: Type error, Array expanded past end of data. #120
Comments
can you provide the binary file to test the pattern or instructions on how to generate fro, the source code? |
https://github.com/Guigumua/file/blob/main/Test.class If you can't reproduce the problem, you can try adding more fields, source code in the same folder |
any fix for this? running into a similar problem |
The file provided doesn't generate error messages and the pattern covers the entire file. I'm not a java person so adding more fields doesn't help. If you have a file that is generating incorrect results when running the java class pattern I would need a copy to be able to debug the process and find out why the errors occur. This error is indicative of a flaw in the pattern that often manifests itself as a large array size or an address bigger than what the input file can have |
I can share the file I'm running into the error with it you'd like |
yes please |
the file uses the PE hexpat but its the same error and i couldnt find anything else related, note, it only errors if i have "check for symbols" enabled" |
Finding problems in pe pattern and fixing them is not going to help fix problems in java class patterns. If both are giving the same error the reasons can and generally are completely different for each case. So for this issue please post information about the java class pattern and the "Array expanded past end of file" error. The link provided hasn't been created properly because it is pointing to github instead of drives.google. I had to copy the link and paste it to download the executable but when I ran the pe pattern it didn't result in an error about reading past the end of the file. E: runtime error: Pattern count exceeded set limit of '131072'.
E: If this is intended, try increasing the limit using '#pragma pattern_limit <new_limit>'. The line after the error tells you how to fix it. |
I'm only trying to fix the pe problem, i put the post here because I didn't know where else to put it, also I already fixed the pattern limit by manually increasing the cap. |
The place to post problems with the pe pattern would be a new issue created that describes the error and to to reproduce it. After fixing the limit of patterns so that it is bigger than what the file needs the pe pattern runs to completion without any errors and the pattern covers the entire file. Are you seeing some error instead? Maybe post you ImHex version because that could be caused by a pe pattern that hasn't been patched but it is hard to tell for sure without more info. |
im running the 3.6.0 beta, i tried running the last stable build and the same error happened, make sure you have "check for symbols" enabled in the settings, if you do not have this on then the error doesnt appear, but many sections are either unlabled or are considered "freeform". |
The error is that the file has no symbols but the code tries to create a StringTable stringTable[sizeof(symbolTable)>0] @ addressof(symbolTable) + sizeof(symbolTable); so that the size of the |
fixed, thank you! |
It looks like you duplicated the pe pattern or maybe you wrote over the one that comes with ImHex. While that will work just fine for now, when you update ImHex that code may be overwritten. The change will be added to a pull request which if it is merged will become available directly on new downloads. In the meantime all you needed to do is turn off the symbol search. It is an optional feature that is currently broken. |
attribute_name_index value show
error[E0004]: Type error, Array expanded past end of data
.Reappear
Java source code:
error occurred in
file.methods[n].attributes[n].attribute_name_index
andfile.methods[n].attributes[n].atrributes[n].attribute_name_index
:if delete a field, error occurred in
file.methods[n].attributes[n].atrributes[n].attribute_name_index
:if delete two field, no orror:
I don't know if this error is related to the number of fields or the constant pool size, I also got this error with another class that has multiple methods but only one field.
The text was updated successfully, but these errors were encountered: