LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Tracking down "Segmentation fault" in blassic (https://www.linuxquestions.org/questions/slackware-14/tracking-down-segmentation-fault-in-blassic-4175522423/)

the3dfxdude 10-18-2014 01:50 PM

BTW, I am running slackware 14.1 32-bit. So it's likely how you are compiling or other things influencing the segmentation fault. I'm not running a stock kernel here, so I'm not sure if there is some kind of kernel protection in play either. I do think the program is at fault here, and haven't taken the steps to run valgrind or other kinds of memory debugging to see if there is a corruption going on.

I also tried compiling 0.11, and I got syntax errors. Not a good sign.

metaschima 10-18-2014 03:22 PM

Tell the program devs about it, if you don't know the program internals it's hard for you to fix the bug.

psionl0 10-19-2014 12:54 AM

Quote:

Originally Posted by ntubski (Post 5255619)
So the next thing to try is to run under valgrind, but compile with debug info so you can get line numbers.

I set SLKCFLAGS="-g -O0 -fPIC" (which the SlackBuild uses to set CFLAGS and CXXFLAGS) which made blassic much more verbose about its breakdown.

This is a session running blassic alone.
Code:

Blassic 0.10.2
(C) 2001-2009 Julian Albo

Ok
dim a$(10)
*** glibc detected *** blassic: free(): invalid pointer: 0x00000000006feba0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7e4a6)[0x7f66c2fe94a6]
blassic[0x492ddd]
blassic[0x491e40]
blassic[0x49064f]
blassic[0x48f8a4]
blassic[0x479c5c]
blassic[0x4725e5]
blassic[0x472759]
blassic[0x45b29d]
blassic[0x45b950]
blassic[0x45c42a]
blassic[0x40cfcb]
blassic[0x40d1a0]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f66c2f8ca95]
blassic[0x409e59]
======= Memory map: ========
00400000-004e8000 r-xp 00000000 08:06 444293                            /usr/bin/blassic
006e7000-006ee000 rw-p 000e7000 08:06 444293                            /usr/bin/blassic
006ee000-006ff000 rw-p 00000000 00:00 0
00d27000-00d6c000 rw-p 00000000 00:00 0                                  [heap]
7f66c2742000-7f66c2747000 r-xp 00000000 08:06 436524                    /usr/lib64/libXdmcp.so.6.0.0
7f66c2747000-7f66c2946000 ---p 00005000 08:06 436524                    /usr/lib64/libXdmcp.so.6.0.0
7f66c2946000-7f66c2947000 rw-p 00004000 08:06 436524                    /usr/lib64/libXdmcp.so.6.0.0
7f66c2947000-7f66c2949000 r-xp 00000000 08:06 436242                    /usr/lib64/libXau.so.6.0.0
7f66c2949000-7f66c2b49000 ---p 00002000 08:06 436242                    /usr/lib64/libXau.so.6.0.0
7f66c2b49000-7f66c2b4a000 rw-p 00002000 08:06 436242                    /usr/lib64/libXau.so.6.0.0
7f66c2b4a000-7f66c2b67000 r-xp 00000000 08:06 437575                    /usr/lib64/libxcb.so.1.1.0
7f66c2b67000-7f66c2d67000 ---p 0001d000 08:06 437575                    /usr/lib64/libxcb.so.1.1.0
7f66c2d67000-7f66c2d68000 rw-p 0001d000 08:06 437575                    /usr/lib64/libxcb.so.1.1.0
7f66c2d68000-7f66c2d6b000 r-xp 00000000 08:06 1177605                    /lib64/libuuid.so.1.3.0
7f66c2d6b000-7f66c2f6a000 ---p 00003000 08:06 1177605                    /lib64/libuuid.so.1.3.0
7f66c2f6a000-7f66c2f6b000 rw-p 00002000 08:06 1177605                    /lib64/libuuid.so.1.3.0
7f66c2f6b000-7f66c3120000 r-xp 00000000 08:06 1183700                    /lib64/libc-2.15.so
7f66c3120000-7f66c3320000 ---p 001b5000 08:06 1183700                    /lib64/libc-2.15.so
7f66c3320000-7f66c3324000 r--p 001b5000 08:06 1183700                    /lib64/libc-2.15.so
7f66c3324000-7f66c3326000 rw-p 001b9000 08:06 1183700                    /lib64/libc-2.15.so
7f66c3326000-7f66c332b000 rw-p 00000000 00:00 0
7f66c332b000-7f66c3340000 r-xp 00000000 08:06 398684                    /usr/lib64/libgcc_s.so.1
7f66c3340000-7f66c353f000 ---p 00015000 08:06 398684                    /usr/lib64/libgcc_s.so.1
7f66c353f000-7f66c3540000 rw-p 00014000 08:06 398684                    /usr/lib64/libgcc_s.so.1
7f66c3540000-7f66c363a000 r-xp 00000000 08:06 1178650                    /lib64/libm-2.15.so
7f66c363a000-7f66c3839000 ---p 000fa000 08:06 1178650                    /lib64/libm-2.15.so
7f66c3839000-7f66c383a000 r--p 000f9000 08:06 1178650                    /lib64/libm-2.15.so
7f66c383a000-7f66c383b000 rw-p 000fa000 08:06 1178650                    /lib64/libm-2.15.so
7f66c383b000-7f66c391e000 r-xp 00000000 08:06 430808                    /usr/lib64/libstdc++.so.6.0.17
7f66c391e000-7f66c3b1d000 ---p 000e3000 08:06 430808                    /usr/lib64/libstdc++.so.6.0.17
7f66c3b1d000-7f66c3b25000 r--p 000e2000 08:06 430808                    /usr/lib64/libstdc++.so.6.0.17
7f66c3b25000-7f66c3b27000 rw-p 000ea000 08:06 430808                    /usr/lib64/libstdc++.so.6.0.17
7f66c3b27000-7f66c3b3c000 rw-p 00000000 00:00 0
7f66c3b3c000-7f66c3b3f000 r-xp 00000000 08:06 1183701                    /lib64/libdl-2.15.so
7f66c3b3f000-7f66c3d3e000 ---p 00003000 08:06 1183701                    /lib64/libdl-2.15.so
7f66c3d3e000-7f66c3d3f000 r--p 00002000 08:06 1183701                    /lib64/libdl-2.15.so
7f66c3d3f000-7f66c3d40000 rw-p 00003000 08:06 1183701                    /lib64/libdl-2.15.so
7f66c3d40000-7f66c3d8c000 r-xp 00000000 08:06 1177359                    /lib64/libncurses.so.5.9
7f66c3d8c000-7f66c3f8c000 ---p 0004c000 08:06 1177359                    /lib64/libncurses.so.5.9
7f66c3f8c000-7f66c3f91000 rw-p 0004c000 08:06 1177359                    /lib64/libncurses.so.5.9
7f66c3f91000-7f66c40c3000 r-xp 00000000 08:06 436200                    /usr/lib64/libX11.so.6.3.0
7f66c40c3000-7f66c42c3000 ---p 00132000 08:06 436200                    /usr/lib64/libX11.so.6.3.0
7f66c42c3000-7f66c42c9000 rw-p 00132000 08:06 436200                    /usr/lib64/libX11.so.6.3.0
7f66c42c9000-7f66c42df000 r-xp 00000000 08:06 435204                    /usr/lib64/libICE.so.6.3.0
7f66c42df000-7f66c44df000 ---p 00016000 08:06 435204                    /usr/lib64/libICE.so.6.3.0
7f66c44df000-7f66c44e0000 rw-p 00016000 08:06 435204                    /usr/lib64/libICE.so.6.3.0
7f66c44e0000-7f66c44e4000 rw-p 00000000 00:00 0
7f66c44e4000-7f66c44eb000 r-xp 00000000 08:06 435211                    /usr/lib64/libSM.so.6.0.1
7f66c44eb000-7f66c46ea000 ---p 00007000 08:06 435211                    /usr/lib64/libSM.so.6.0.1
7f66c46ea000-7f66c46eb000 rw-p 00006000 08:06 435211                    /usr/lib64/libSM.so.6.0.1
7f66c46eb000-7f66c470e000 r-xp 00000000 08:06 1183747                    /lib64/ld-2.15.so
7f66c48dc000-7f66c48e4000 rw-p 00000000 00:00 0
7f66c490b000-7f66c490d000 rw-p 00000000 00:00 0
7f66c490d000-7f66c490e000 r--p 00022000 08:06 1183747                    /lib64/ld-2.15.so
7f66c490e000-7f66c4910000 rw-p 00023000 08:06 1183747                    /lib64/ld-2.15.so
7fffc2c5c000-7fffc2c7d000 rw-p 00000000 00:00 0                          [stack]
7fffc2d13000-7fffc2d14000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

