Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Featured Replies

  • Author
  • Localization

chrrox, posted Sat Nov 24, 2018 6:30 pm (40702)


how do you use -p correctly?
I keep getting an error
- error in src\extra\xalloc.c line 618: xdbg_malloc()

Error: memory allocation problem
Not enough memory resources are available to process this command.

and it seems once i get this I have to restart the process I was scanning to make it work again.

I am using a script like this.

Code:
endian big
for
set MEMORY_FILE binary ""
FindLoc OFFSET string \x55\x6E\x69\x74\x79\x46\x53\x00\x00\x00\x00 0 ""
goto OFFSET
getdstring NULL 0x1E
get SIZE long
print "%OFFSET% %SIZE%"
log MEMORY_FILE OFFSET 0x400
putvarchr MEMORY_FILE SIZE 0x400
get SIZE2 asize MEMORY_FILE
print "%SIZE2%"
string NAME p "x." SIZE
if SIZE < 0x2000000
log NAME 0 SIZE MEMORY_FILE
endif
next
  • Replies 671
  • Views 61
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

aluigi, posted Sat Nov 24, 2018 7:41 pm (40704)


-p is used only for authorizing the usage of processes, for example if you use:

quickbms script.bms process://file.exe

it will ask you to specify -p

quickbms -p script.bms process://file.exe
  • Author
  • Localization

aluigi, posted Sun Nov 25, 2018 11:31 am (40731)


QuickBMS 0.9.2 is now available.
  • Author
  • Localization

bugmenot, posted Fri Nov 30, 2018 5:23 pm (40862)


aluigi wrote:
The problem is not directly related to quickbms but in Windows not liking multiple consecutive path delimiters.

For example:
- WORKS: "res/file.png"
- DOES NOT WORK: "res//file.png" or "res\\\\\\file.png"

Basically it's a problem happening probably only the 0.1% of times but I'm happy you found it :)

It will be fixed in 0.9.1

Ah I have seen your last edit, the problem with the utf8 folder is known and will be fixed too.

The problem is fixed. Thanks once again.
  • Author
  • Localization

angeloyt, posted Wed Dec 05, 2018 11:11 am (41015)


i need help im currently using windows 10 acer laptop and well everytime i try to open reimport.bat it opens for about 0.5 sec then crashes ive also tried other reimport.bat but the same thing happens, if you guys know any solutions or alternative please reply
  • Author
  • Localization

aluigi, posted Wed Dec 05, 2018 12:49 pm (41019)


@angeloyt
Can you post a screenshot with the details of the error?
you should probably have both an output from quickbms (in the black window) and one from Windows.

Then try this simple test, open reimport.bat and add -9 at the end, for example:
Code:
quickbms.exe -G -w -r -9

Relaunch reimport.bat and tell me if it crashes.

If it doesn't crash it means it's a bug in one of your drivers or monitoring tools, this senseless behaviour has been fully documented some times and not related to quickbms, you can find info in section "6) Notes" of quickbms.txt
  • Author
  • Localization

Nameless, posted Wed Dec 12, 2018 1:25 pm (41303)


Why such case gives error?
Code:
set WORD string "test"
set TEST long 0
  • Author
  • Localization

aluigi, posted Wed Dec 12, 2018 1:37 pm (41306)


Because test is recognized as variable.
In quickbms variable names and variable contents are handled in the same way when read from the script because they are interchangable and quotes are optional.

The following are both the same:
set WORD string test
set WORD string "test"

Some versions ago I introduced a double check to avoid that a quoted text may be used as variable name in other locations:
Code:
- Variable 1 ("test") at line 2 is constant but the script tries to edit it.
  Do you want to continue anyway (y/N)?
  • Author
  • Localization

Nameless, posted Wed Dec 12, 2018 1:51 pm (41309)


Okay then. Not a big deal. Though sometimes qbms rules are really weird...
  • Author
  • Localization

aluigi, posted Wed Dec 12, 2018 2:10 pm (41310)


I agree with you.
The reason is that quickbms started in 2009 for supporting the original mexscript language where test and "test" are the same.
That's also why there are no escaped strings by default except where specified (search cstring in quickbms.txt).
And what about "idstring FILENUM TEXT" where all the other commands have FILENUM as last argument?
Overall everything works well and these small weird things don't give much problems, at least to me after over 2000 scripts :D
  • Author
  • Localization

Nameless, posted Wed Dec 12, 2018 2:30 pm (41312)


Almost forgot about another issue. From my experience getvarchr doesn't accept signed types. Why? This forces me to make variables negative manually each time when I need it.

Also code like this doesn't work as expected:
Code:
set VAR signed_short 0xFFFF
print "%VAR%"


I expect VAR to be -1, but it shows 65535. It seems like signed types work only with get command.
  • Author
  • Localization

