Problem Statement: When using the LibreOffice V4.0.1.2 Linux 64-bit/AMD release, the execution of the BASIC macro stream will fail upon the instruction to convert Hex strings of a negative value to a long decimal value. Program execution is halted and the error message displayed is: “Inadmissible value or data type. Overflow”. BASIC code that demonstrates the problem: Sub Example_Code_For_Long() dim lngDecimal as long ' Testing Positive Hex string converted to long integer - OK: lngDecimal = Clng(&H0) msgbox "Clng(&H0): " & Cstr(lngDecimal) 'should be: 0 - OK lngDecimal = Clng(&H7FFFFFFF) msgbox "Clng(&H7FFFFFFF): " & Cstr(lngDecimal) 'should be: 2147483647 - OK '===== ' Testing Negative Hex string converted to long integer. ' Fails with Linux 64-bit/AMD LibreOffice 4.0.1.2 lngDecimal = Clng(&HFFFFFFFF) msgbox "Clng(&HFFFFFFFF): " & Cstr(lngDecimal) 'should be: -1 - Fails with Overflow error lngDecimal = Clng(&H80000000) msgbox "Clng(CH80000000): " & Cstr(lngDecimal) 'should be: -2147483648 - Fails with Overflow error end sub Note1: The above code run's OK on the following LibreOffice platforms: LibreOffice 4.0.1.2 on WindowsXP SP3 LibreOffice 3.6.2.2 on Ubuntu 12.10 (quantal) 32-bit Linux 3.5.0-21 OpenOffice 3.2.1 on Ubuntu 10.10 (maverick) 32 bit Linux 2.6.35-22 LibreOffice 3.3.3 Ubuntu 11.04 (natty) 32-bit Linux 2.6.38-11-generic Note2: I don't have a Mac to test whether or not this problem exists on the Mac / LibreOffice platform. Regards, ian.
As you have stated the bug existed in an older release I am updating version. Our version field represents the oldest release we see the problem, not the latest it's been tested on - we use comments to say "still exists in version x.x.x.x). Thanks!
Hi Joel, Thanks for explaining the "Version" field in Bug header section. In my comments I stated that the bug does not exist on x86 / 32-bit Linux versions of LibreOffice including V3.3.3 and V3.6.2.2 At the time of posting the comment, I had only one x86-64-bit/AMD Linux system with the 64-bit LibreOffice installed. This was running LibreOffice V4.0.1.2. I was only able to demonstrate and conclude the bug existed on this platform. I have since located a x86-64 bit/AMD Linux system with 64-bit LibreOffice V3.5.7.2. I can confirm the bug exists on this version of LibreOffice. It is possibly that this bug has existed since V3.3, the first LibreOffice release, but I don't have a copy of the V3.3 64-bit LibreOffice to be able to perform testing to confirm this. At this stage I can only confirm the bug existed as far back as the LibreOffice V3.5.7.2 64-bit Linux edition. I have set the version to reflect this. If someone has older versions of LibreOffice 64-bit edition, and can reproduce this bug, then please update the comments and version field. thanks, Ian.
Problem still exists in Version: 4.1.0.4 Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28 Linux x86-64 AMD OpenSUse 12.3 Have a nice day Herbert
I receive no errors on LibO 4.0.4 using Win7 64bit. that's probably a Linux 64bit specific issue. I changed a little bit the summary notes removing some redundant informations (you can already find them in the platform fields) changed version to 3.5.7.2 which is the earliest where the issue has been effectively reported. adding to CC Noel Power who is the expert for basic issues.
Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4c9a08e78b6e2c5d19628281bd4141c268299bea fix for fdo#62323 bad conversion of Hex strings for certain values The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fbf8ae82411d56189f844f9f00ccc6cf6b0827bf fix for fdo#62323 fix duplicated and wrong tests The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Power committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3c3c0c589a5b51797c1b751c712e9fa053ad921f&h=libreoffice-4-1 fix for fdo#62323 bad conversion of Hex strings for certain values It will be available in LibreOffice 4.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Power committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=230c28efb7773b89cf36312f722da835bfb90bff&h=libreoffice-4-0 fix for fdo#62323 bad conversion of Hex strings for certain values It will be available in LibreOffice 4.0.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to comment #8) > Noel Power committed a patch related to this issue. > fix for fdo#62323 bad conversion of Hex strings for certain values > > Affected users are encouraged to test the fix and report feedback. Hi Noel, I have tested the BASIC function Clng() for Hex strings of negative value using LibreOffice 4.1.3.2 410m0(Build:2) on Linux 64-bit 13-10 3.11.0-15 and found they now return the correct decimal values. Many thanks for performing this fix. regards, Ian. PS: Is there any chance you could assign yourself to Bug 62326 as this seems to be the same problem, but with the BASIC function Cint() ?
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ffbcbbc8dcc946d4d91cc08a937c2067be5a18b7 Cleanup for tdf#130476, tdf#62323 and tdf#62326 It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.