and this is a session using valgrind:
Code:

$ valgrind --leak-check=yes blassic
==2694== Memcheck, a memory error detector
==2694== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==2694== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2694== Command: blassic
==2694==
==2694== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s)
==2694==    at 0x6228BA5: __libc_sigaction (in /lib64/libc-2.15.so)
==2694==    by 0x40A10F: (anonymous namespace)::init_signal_handlers() (blassic.cpp:171)
==2694==    by 0x40C970: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:707)
==2694==    by 0x40D19F: main (blassic.cpp:911)
==2694==  Address 0x7fefff978 is on thread 1's stack
==2694==
==2694== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s)
==2694==    at 0x6228BA5: __libc_sigaction (in /lib64/libc-2.15.so)
==2694==    by 0x40A16B: (anonymous namespace)::init_signal_handlers() (blassic.cpp:184)
==2694==    by 0x40C970: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:707)
==2694==    by 0x40D19F: main (blassic.cpp:911)
==2694==  Address 0x7fefff978 is on thread 1's stack
==2694==

Blassic 0.10.2
(C) 2001-2009 Julian Albo

Ok
dim c(20)
Ok
dim a$(14)
==2694== Conditional jump or move depends on uninitialised value(s)
==2694==    at 0x492D8D: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
==2694==    by 0x491E3F: (anonymous namespace)::Array<std::string>::operator=((anonymous namespace)::Array<std::string> const&) (var.cpp:433)
==2694==    by 0x49064E: void (anonymous namespace)::dimvar<std::string>(std::string const&, Dimension const&) (var.cpp:512)
==2694==    by 0x48F8A3: dimvarstring(std::string const&, Dimension const&) (var.cpp:593)
==2694==    by 0x479C5B: RunnerLineImpl::do_DIM() (runnerline_instructions.cpp:1529)
==2694==    by 0x4725E4: RunnerLineImpl::execute_instruction() (runnerline_impl.cpp:4016)
==2694==    by 0x472758: RunnerLineImpl::execute() (runnerline_impl.cpp:4284)
==2694==    by 0x45B29C: Runner::runline(CodeLine const&) (runner.cpp:1905)
==2694==    by 0x45B94F: Runner::processline(std::string const&) (runner.cpp:2009)
==2694==    by 0x45C429: Runner::interactive() (runner.cpp:2139)
==2694==    by 0x40CFCA: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:873)
==2694==    by 0x40D19F: main (blassic.cpp:911)
==2694==
==2694== Use of uninitialised value of size 8
==2694==    at 0x492DA3: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
==2694==    by 0x491E3F: (anonymous namespace)::Array<std::string>::operator=((anonymous namespace)::Array<std::string> const&) (var.cpp:433)
==2694==    by 0x49064E: void (anonymous namespace)::dimvar<std::string>(std::string const&, Dimension const&) (var.cpp:512)
==2694==    by 0x48F8A3: dimvarstring(std::string const&, Dimension const&) (var.cpp:593)
==2694==    by 0x479C5B: RunnerLineImpl::do_DIM() (runnerline_instructions.cpp:1529)
==2694==    by 0x4725E4: RunnerLineImpl::execute_instruction() (runnerline_impl.cpp:4016)
==2694==    by 0x472758: RunnerLineImpl::execute() (runnerline_impl.cpp:4284)
==2694==    by 0x45B29C: Runner::runline(CodeLine const&) (runner.cpp:1905)
==2694==    by 0x45B94F: Runner::processline(std::string const&) (runner.cpp:2009)
==2694==    by 0x45C429: Runner::interactive() (runner.cpp:2139)
==2694==    by 0x40CFCA: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:873)
==2694==    by 0x40D19F: main (blassic.cpp:911)
==2694==
==2694== Conditional jump or move depends on uninitialised value(s)
==2694==    at 0x492DB9: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
==2694==    by 0x491E3F: (anonymous namespace)::Array<std::string>::operator=((anonymous namespace)::Array<std::string> const&) (var.cpp:433)
==2694==    by 0x49064E: void (anonymous namespace)::dimvar<std::string>(std::string const&, Dimension const&) (var.cpp:512)
==2694==    by 0x48F8A3: dimvarstring(std::string const&, Dimension const&) (var.cpp:593)
==2694==    by 0x479C5B: RunnerLineImpl::do_DIM() (runnerline_instructions.cpp:1529)
==2694==    by 0x4725E4: RunnerLineImpl::execute_instruction() (runnerline_impl.cpp:4016)
==2694==    by 0x472758: RunnerLineImpl::execute() (runnerline_impl.cpp:4284)
==2694==    by 0x45B29C: Runner::runline(CodeLine const&) (runner.cpp:1905)
==2694==    by 0x45B94F: Runner::processline(std::string const&) (runner.cpp:2009)
==2694==    by 0x45C429: Runner::interactive() (runner.cpp:2139)
==2694==    by 0x40CFCA: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:873)
==2694==    by 0x40D19F: main (blassic.cpp:911)
==2694==
==2694== Conditional jump or move depends on uninitialised value(s)
==2694==    at 0x4C29F52: operator delete[](void*) (vg_replace_malloc.c:515)
==2694==    by 0x492DDC: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
==2694==    by 0x491E3F: (anonymous namespace)::Array<std::string>::operator=((anonymous namespace)::Array<std::string> const&) (var.cpp:433)
==2694==    by 0x49064E: void (anonymous namespace)::dimvar<std::string>(std::string const&, Dimension const&) (var.cpp:512)
==2694==    by 0x48F8A3: dimvarstring(std::string const&, Dimension const&) (var.cpp:593)
==2694==    by 0x479C5B: RunnerLineImpl::do_DIM() (runnerline_instructions.cpp:1529)
==2694==    by 0x4725E4: RunnerLineImpl::execute_instruction() (runnerline_impl.cpp:4016)
==2694==    by 0x472758: RunnerLineImpl::execute() (runnerline_impl.cpp:4284)
==2694==    by 0x45B29C: Runner::runline(CodeLine const&) (runner.cpp:1905)
==2694==    by 0x45B94F: Runner::processline(std::string const&) (runner.cpp:2009)
==2694==    by 0x45C429: Runner::interactive() (runner.cpp:2139)
==2694==    by 0x40CFCA: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:873)
==2694==
==2694== Invalid free() / delete / delete[] / realloc()
==2694==    at 0x4C29F9C: operator delete[](void*) (vg_replace_malloc.c:515)
==2694==    by 0x492DDC: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
==2694==    by 0x491E3F: (anonymous namespace)::Array<std::string>::operator=((anonymous namespace)::Array<std::string> const&) (var.cpp:433)
==2694==    by 0x49064E: void (anonymous namespace)::dimvar<std::string>(std::string const&, Dimension const&) (var.cpp:512)
==2694==    by 0x48F8A3: dimvarstring(std::string const&, Dimension const&) (var.cpp:593)
==2694==    by 0x479C5B: RunnerLineImpl::do_DIM() (runnerline_instructions.cpp:1529)
==2694==    by 0x4725E4: RunnerLineImpl::execute_instruction() (runnerline_impl.cpp:4016)
==2694==    by 0x472758: RunnerLineImpl::execute() (runnerline_impl.cpp:4284)
==2694==    by 0x45B29C: Runner::runline(CodeLine const&) (runner.cpp:1905)
==2694==    by 0x45B94F: Runner::processline(std::string const&) (runner.cpp:2009)
==2694==    by 0x45C429: Runner::interactive() (runner.cpp:2139)
==2694==    by 0x40CFCA: (anonymous namespace)::blassic_main(int, char**) (blassic.cpp:873)
==2694==  Address 0x6feba0 is 0 bytes inside data symbol "_ZN12_GLOBAL__N_114arrayvarstringE"
==2694==
Ok

