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

aluigi, posted Thu Sep 03, 2015 12:11 pm (7151)


It's not a bug because the "1" in callfunction forces quickbms to create and maintain any variable created in the function so Function_arg1 is then globally visible.
  • Replies 671
  • Views 45
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

aluigi, posted Sun Sep 06, 2015 10:35 am (7238)


I'm just fixing all the issues.
Currently ARRAY[i] will be not supported in *math because they are just an experimental feature added to quickbms without a real usage.
Basically they should be not used in normal conditions because are very limited (you cannot use ARRAY[3], only ARRAY[VAR]).

The function arguments with keep_variable enabled can't be touched just because that's the way it works (and modifying that code will for sure introduce new issues).
  • Author
  • Localization

aluigi, posted Sun Sep 06, 2015 11:10 am (7239)


Zim wrote:
...
Also why we can't use any "0xAB" as a real string? We always get numbers/their bytes instead of strings and even with "0x" or "1x2" etc:
...

Regarding the confusion caused by strings and numbers and about how they get converted in quickbms, I have finally activated a feature that I introduced many versions ago.
Basically quickbms already had the opportunity to recognized the variables specified between quotes as constants and now I found a lame trick to allow it without modifying everything.
I'm testing it just now and it seems to work correctly but I'm sure there are some side-consequences to verify.
I will keep you update.
  • Author
  • Localization

Zim, posted Sun Sep 06, 2015 6:34 pm (7242)


Thanks!
aluigi wrote:
Currently ARRAY[i] will be not supported in *math because they are just an experimental feature added to quickbms without a real usage.
Basically they should be not used in normal conditions because are very limited (you cannot use ARRAY[3], only ARRAY[VAR]).
Well, pls don't remove it at least from math... I'm still using it, sometimes it's really much more useful than just 1 array (GetArray/PutArray) or tons of vars. And it works absolutely ok, we just must to use the same var for indexes, but it's ok! Because we always can create individual vars (per array) or temp vars (for all/several arrays) for such purpose.

Also you still can use Array[1] / 2 / 3 too - you just have to assign it! And if you wanna use it than you most likely need only few numbers, so it will not be a real problem to assign it (at least for usage inside of your function/s).
Sometimes I'm using it for fucntions which support up to several return values for a common purpose:
Code:
#   ...
    if idx == 0
        set HEX HEX[idx]
    elif idx == 1
        set HEX[1] HEX[idx]
    elif idx == 2
        set HEX[2] HEX[idx]
    elif idx == 3
        set HEX[3] HEX[idx]
    elif idx == 4           # for internal usage only
        set HEX[4] HEX[idx]
    endif
EndFunction
So as you can see here is 4 return values are for user of this function (HEX - HEX[3]) and one (HEX[4]) is for internal usage by other functions (some of them uses both user made and own these HEX values in same call).
In this example an index is defined by user as an argument in CallFunction. But in other usecases it awlays returns all values, obviously you just have to add for for this.
Sometimes this way of using both Array[var] and Array[1] is really useful when you have the same set of a lot of actions to be executed with several vars (array[1], 2, 3, etc) and/or to save the ability to execute a (for) loop over them in the future.

But most of the time I'm just using Array[i] with temp/individual indexes for a lot of values.

P.S. And I'm still talking about regular usage of QuickBMS but for complex formats and/or gentle console output.

aluigi wrote:
The function arguments with keep_variable enabled can't be touched just because that's the way it works (and modifying that code will for sure introduce new issues).
I totally agree, it's absolutely ok! I just forgot about KEEP_VAR, so now I'm taking this into account and using KEEP_VAR=0 or flushing methods.

aluigi wrote:
I have finally activated a feature that I introduced many versions ago.
Basically quickbms already had the opportunity to recognized the variables specified between quotes as constants and now I found a lame trick to allow it without modifying everything.
Wow that sounds cool! I'm looking forward to any updates, thanks!
  • Author
  • Localization

aluigi, posted Mon Sep 07, 2015 2:42 am (7252)


yeah ARRAY[i] will be left untouched. I used the wrong words :)
Currently I guess to have fixed everything was reported plus a couple of additional things so I think later I can upload a beta and you can check it telling if there is still something to fix.
  • Author
  • Localization