aluigi, posted Wed Dec 12, 2018 4:18 pm (41319)


signed variables where added only for the Get command.
Added to my TODO for the next release.
  • Author
  • Localization

AnonBaiter, posted Thu Dec 13, 2018 1:45 pm (41358)


Code:
  offset           filesize   filename
--------------------------------------
- enter in folder F:\Nexon\Need for Speed(TM) EDGE\Data\Win32
- open input file F:\Nexon\Need for Speed(TM) EDGE\Data\Win32\vehicles1.sb

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode      c00000fd stack overflow
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   77497C97
                        77430000 00067c97 msvcrt.dll
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    00642000

Last script line before the error or that produced the error:
  119 putarray 0 0 flag_02
whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
testing_grounds.7z is here if you want to test this mess
  • Author
  • Localization

aluigi, posted Thu Dec 13, 2018 2:56 pm (41361)


Because you are recursively calling the function dice_filesystem tons of times consuming all the stack.

Nested functions should never be invoked with the "1" argument that keeps the variables, except if there is a real reason for that.

In your case doesn't matter since with or without 1 it gets called forever.
  • Author
  • Localization

AnonBaiter, posted Thu Dec 13, 2018 3:12 pm (41363)


alright, so i decided to go from this
Code:
      if flag_02 == 0x01
         get value variable4 filenum
         callfunction dice_filesystem 1
      elif flag_02 == 0x02
         get value variable4 filenum
         callfunction dice_filesystem 1
to this
Code:
      if flag_02 == 0x01
         get value variable4 filenum
      elif flag_02 == 0x02
         get value variable4 filenum
because this whole "callfunction dice_filesystem" didn't work out too well regardless of "argument" and could force the interpreter to call it quits for larger(as in, beyond 1-3MB) .sb/.toc files anyway
and thanks to you no the bug has been fixed and the script can actually handle said files now
  • Author
  • Localization

aluigi, posted Thu Dec 13, 2018 3:31 pm (41364)


I think your code (without 1) was correct because that's how Arrays and Dbojectes should be handled in the Frostbite engine.
I use the same in my frostbite.bms script but I guess this NFS uses a slightly different format, after all TOC/SB are ever a mess.
  • Author
  • Localization

ssh, posted Sat Dec 15, 2018 5:49 pm (41417)


slog command adds extra backslashes
Code:
input text: "\b\l\a\h\-(\\)"
slog NAME 0 SIZE
output result: \\b\\l\\a\\h\\-(\\\\)
  • Author
  • Localization

aluigi, posted Sat Dec 15, 2018 5:55 pm (41418)


It seems all correct and the backslashes have been correctly escaped.
Slog creates escaped strings because often the strings contain line feeds, for example with multi-line dialogs.
  • Author
  • Localization

chrrox, posted Wed Mar 13, 2019 9:32 am (45731)


I am having a problem with findloc
quickbms_4gb_files.exe -p dissidia.bms process://dffnt.exe c:\output
I don't think findloc can scan 64bit processes.
if I use this code
findloc OFFSET string "GMPK1"
print "%OFFSET%"
it never finds a value
and if I manually do this
set TMP longlong 0x297ab9c0000
print "%TMP%"
goto TMP
savepos TMP
print "%TMP%"
1st result 2850442444800
2nd result
-1415839744
  • Author
  • Localization

aluigi, posted Wed Mar 13, 2019 10:35 am (45732)


quickbms and quickbms_4gb_files are 32bit tools, therefore they can't access 64bit processes.

I will never release a 64bit version of the tools because the first requirement is maintaining compatibility with any older OS and system.
  • Author
  • Localization

Acewell, posted Thu Mar 14, 2019 12:18 am (45748)


longlong doesn't seem work with the "put" command either. :(
  • Author
  • Localization

aluigi, posted Thu Mar 14, 2019 5:32 am (45751)


you need to use quickbms_4gb_files.exe for 64bit fields.
Just tested and the output is correct.
  • Author
  • Localization

aluigi, posted Mon Apr 08, 2019 2:57 pm (46656)


I just noticed that tcc (the embedded C compiler) is crashing, I'm investigating what's causing this issue.

Update: ok it was my fault (sort of), everything works perfectly
  • Author
  • Localization

HPAndroid, posted Sat Apr 13, 2019 2:58 pm (46882)


I encountered this error when transferring the .fsh file to .pvr, the script is attached below. Thanks!
Code:

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode      80000001 guard page violation
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   74C7A990
                        74BF0000 0008a990 msvcrt.dll
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    063D3000

fsh2pvr.bms

  • Author
  • Localization

aluigi, posted Sat Apr 13, 2019 5:06 pm (46887)


good bug, it's related to the c_structs feature and freeing some old pointers.
use math in your script at line 25 and 28 and it will work
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.