Near as I can tell, an uninitialized pointer is the culprit but I'm not sure what to do about it.

pan64 10-19-2014 04:12 AM

you can try to set a breakpoint and go into it - or try to link statically...

psionl0 10-19-2014 06:39 AM

Quote:

Originally Posted by pan64 (Post 5255909)
you can try to set a breakpoint and go into it - or try to link statically...

I already have a breakpoint right where I need it (at the point of segfault) and more information than I can process so far.

Even if static linking masked the problem for blassic, it doesn't help me in the long run. I have a lot of packages with segfaulting problems (even the esteemed Alien's vlc). In fact, it's almost a coin toss whether a package I install will actually run or scream "segfault" and die. There can't be that many poorly put together packages. There must be a problem with my Slackware setup which is why I must continue along this path.

That said, I find it amazing that a simple basic interpreter would need over 40 source files each thousands of lines long and during execution would have to link up with over 15 dynamic libraries. And in spite of the code verbosity, it can't handle a simple heap violation.

55020 10-19-2014 08:46 AM

Quote:

Originally Posted by psionl0 (Post 5255968)
I have a lot of packages with segfaulting problems (even the esteemed Alien's vlc). In fact, it's almost a coin toss whether a package I install will actually run or scream "segfault" and die. There can't be that many poorly put together packages. There must be a problem with my Slackware setup which is why I must continue along this path.

Well, that's a different problem, and this path is not necessarily the best path for that problem.

If you have lots of segfaults, there are probably several different causes. There certainly are a *lot* of poorly put together packages. In the case of vlc, it isn't fair for me to imply it might be poorly put together: no, it's a major achivement that it works at all, considering that it has to rely on so many poorly put together dependencies and rotten APIs.

But whilst the in-depth approach you've taken with blassic is good for finding problems in blassic, it's not really the best way of finding and solving a more general problem. For one thing, don't start with blassic: C is much simpler to debug than C++. For another, you only need to find out whether the stack dumps of the various failing programs have a common theme (what were they trying to do when they crashed). And most of all, it's just easier to manage your Slackware installation properly. No little experiments outside a VM, no mix-and-match between -stable and -current, the absolute minimum of multilib, and, dare I say, no rebuilds of standard packages with debugging symbols outside a VM. I apologise if you haven't done anything like that. But it will be more effective to eliminate this potential problem by performing an audit of your system against a Slackware install dvd.

The reason for this is that incompatibilities in dynamic linked libraries will often cause segfaults. You can make this happen by using a different .so file to the one that the program was built against. This is why the often-repeated advice to "just create the missing symlink" is *TERRIBLE* advice. As a different example, the gdal library can optionally be built with a patched internal version of libjpeg to support 12-bit jpegs -- this mostly works, but it makes qgis (which depends on gdal) segfault in one or two very specific places.

Or it might be hardware...

ntubski 10-19-2014 09:26 AM

Quote:

Originally Posted by psionl0 (Post 5255871)
I set SLKCFLAGS="-g -O0 -fPIC" (which the SlackBuild uses to set CFLAGS and CXXFLAGS) which made blassic much more verbose about its breakdown.

That's just glibc trying to helpful. As far as I know, you can ignore everything after the line "invalid pointer" part; we already have a backtrace with line numbers, and we're not going to learn much from the memory map.

Quote:

and this is a session using valgrind:
Code:

$ valgrind --leak-check=yes blassic
...
==2694== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s)
==2694==    at 0x6228BA5: __libc_sigaction (in /lib64/libc-2.15.so)
==2694==    by 0x40A10F: (anonymous namespace)::init_signal_handlers() (blassic.cpp:171)
...