aluigi, posted Mon Sep 07, 2015 9:29 am (7259)


Ok the beta is ready and you can find it attached to this post.
Feel free to report any issue :)

beta.zip

  • Author
  • Localization

spider91, posted Thu Oct 08, 2015 4:16 am (8202)


I've found an error. Using quickbms_4gb 0.6.7a i can't convert 64bit values to hex representation. Here is a screen

Image
  • Author
  • Localization

aluigi, posted Thu Oct 08, 2015 8:06 am (8205)


That's sprintf.
Using %016llX and %016I64X (the correct formats in this case) doesn't work because the arguments are passed as 32bit.

In your case I suggest the following:
string VAR P "%VAR|x%"
string VAR << 2
  • Author
  • Localization

spider91, posted Thu Oct 08, 2015 4:03 pm (8211)


Thanks. So it gonna work correctly for bigget and lower offsets too?
  • Author
  • Localization

aluigi, posted Thu Oct 08, 2015 4:43 pm (8216)


The output is exactly like %016x, so 0x0022334455667788 will be 0022334455667788
  • Author
  • Localization

spider91, posted Thu Oct 08, 2015 4:51 pm (8219)


Awesome, thanks again.
  • Author
  • Localization

TGE, posted Tue Oct 13, 2015 5:19 pm (8421)


Having issues decompressing this zlib compressed file using clog
It decompresses fine with offzip however.

http://puu.sh/kIWyF.png
  • Author
  • Localization

aluigi, posted Tue Oct 13, 2015 6:37 pm (8423)


The error states that you used an uncompressed size equal to the uncompressed one.
comtype zlib (which is default) works with the correct sizes.

If you don't know the uncompressed size you should use: comtype zlib_noerror.
It's exactly as "comtype zlib" with the difference of automatically setting the output size, ignoring some possible decompression errors and to save the file "as-is" if the input is not compressed with zlib.

Try it.

For corresponding comtype for deflate is deflate_noerror.
If you don't know if it's zlib or deflate just use unzip_dynamic which tries zlib, then deflate and then "as-is".
  • Author
  • Localization

TGE, posted Wed Oct 14, 2015 9:42 am (8428)


Using comtype unzip_dynamic and clog NAME OFFSET SIZE 1 fixed the issue I was having, thanks.
The reason I used the same size for the zsize and size is because it was noted in the manual that this would automatically get the decompressed size. Might just have been bad reading on my part though :)

On a different note.. is there any way to get a string of a number in hexadecimal?
  • Author
  • Localization

Kofdasad, posted Tue Oct 27, 2015 4:15 pm (8992)


Hi!

Sorry, this is my first post, 'm just learning how to use the tool...
I get This error:

Code:
  offset   filesize   filename
--------------------------------------
- SCRIPT's MESSAGE:
  test algorithm number 1: ZSIZE 1798078650, SIZE 1601834632

  00000000 1601834632 1.dmp

Error: the compressed zlib/deflate input is wrong or incomplete (-3)
Info:  algorithm   1
       offset      00000000
       input size  0x6b2c80ba 1798078650
       output size 0x5f7a0e88 1601834632
       result      0xffffffff -1

Error: the uncompressed data (-1) is bigger than the allocated buffer (160183463
2)

Last script line before the error or that produced the error:
  27  clog NAME 0 ZSIZE SIZE


Is a "big" file, about 1.7GB

Can you help me?

Thanks!
  • Author
  • Localization

aluigi, posted Tue Oct 27, 2015 7:39 pm (8997)


It looks like you were trying to use comtype_scan2.bat/bms on a file of almost 2Gb... oh no no no :D

The scanner must be used only when you know at 100% what you are doing, for example if you have a small file that you are sure it contains just the compressed stream (no header, no footer, no other stuff).

For using quickbms first you have to figure the structure of the format.
What's the game?
  • Author
  • Localization

crushedice2000, posted Sun Nov 08, 2015 8:44 pm (9462)


Hi! When I try to run sminstcab.bms with a Smart Install Maker installer I get this output:

Code:
QuickBMS generic files extractor and reimporter 0.7.0
by Luigi Auriemma
e-mail: [email protected]
web:    aluigi.org
        (Oct 31 2015 - 14:05:01)

                   quickbms.aluigi.org   Homepage
                            zenhax.com   ZenHAX Forum
                               @zenhax   Twitter & Scripts