This is a bug though probably harmless. You can fix it by adding sigfillset(&act.sa_mask); before the call to sigaction.

Code:

...
dim a$(14)
==2694== Conditional jump or move depends on uninitialised value(s)
==2694==    at 0x492D8D: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
==2694==    by 0x491E3F: (anonymous namespace)::Array<std::string>::operator=((anonymous namespace)::Array<std::string> const&) (var.cpp:433)
==2694==    by 0x49064E: void (anonymous namespace)::dimvar<std::string>(std::string const&, Dimension const&) (var.cpp:512)
==2694==    by 0x48F8A3: dimvarstring(std::string const&, Dimension const&) (var.cpp:593)
...
==2694== Use of uninitialised value of size 8
...
==2694== Invalid free() / delete / delete[] / realloc()
==2694==    at 0x4C29F9C: operator delete[](void*) (vg_replace_malloc.c:515)
==2694==    by 0x492DDC: (anonymous namespace)::Array<std::string>::delref() (var.cpp:453)
...
==2694==  Address 0x6feba0 is 0 bytes inside data symbol "_ZN12_GLOBAL__N_114arrayvarstringE"
==2694==
Ok


So apparently arrayvarstring["a$"].value is uninitialized. It looks like all Array<C> constructors do initialize it, so I'm not sure how that could be. Is it possible some versions of C++ runtime libraries don't like the 0 length array (new C [0])? It is legal C++ though.

Quote:

I already have a breakpoint right where I need it (at the point of segfault) and more information than I can process so far.
You probably want to break a little earlier: in every Array<C> constructor step through to check whether value gets initialized.

Quote:

Originally Posted by 55020
Or it might be hardware...

It was mentioned the crashes happen on at least 2 boxes, so it's pretty unlikely to be hardware.

psionl0 10-19-2014 11:46 AM

Quote:

Originally Posted by 55020 (Post 5256009)
And most of all, it's just easier to manage your Slackware installation properly. No little experiments outside a VM, no mix-and-match between -stable and -current, the absolute minimum of multilib, and, dare I say, no rebuilds of standard packages with debugging symbols outside a VM. I apologise if you haven't done anything like that.

I can assure you that mine is a vanilla Slackware installation (with multilib).

I can't guarantee that some obscure package I installed hasn't slipped in a rogue substitute library somewhere but md5ing all of my libraries will take some time. Of course, this is rendered unlikely since both 32-bit and 64-bit compilations of blassic have the same segfault problem - meaning that both 64-bit library and its equivalent 32-bit library would have had to be changed the same way.

If it helps, some of the segfaulting packages (like vlc) still run under gdb. In fact, the run instruction for my vlc is echo run | gdb vlc.

moesasji 10-19-2014 12:07 PM