- open input file C:\setup.exe
- open script Z:\Descargas\sminstcab.bms
- set output folder C:\output

  offset   filesize   filename
--------------------------------------
- SCRIPT's MESSAGE:
  PAK_SIZE      36655192
  MULTI_PATTERN disk@$&.pak
  ONE_VOLUME    1
  FILES         96
  CAB_SIZE      4195939

  00000000 8388746    setup_Disk1.cab

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

*EH* ExceptionCode      c0000005 access violation
*EH* ExceptionFlags     00000000
*EH* ExceptionAddress   77c183b4
                        77BE0000 000383b4 msvcrt.dll
*EH* NumberParameters   00000002
*EH*                    00000000
*EH*                    00000000

*EH* Stack Trace:
0x77c183b4 : C:\WINDOWS\system32\msvcrt.dll : wcsxfrm
0x77c1627d : C:\WINDOWS\system32\msvcrt.dll : stricmp
0x4600a2 : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]
0x471d74 : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]
0x48b035 : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]
0x48b1b5 : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]
0x48af73 : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]
0x99d4d8 : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]
0x4010fd : C:\Documents and Settings\Windows XP\Escritorio\quickbms.exe : [unknown file]

Last script line before the error or that produced the error:
  177 log CAB_NAME 0 CAB_SIZE MEMORY_FILE2


I'm using QuickBMS 0.7 on Windows XP SP3. If you want, I'll put here the installer.

Thanks in advance!
  • Author
  • Localization

aluigi, posted Mon Nov 09, 2015 11:32 am (9468)


I'm aware of that bug and it will be fixed in the next version that I will release this weekend or even before.
In the meantime please use the previous version:
http://aluigi.org/papers/quickbms_0.6.7a.zip
  • Author
  • Localization

crushedice2000, posted Mon Nov 09, 2015 2:26 pm (9473)


aluigi wrote:
I'm aware of that bug and it will be fixed in the next version that I will release this weekend or even before.
In the meantime please use the previous version:
http://aluigi.org/papers/quickbms_0.6.7a.zip


Thank you! It works well on the previous version! :D

However, don't worry. I'll expect until the next version arrives. I'm simply trying to extract some Smart Install Maker files and with 0.6.7a works as expected.

I have some off-topic (on-topic but not about errors) questions. Should I open a thread or send you a PM :?:
  • Author
  • Localization

aluigi, posted Mon Nov 09, 2015 3:38 pm (9479)


Open a new thread for them.
  • Author
  • Localization

LALHW, posted Tue Jan 12, 2016 9:22 pm (10803)


Hello, I was trying to extract some .bff files from Project CARS but I keep getting the same error:
Code:
- error in src\xalloc.c line 676: xdbg_realloc()

Error: memory allocation problem


Here it is a file example: https://mega.nz/#!WMlUwZhL!Uat5mZJytt1iqTRotCXeG0CJPTULU5LW-ZJAJQ0m4wk. I'm using latest (0.7.2a) version. I hope you can fix this.

Also, is it possible to implement a script for working with Codemasters .pssg files? Please check this .pssg file: https://mega.nz/#!7NFy2C6Z!9JTiaVHLyFx8i65QuP-6hIFwHDSfc1fmMd0w3UTUWQc

Finally, I would like to ask for support for FrostBite's .cas files, I would be very glad if you could figure it out.

Thank you very much for your hard work!
  • Author
  • Localization

aluigi, posted Wed Jan 13, 2016 4:14 pm (10811)


Hi, it's a problem affecting the 0.7.2 brach of quickbms and will be fixed in the next version.
In the meantime use 0.7.1:
http://aluigi.org/papers/quickbms_0.7.1.zip

That pssg file is simply compressed with gzip, use 7-zip.
  • Author
  • Localization

LALHW, posted Fri Jan 15, 2016 7:36 pm (10827)


OK, thank you for your answer. But when decompressing a .pssg file, the extracted doesn't have any extension, and can't be opened by 7zip.
  • Author
  • Localization

aluigi, posted Wed Feb 03, 2016 10:45 pm (11199)


Unfortunately I don't have the recompression algorithm.
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.