Quote:

Originally Posted by psionl0 (Post 5256084)
If it helps, some of the segfaulting packages (like vlc) still run under gdb. In fact, the run instruction for my vlc is echo run | gdb vlc.

Slightly off-topic, but just in case you aren't aware:

If you experience segfaulting packages that run fine for others you should check that your hardware is fine by running memtest86+ for an extended period. This is simply one of the first thing to do if strange segfaults and/or compilation-errors pop up on a system. If your system doesn't run this test without errors you are sure to have a hardware problem. The slackware install DVD has the memtest option available when you boot from it.

btw) Keep in mind that completing the memtest run without errors doesn't actually guarantee that the hardware is fine. I've seen memory errors pop up only when a system is pushed harder, ie during compilation when the voltage lines might drop.

psionl0 10-21-2014 12:20 AM

Quote:

Originally Posted by moesasji (Post 5256089)
If you experience segfaulting packages that run fine for others you should check that your hardware is fine by running memtest86+ for an extended period.

Blassic throws exactly the same problems when I run it outside of X. This is definitely no memory glitch.

It is taking me longer than expected to learn how to set a break point at line 401 in var.cpp (either in gdb, valgrind or both) so if it takes me a while before I can provide more info don't think I have given up on this task.

metaschima 10-21-2014 10:24 AM

I'm thinking blassic is no longer maintained. Their main site is down and distros ship with patched versions in order for it to even build. How about FreeBasic or some other FLOSS basic compiler or interpreter ?

psionl0 10-21-2014 12:01 PM

I only keep blassic around for those rare occasions when I get a little maudlin since it is closest to the basics I grew up with (like Commodore 64 basic or GWbasic). For any remotely serious programming, I would of course use Java, C or C++ (or even fpc).

As explained before, my main reason for trying to fix this is to gain some experience at fixing other rogue programs (although admittedly, vlc with all its dependencies might be beyond my abilities). Since blassic used to work before the latest Slackware upgrade, it is possible that one or more libraries doesn't operate the same way that blassic expects it to anymore. If I give up now, I will never know.

metaschima 10-21-2014 12:17 PM

Quote:

Originally Posted by psionl0 (Post 5257212)
As explained before, my main reason for trying to fix this is to gain some experience at fixing other rogue programs (although admittedly, vlc with all its dependencies might be beyond my abilities). Since blassic used to work before the latest Slackware upgrade, it is possible that one or more libraries doesn't operate the same way that blassic expects it to anymore. If I give up now, I will never know.

Check out the patches that the other distros push, maybe they found the bug. You could also try upgrading Slackware package-wise and try to isolate the package change that caused it.

mancha 10-21-2014 05:37 PM

Quote:

Originally Posted by psionl0 (Post 5257212)
As explained before, my main reason for trying to fix this is to gain some experience at fixing other rogue programs...Since blassic used to work before the latest Slackware upgrade, it is possible that one or more libraries doesn't operate the same way that blassic expects it to anymore.

Has anyone else been able to reproduce your issue? the3dfxdude in post #2 can't reproduce and I just built blassic 0.10.2 from SBo on both
Slackware 14.1 x86 and x86_64 and can't reproduce either.

Before we go around calling blassic and vlc rogue, let's make sure the problem isn't something particular to your configuration. You're not
being very precise in your reports. What Slackware version are you using? When you say "the latest Slackware upgrade", which do mean?

--mancha

psionl0 10-21-2014 11:05 PM

Quote:

Originally Posted by mancha (Post 5257376)
Before we go around calling blassic and vlc rogue, let's make sure the problem isn't something particular to your configuration. You're not
being very precise in your reports. What Slackware version are you using? When you say "the latest Slackware upgrade", which do mean?

As my profile shows, I am running Slackware 14.0 (I chickened out of upgrading to 14.1) and I have installed the blassic-0.10.2 package which I got from SlackBuilds.org (blassic 0.11 was never finished to a stable version).

Although my Slackware installation is pretty much vanilla, I suspect a problem with how it is setup but so far I have no way of knowing whether the problem is with my Slackware setup or with blassic itself. All I know is that when I built the package under Slackware 13.37 there were apparently no problems (even when running the package under 14.0) but after compiling under Slackware 14.0 I get segfaults.


All times are GMT -5. The time now is 08:13 PM.